Package sc.fiji.snt
Class DelineationsManager
java.lang.Object
sc.fiji.snt.DelineationsManager
Implements the Delineation Analysis pane.
- Author:
- Tiago Ferreira
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<ij.gui.Roi> protected JPanelgetPanel()static booleanhasDelineationLabels(Collection<Tree> trees) Checks if the given trees have any delineation labels.static booleanhasDelineationLabels(Tree tree) Checks if the given tree has any delineation labels.intimportFromLabelImage(ij.ImagePlus labelImp) Convenience overload accepting anImagePlus, which is converted to anImgPlusviaImpUtils.toImgPlus3D(ImagePlus, int, int).intimportFromLabelImage(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> labelImg) Imports delineations from a labels image.intimportFromLabelImage(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> labelImg, double[] spacing) Imports delineations from a labels image with explicit pixel spacing.intLoads delineations from a list of area ROIs.voidreset()Deletes all delineations.
-
Constructor Details
-
DelineationsManager
-
-
Method Details
-
getPanel
-
reset
public void reset()Deletes all delineations. -
getDelineationROIs
-
load
Loads delineations from a list of area ROIs. Each ROI is mapped to a delineation entry, and path nodes whose XY coordinates fall within the ROI are assigned to the corresponding delineation. If an ROI has been renamed or colored (stroke or fill), those properties are transferred to the delineation.- Parameters:
delineationROIs- the area ROIs to import;nullor empty lists return 0- Returns:
- the number of ROIs successfully associated with at least one path
-
importFromLabelImage
public int importFromLabelImage(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> labelImg) Imports delineations from a labels image. Each unique non-zero integer value becomes a delineation. Path nodes are assigned based on the label value at their pixel coordinates. The label image is stored internally for on-the-fly distance computation inmeasure().- Parameters:
labelImg- the labels image (XYZ or XY); 0 = background- Returns:
- the number of unique labels imported
-
importFromLabelImage
public int importFromLabelImage(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> labelImg, double[] spacing) Imports delineations from a labels image with explicit pixel spacing.- Parameters:
labelImg- the labels image (XYZ or XY); 0 = backgroundspacing- pixel spacing [x, y] or [x, y, z]; ifnull, spacing is inferred from axes metadata (ifImgPlus) or defaults to [1, 1, 1]- Returns:
- the number of unique labels imported
-
importFromLabelImage
public int importFromLabelImage(ij.ImagePlus labelImp) Convenience overload accepting anImagePlus, which is converted to anImgPlusviaImpUtils.toImgPlus3D(ImagePlus, int, int).- Parameters:
labelImp- the labels ImagePlus- Returns:
- the number of unique labels imported
-
hasDelineationLabels
Checks if the given trees have any delineation labels.- Parameters:
trees- the collection of trees to be inspected- Returns:
- true if any of the trees has delineation labels, false otherwise
-
hasDelineationLabels
Checks if the given tree has any delineation labels.- Parameters:
tree- the collection of paths to be inspected- Returns:
- true if the tree has delineation labels, false otherwise
-