Class BinaryImageToLabelMapFilter


public class BinaryImageToLabelMapFilter extends ImageFilter
Label the connected components in a binary image and produce a collection of label objects. BinaryImageToLabelMapFilter labels the objects in a binary image. Each distinct object is assigned a unique label. The final object labels start with 1 and are consecutive. Objects that are reached earlier by a raster order scan have a lower label. The GetOutput() function of this class returns an itk::LabelMap . This implementation was taken from the Insight Journal paper: https://www.insight-journal.org/browse/publication/176 Gaetan Lehmann. Biologie du Developpement et de la Reproduction, INRA de Jouy-en-Josas, France. See: ConnectedComponentImageFilter , LabelImageToLabelMapFilter , LabelMap , LabelObject itk::simple::BinaryImageToLabelMapFilter for the procedural interface itk::BinaryImageToLabelMapFilter for the Doxygen on the original ITK class. C++ includes: sitkBinaryImageToLabelMapFilter.h
  • Constructor Details

    • BinaryImageToLabelMapFilter

      protected BinaryImageToLabelMapFilter(long cPtr, boolean cMemoryOwn)
    • BinaryImageToLabelMapFilter

      public BinaryImageToLabelMapFilter()
      itk::simple::BinaryImageToLabelMapFilter::BinaryImageToLabelMapFilter() Default Constructor that takes no arguments and initializes default parameters
  • Method Details

    • getCPtr

      protected static long getCPtr(BinaryImageToLabelMapFilter obj)
    • swigRelease

      protected static long swigRelease(BinaryImageToLabelMapFilter obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class ImageFilter
    • delete

      public void delete()
      virtual itk::simple::BinaryImageToLabelMapFilter::~BinaryImageToLabelMapFilter() Destructor
      Overrides:
      delete in class ImageFilter
    • setFullyConnected

      public void setFullyConnected(boolean FullyConnected)
      Self& itk::simple::BinaryImageToLabelMapFilter::SetFullyConnected(bool FullyConnected) Set/Get whether the connected components are defined strictly by face connectivity or by face+edge+vertex connectivity. Default is FullyConnectedOff. For objects that are 1 pixel wide, use FullyConnectedOn.
    • fullyConnectedOn

      public void fullyConnectedOn()
      Self& itk::simple::BinaryImageToLabelMapFilter::FullyConnectedOn() Set the value of FullyConnected to true or false respectfully.
    • fullyConnectedOff

      public void fullyConnectedOff()
      Self& itk::simple::BinaryImageToLabelMapFilter::FullyConnectedOff()
    • getFullyConnected

      public boolean getFullyConnected()
      bool itk::simple::BinaryImageToLabelMapFilter::GetFullyConnected() const Set/Get whether the connected components are defined strictly by face connectivity or by face+edge+vertex connectivity. Default is FullyConnectedOff. For objects that are 1 pixel wide, use FullyConnectedOn.
    • setInputForegroundValue

      public void setInputForegroundValue(double InputForegroundValue)
      Self& itk::simple::BinaryImageToLabelMapFilter::SetInputForegroundValue(double InputForegroundValue) Set/Get the value to be consider "foreground" in the input image. Defaults to NumericTraits<InputPixelType>::max() .
    • getInputForegroundValue

      public double getInputForegroundValue()
      double itk::simple::BinaryImageToLabelMapFilter::GetInputForegroundValue() const Set/Get the value to be consider "foreground" in the input image. Defaults to NumericTraits<InputPixelType>::max() .
    • setOutputBackgroundValue

      public void setOutputBackgroundValue(double OutputBackgroundValue)
      Self& itk::simple::BinaryImageToLabelMapFilter::SetOutputBackgroundValue(double OutputBackgroundValue) Set/Get the value used as "background" in the output image. Defaults to NumericTraits<OutputPixelType>::NonpositiveMin() .
    • getOutputBackgroundValue

      public double getOutputBackgroundValue()
      double itk::simple::BinaryImageToLabelMapFilter::GetOutputBackgroundValue() const Set/Get the value used as "background" in the output image. Defaults to NumericTraits<OutputPixelType>::NonpositiveMin() .
    • getNumberOfObjects

      public long getNumberOfObjects()
      uint64_t itk::simple::BinaryImageToLabelMapFilter::GetNumberOfObjects() const This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.
    • getName

      public String getName()
      std::string itk::simple::BinaryImageToLabelMapFilter::GetName() const Name of this class
      Overrides:
      getName in class ProcessObject
    • toString

      public String toString()
      std::string itk::simple::BinaryImageToLabelMapFilter::ToString() const Print ourselves out
      Overrides:
      toString in class ProcessObject
    • execute

      public Image execute(Image image1)
      Image itk::simple::BinaryImageToLabelMapFilter::Execute(const Image &image1) Execute the filter on the input image