ITK
4.3.0
Insight Segmentation and Registration Toolkit
|
#include <itkConnectedComponentImageFilter.h>
Label the objects in a binary image.
ConnectedComponentImageFilter labels the objects in a binary image. 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. The final object labels start with 1 and are consecutive. 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.
Definition at line 55 of file itkConnectedComponentImageFilter.h.
Classes | |
class | runLength |
Static Public Member Functions | |
static Pointer | New () |
Protected Attributes | |
bool | m_FullyConnected |
Private Types | |
typedef std::vector< runLength > | lineEncoding |
typedef std::vector< lineEncoding > | LineMapType |
typedef std::vector< typename TInputImage::OffsetValueType > | OffsetVec |
typedef TOutputImage::RegionType::SizeType | OutSizeType |
typedef std::vector< LabelType > | UnionFindType |
Private Member Functions | |
bool | CheckNeighbors (const OutputIndexType &A, const OutputIndexType &B) |
void | CompareLines (lineEncoding ¤t, const lineEncoding &Neighbour) |
ConnectedComponentImageFilter (const Self &) | |
SizeValueType | CreateConsecutive () |
void | FillOutput (const LineMapType &LineMap, ProgressReporter &progress) |
void | InitUnion (SizeValueType size) |
void | InsertSet (const LabelType label) |
void | LinkLabels (const LabelType lab1, const LabelType lab2) |
SizeValueType | LookupSet (const LabelType label) |
void | operator= (const Self &) |
void | SetupLineOffsets (OffsetVec &LineOffsets) |
void | Wait () |
Private Attributes | |
OutputImagePixelType | m_BackgroundValue |
Barrier::Pointer | m_Barrier |
UnionFindType | m_Consecutive |
std::vector< IdentifierType > | m_FirstLineIdToJoin |
TInputImage::ConstPointer | m_Input |
LineMapType | m_LineMap |
std::vector< IdentifierType > | m_NumberOfLabels |
LabelType | m_ObjectCount |
UnionFindType | m_UnionFind |
typedef TOutputImage::PixelType | OutputPixelType |
typedef TOutputImage::InternalPixelType | OutputInternalPixelType |
typedef TInputImage::PixelType | InputPixelType |
typedef TInputImage::InternalPixelType | InputInternalPixelType |
typedef TMaskImage::PixelType | MaskPixelType |
static const unsigned int | ImageDimension = TOutputImage::ImageDimension |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
static const unsigned int | InputImageDimension = TInputImage::ImageDimension |
Additional Inherited Members | |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
static const unsigned int | InputImageDimension = TInputImage::ImageDimension |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Protected Types inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(OutputImageDimension), itkGetStaticConstMacro(InputImageDimension) > | InputToOutputRegionCopierType |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) > | OutputToInputRegionCopierType |
Static Protected Member Functions inherited from itk::ImageSource< TOutputImage > | |
static ITK_THREAD_RETURN_TYPE | ThreaderCallback (void *arg) |
typedef SmartPointer< const Self > itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::ConstPointer |
Definition at line 110 of file itkConnectedComponentImageFilter.h.
typedef TInputImage::IndexType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::IndexType |
Definition at line 92 of file itkConnectedComponentImageFilter.h.
typedef Superclass::InputImagePointer itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::InputImagePointer |
Types from the Superclass
Definition at line 68 of file itkConnectedComponentImageFilter.h.
typedef TInputImage itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::InputImageType |
Image typedef support
Definition at line 90 of file itkConnectedComponentImageFilter.h.
typedef TInputImage::InternalPixelType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::InputInternalPixelType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 77 of file itkConnectedComponentImageFilter.h.
typedef TInputImage::PixelType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::InputPixelType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 76 of file itkConnectedComponentImageFilter.h.
typedef IdentifierType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::LabelType |
Type used as identifier of the different component labels.
Definition at line 130 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 214 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 217 of file itkConnectedComponentImageFilter.h.
typedef std::list< IndexType > itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::ListType |
Definition at line 103 of file itkConnectedComponentImageFilter.h.
typedef MaskImageType::Pointer itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::MaskImagePointer |
Definition at line 104 of file itkConnectedComponentImageFilter.h.
typedef TMaskImage itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::MaskImageType |
Definition at line 91 of file itkConnectedComponentImageFilter.h.
typedef TMaskImage::PixelType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::MaskPixelType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 78 of file itkConnectedComponentImageFilter.h.
typedef TInputImage::OffsetType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::OffsetType |
Definition at line 94 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 219 of file itkConnectedComponentImageFilter.h.
typedef TOutputImage::PixelType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::OutputImagePixelType |
Definition at line 101 of file itkConnectedComponentImageFilter.h.
typedef TOutputImage itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::OutputImageType |
Definition at line 96 of file itkConnectedComponentImageFilter.h.
typedef TOutputImage::IndexType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::OutputIndexType |
Definition at line 98 of file itkConnectedComponentImageFilter.h.
typedef TOutputImage::InternalPixelType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::OutputInternalPixelType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 75 of file itkConnectedComponentImageFilter.h.
typedef TOutputImage::OffsetType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::OutputOffsetType |
Definition at line 100 of file itkConnectedComponentImageFilter.h.
typedef TOutputImage::PixelType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::OutputPixelType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 74 of file itkConnectedComponentImageFilter.h.
typedef TOutputImage::SizeType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::OutputSizeType |
Definition at line 99 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 202 of file itkConnectedComponentImageFilter.h.
typedef SmartPointer< Self > itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::Pointer |
Smart pointer typedef support
Definition at line 109 of file itkConnectedComponentImageFilter.h.
typedef TOutputImage::RegionType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::RegionType |
Definition at line 97 of file itkConnectedComponentImageFilter.h.
typedef ConnectedComponentImageFilter itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::Self |
Standard "Self" & Superclass typedef.
Definition at line 62 of file itkConnectedComponentImageFilter.h.
typedef TInputImage::SizeType itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::SizeType |
Definition at line 93 of file itkConnectedComponentImageFilter.h.
typedef ImageToImageFilter< TInputImage, TOutputImage > itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::Superclass |
Definition at line 63 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 222 of file itkConnectedComponentImageFilter.h.
|
inlineprotected |
Definition at line 162 of file itkConnectedComponentImageFilter.h.
|
inlineprotectedvirtual |
Definition at line 169 of file itkConnectedComponentImageFilter.h.
|
private |
|
protectedvirtual |
If an imaging filter needs to perform processing after all processing threads have completed, the filter can can provide an implementation for AfterThreadedGenerateData(). The execution flow in the default GenerateData() method will be: 1) Allocate the output buffer 2) Call BeforeThreadedGenerateData() 3) Spawn threads, calling ThreadedGenerateData() in each thread. 4) Call AfterThreadedGenerateData() Note that this flow of control is only available if a filter provides a ThreadedGenerateData() method and NOT a GenerateData() method.
Reimplemented from itk::ImageSource< TOutputImage >.
|
protectedvirtual |
Standard pipeline methods.
Reimplemented from itk::ImageSource< TOutputImage >.
|
private |
|
private |
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
Reimplemented in itk::ScalarConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >, itk::VectorConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >, itk::ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, Functor::SimilarPixelsFunctor< TInputImage::ValueType >, TMaskImage >, and itk::ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, Functor::SimilarVectorsFunctor< TInputImage::ValueType >, TMaskImage >.
|
private |
|
protectedvirtual |
ConnectedComponentImageFilter will produce all of the output. Therefore it must provide an implementation of EnlargeOutputRequestedRegion().
Reimplemented from itk::ProcessObject.
|
private |
|
virtual |
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.
|
virtual |
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.
|
protectedvirtual |
ConnectedComponentImageFilter needs the entire input. Therefore it must provide an implementation GenerateInputRequestedRegion().
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
virtual |
|
virtual |
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.
|
inline |
Definition at line 150 of file itkConnectedComponentImageFilter.h.
References itk::ProcessObject::GetInput().
|
virtual |
Run-time type information (and related methods)
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::ScalarConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >, itk::VectorConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >, itk::ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMaskImage >, itk::ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, Functor::SimilarPixelsFunctor< TInputImage::ValueType >, TMaskImage >, and itk::ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, Functor::SimilarVectorsFunctor< TInputImage::ValueType >, TMaskImage >.
|
virtual |
|
inlineprivate |
Definition at line 227 of file itkConnectedComponentImageFilter.h.
|
private |
|
private |
|
private |
|
static |
Method for creation through the object factory.
|
private |
|
protectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
virtual |
|
virtual |
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.
|
inline |
Definition at line 145 of file itkConnectedComponentImageFilter.h.
|
private |
|
protected |
itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::typedef | ( | Concept::SameDimension< itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) > | ) |
This class requires SameDimension in the form of ( Concept::SameDimension< itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) > )
itk::ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >::typedef | ( | Concept::IsInteger< OutputImagePixelType > | ) |
This class requires OutputImagePixelTypeIsInteger in the form of ( Concept::IsInteger< OutputImagePixelType > )
|
inlineprivate |
Definition at line 251 of file itkConnectedComponentImageFilter.h.
|
static |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 80 of file itkConnectedComponentImageFilter.h.
|
static |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 84 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 199 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 263 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 224 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 261 of file itkConnectedComponentImageFilter.h.
|
protected |
Definition at line 192 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 265 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 267 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 260 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 198 of file itkConnectedComponentImageFilter.h.
|
private |
Definition at line 223 of file itkConnectedComponentImageFilter.h.
|
static |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 82 of file itkConnectedComponentImageFilter.h.