Class FloodFillRegionComponentsLabeling

java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.label.conncomp.FloodFillRegionComponentsLabeling
All Implemented Interfaces:
Algo

public class FloodFillRegionComponentsLabeling
extends AlgoStub
Computes the labels of the different connected components of a region within a label image. The type of result is controlled by the bitDepth option. Uses a Flood-fill type algorithm. The image pixels are iterated, and each time a foreground pixel not yet associated with a label is encountered, its connected component is associated with a new label.
Author:
dlegland
See Also:
FloodFillComponentsLabeling, FloodFill
  • Constructor Summary

    Constructors
    Constructor Description
    FloodFillRegionComponentsLabeling()
    Constructor with default connectivity 4 and default output bitdepth equal to 16.
    FloodFillRegionComponentsLabeling​(int connectivity)
    Constructor specifying the connectivity and using default output bitdepth equal to 16.
    FloodFillRegionComponentsLabeling​(int connectivity, int bitDepth)
    Constructor specifying the connectivity and the bitdepth of result label image
  • Method Summary

    Modifier and Type Method Description
    ij.process.ImageProcessor computeLabels​(ij.process.ImageProcessor image, int regionLabel)
    Computes labels corresponding to connected components of a region within a label map.

    Methods inherited from class inra.ijpb.algo.AlgoStub

    addAlgoListener, removeAlgoListener

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FloodFillRegionComponentsLabeling

      public FloodFillRegionComponentsLabeling()
      Constructor with default connectivity 4 and default output bitdepth equal to 16.
    • FloodFillRegionComponentsLabeling

      public FloodFillRegionComponentsLabeling​(int connectivity)
      Constructor specifying the connectivity and using default output bitdepth equal to 16.
      Parameters:
      connectivity - the connectivity of connected components (4 or 8)
    • FloodFillRegionComponentsLabeling

      public FloodFillRegionComponentsLabeling​(int connectivity, int bitDepth)
      Constructor specifying the connectivity and the bitdepth of result label image
      Parameters:
      connectivity - the connectivity of connected components (4 or 8)
      bitDepth - the bit depth of the result (8, 16, or 32)
  • Method Details

    • computeLabels

      public ij.process.ImageProcessor computeLabels​(ij.process.ImageProcessor image, int regionLabel)
      Computes labels corresponding to connected components of a region within a label map.
      Parameters:
      image - the label map containing index of each region.
      regionLabel - the label of the region whose connected components have to be computed.
      Returns:
      a new label map with the labels of the connected components of the specified region.