Package inra.ijpb.label
Class LabelUtils
java.lang.Object
inra.ijpb.label.LabelUtils
public class LabelUtils
extends java.lang.Object
A collection of utility methods for working with label images.
Contrary to the "LabelImages" class, methods in this class do not aim at
returning a Label image, and are expected to be used from plugins or other
processing classes.
- Author:
- dlegland
- See Also:
LabelImages
-
Method Summary
Modifier and Type Method Description static intgetLargestPossibleLabel(ij.ImageStack labelMap)Determine the largest possible label that can be used with the specified image.static intgetLargestPossibleLabel(ij.process.ImageProcessor labelMap)Determine the largest possible label that can be used with the specified image.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
getLargestPossibleLabel
public static final int getLargestPossibleLabel(ij.process.ImageProcessor labelMap)Determine the largest possible label that can be used with the specified image. The max label number is chosen according to image bitDepth.- Parameters:
labelMap- the image used for storing labels- Returns:
- the largest integer value of the label that can be stored within the input label map.
-
getLargestPossibleLabel
public static final int getLargestPossibleLabel(ij.ImageStack labelMap)Determine the largest possible label that can be used with the specified image. The max label number is chosen according to image bitDepth.- Parameters:
labelMap- the image used for storing labels- Returns:
- the largest integer value of the label that can be stored within the input label map.
-