Search in sources :

Example 1 with PathRootObject

use of qupath.lib.objects.PathRootObject in project qupath by qupath.

the class PathObjectHierarchyView method setImageData.

void setImageData(ImageData<BufferedImage> imageData) {
    if (hierarchy != null) {
        hierarchy.getSelectionModel().removePathObjectSelectionListener(this);
        hierarchy.removePathObjectListener(this);
    }
    this.hierarchy = imageData == null ? null : imageData.getHierarchy();
    if (hierarchy != null) {
        hierarchy.addPathObjectListener(this);
        hierarchy.getSelectionModel().addPathObjectSelectionListener(this);
        treeView.setRoot(createNode(hierarchy.getRootObject()));
    } else
        treeView.setRoot(createNode(new PathRootObject()));
// model.setPathObject(hierarchy.getSelectionModel().getSelectedPathObject());
// } else
// model.setPathObject(null);
}
Also used : PathRootObject(qupath.lib.objects.PathRootObject)

Aggregations

PathRootObject (qupath.lib.objects.PathRootObject)1