public class FloodFillComponentsLabeling extends AlgoStub implements ConnectedComponentsLabeling
    int conn = 4;
    int bitDepth = 16;
    ConnectedComponentsLabeling algo = new FloodFillComponentsLabeling(conn, bitDepth);
    DefaultAlgoListener.monitor(algo);
    ImageProcessor labels = algo.computeLabels(image);
    // or:
    FloodFillComponentsLabeling.Result res = algo.computeResult(image);
    ImageProcessor labels = res.labelMap; 
 FloodFillComponentsLabeling3D, 
FloodFill| Modifier and Type | Class and Description | 
|---|---|
class  | 
FloodFillComponentsLabeling.Result
Data class that stores result of connected component labeling. 
 | 
| Constructor and Description | 
|---|
FloodFillComponentsLabeling()
Constructor with default connectivity 4 and default output bitdepth equal to 16. 
 | 
FloodFillComponentsLabeling(int connectivity)
Constructor specifying the connectivity and using default output bitdepth equal to 16. 
 | 
FloodFillComponentsLabeling(int connectivity,
                           int bitDepth)
Constructor specifying the connectivity and the bitdepth of result label
 image 
 | 
| Modifier and Type | Method and Description | 
|---|---|
ij.process.ImageProcessor | 
computeLabels(ij.process.ImageProcessor image)
Computes labels corresponding to connected components in input image. 
 | 
FloodFillComponentsLabeling.Result | 
computeResult(ij.process.ImageProcessor image)
Computes connected components labeling on the input binary image, and
 returns the results encapsulated into a  
Result class
 together with the largest label index. | 
static int | 
largestPossibleLabel(int bitDepth)
Returns the largest possible label that can be obtained given the
 specified bit-depth. 
 | 
addAlgoListener, fireProgressChanged, fireProgressChanged, fireStatusChanged, fireStatusChanged, removeAlgoListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAlgoListener, removeAlgoListenerpublic FloodFillComponentsLabeling()
public FloodFillComponentsLabeling(int connectivity)
connectivity - the connectivity of connected components (4 or 8)public FloodFillComponentsLabeling(int connectivity,
                                   int bitDepth)
connectivity - the connectivity of connected components (4 or 8)bitDepth - the bit depth of the result (8, 16, or 32)public static final int largestPossibleLabel(int bitDepth)
2^bitdepth-1.bitDepth - the bit-depth of the ImageProcessor used for storing labels.
            Must be either 8, 16 or 32.public ij.process.ImageProcessor computeLabels(ij.process.ImageProcessor image)
ConnectedComponentsLabelingcomputeLabels in interface ConnectedComponentsLabelingimage - binary image containing componentspublic FloodFillComponentsLabeling.Result computeResult(ij.process.ImageProcessor image)
Result class
 together with the largest label index.image - the input binary imageCopyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.