Package org.itk.simple
Class ConnectedComponentImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.ConnectedComponentImageFilter
Label the objects in a binary image.
ConnectedComponentImageFilter labels the objects in a binary image (non-zero pixels are considered
to be objects, zero-valued pixels are considered to be background).
Each distinct object is assigned a unique label. The filter
experiments with some improvements to the existing implementation, and
is based on run length encoding along raster lines. If the output
background value is set to zero (the default), the final object labels
start with 1 and are consecutive. If the output background is set to a
non-zero value (by calling the SetBackgroundValue() routine of the
filter), the final labels start at 0, and remain consecutive except
for skipping the background value as needed. Objects that are reached
earlier by a raster order scan have a lower label. This is different
to the behaviour of the original connected component image filter
which did not produce consecutive labels or impose any particular
ordering.
After the filter is executed, ObjectCount holds the number of
connected components.
See:
ImageToImageFilter
itk::simple::ConnectedComponent for the procedural interface
itk::ConnectedComponentImageFilter for the Doxygen on the original ITK class.
C++ includes: sitkConnectedComponentImageFilter.h
-
Field Summary
Fields inherited from class org.itk.simple.ProcessObject
swigCMemOwn
-
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::ConnectedComponentImageFilter::ConnectedComponentImageFilter() Default Constructor that takes no arguments and initializes default parametersprotected
ConnectedComponentImageFilter
(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
virtual itk::simple::ConnectedComponentImageFilter::~ConnectedComponentImageFilter() DestructorImage itk::simple::ConnectedComponentImageFilter::Execute(const Image &image, const Image &maskImage) Execute the filter on the input imageImage itk::simple::ConnectedComponentImageFilter::Execute(const Image &image, const Image &maskImage) Execute the filter on the input imageprotected void
finalize()
void
Self& itk::simple::ConnectedComponentImageFilter::FullyConnectedOff()void
Self& itk::simple::ConnectedComponentImageFilter::FullyConnectedOn() Set the value of FullyConnected to true or false respectfully.protected static long
boolean
bool itk::simple::ConnectedComponentImageFilter::GetFullyConnected() const Set/Get whether the connected components are defined strictly by face connectivity or by face+edge+vertex connectivity.getName()
std::string itk::simple::ConnectedComponentImageFilter::GetName() const Name of this classlong
uint32_t itk::simple::ConnectedComponentImageFilter::GetObjectCount() const This is a measurement.void
setFullyConnected
(boolean FullyConnected) Self& itk::simple::ConnectedComponentImageFilter::SetFullyConnected(bool FullyConnected) Set/Get whether the connected components are defined strictly by face connectivity or by face+edge+vertex connectivity.protected static long
toString()
std::string itk::simple::ConnectedComponentImageFilter::ToString() const Print ourselves outMethods inherited from class org.itk.simple.ImageFilter
getCPtr, swigRelease
Methods inherited from class org.itk.simple.ProcessObject
abort, addCommand, debugOff, debugOn, getCPtr, getDebug, getGlobalDefaultCoordinateTolerance, getGlobalDefaultDebug, getGlobalDefaultDirectionTolerance, getGlobalDefaultNumberOfThreads, getGlobalDefaultThreader, getGlobalWarningDisplay, getNumberOfThreads, getNumberOfWorkUnits, getProgress, globalDefaultDebugOff, globalDefaultDebugOn, globalWarningDisplayOff, globalWarningDisplayOn, hasCommand, removeAllCommands, setDebug, setGlobalDefaultCoordinateTolerance, setGlobalDefaultDebug, setGlobalDefaultDirectionTolerance, setGlobalDefaultNumberOfThreads, setGlobalDefaultThreader, setGlobalWarningDisplay, setNumberOfThreads, setNumberOfWorkUnits, swigRelease
-
Constructor Details
-
ConnectedComponentImageFilter
protected ConnectedComponentImageFilter(long cPtr, boolean cMemoryOwn) -
ConnectedComponentImageFilter
public ConnectedComponentImageFilter()itk::simple::ConnectedComponentImageFilter::ConnectedComponentImageFilter() Default Constructor that takes no arguments and initializes default parameters
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalize
in classImageFilter
-
delete
public void delete()virtual itk::simple::ConnectedComponentImageFilter::~ConnectedComponentImageFilter() Destructor- Overrides:
delete
in classImageFilter
-
setFullyConnected
public void setFullyConnected(boolean FullyConnected) Self& itk::simple::ConnectedComponentImageFilter::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::ConnectedComponentImageFilter::FullyConnectedOn() Set the value of FullyConnected to true or false respectfully. -
fullyConnectedOff
public void fullyConnectedOff()Self& itk::simple::ConnectedComponentImageFilter::FullyConnectedOff() -
getFullyConnected
public boolean getFullyConnected()bool itk::simple::ConnectedComponentImageFilter::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. -
getObjectCount
public long getObjectCount()uint32_t itk::simple::ConnectedComponentImageFilter::GetObjectCount() const This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution. -
getName
std::string itk::simple::ConnectedComponentImageFilter::GetName() const Name of this class- Overrides:
getName
in classProcessObject
-
toString
std::string itk::simple::ConnectedComponentImageFilter::ToString() const Print ourselves out- Overrides:
toString
in classProcessObject
-
execute
Image itk::simple::ConnectedComponentImageFilter::Execute(const Image &image, const Image &maskImage) Execute the filter on the input image -
execute
Image itk::simple::ConnectedComponentImageFilter::Execute(const Image &image, const Image &maskImage) Execute the filter on the input image
-