ITK
4.3.0
Insight Segmentation and Registration Toolkit
|
#include <itkBinaryImageToLabelMapFilter.h>
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: http://hdl.handle.net/1926/584 or http://www.insight-journal.org/browse/publication/176
Definition at line 61 of file itkBinaryImageToLabelMapFilter.h.
Classes | |
class | runLength |
Static Public Member Functions | |
static Pointer | New () |
Private Types | |
typedef std::vector< runLength > | lineEncoding |
typedef std::vector< lineEncoding > | LineMapType |
typedef std::vector < OffsetValueType > | OffsetVectorType |
typedef TOutputImage::RegionType::SizeType | OutSizeType |
typedef std::vector< LabelType > | UnionFindType |
Private Member Functions | |
BinaryImageToLabelMapFilter (const Self &) | |
bool | CheckNeighbors (const OutputIndexType &A, const OutputIndexType &B) |
void | CompareLines (lineEncoding ¤t, const lineEncoding &Neighbour) |
LabelType | CreateConsecutive () |
void | FillOutput (const LineMapType &LineMap, ProgressReporter &progress) |
void | InitUnion (const LabelType size) |
void | InsertSet (const LabelType label) |
void | LinkLabels (const LabelType lab1, const LabelType lab2) |
LabelType | LookupSet (const LabelType label) |
void | operator= (const Self &) |
void | SetupLineOffsets (OffsetVectorType &LineOffsets) |
void | Wait () |
Private Attributes | |
Barrier::Pointer | m_Barrier |
UnionFindType | m_Consecutive |
std::vector< SizeValueType > | m_FirstLineIdToJoin |
bool | m_FullyConnected |
InputPixelType | m_InputForegroundValue |
LineMapType | m_LineMap |
std::vector< SizeValueType > | m_NumberOfLabels |
SizeValueType | m_NumberOfObjects |
OutputPixelType | m_OutputBackgroundValue |
UnionFindType | m_UnionFind |
typedef TOutputImage::PixelType | OutputPixelType |
typedef TInputImage::PixelType | InputPixelType |
typedef TInputImage::SizeValueType | SizeValueType |
typedef TInputImage::OffsetValueType | OffsetValueType |
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) |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime |
bool | m_Updating |
typedef SmartPointer< const Self > itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::ConstPointer |
Definition at line 71 of file itkBinaryImageToLabelMapFilter.h.
typedef TInputImage::IndexType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::IndexType |
Definition at line 107 of file itkBinaryImageToLabelMapFilter.h.
typedef Superclass::InputImagePointer itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::InputImagePointer |
Types from the Superclass
Definition at line 81 of file itkBinaryImageToLabelMapFilter.h.
typedef TInputImage itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::InputImageType |
Image typedef support
Definition at line 106 of file itkBinaryImageToLabelMapFilter.h.
typedef TInputImage::PixelType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::InputPixelType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 93 of file itkBinaryImageToLabelMapFilter.h.
typedef SizeValueType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::LabelType |
Definition at line 101 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 199 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 202 of file itkBinaryImageToLabelMapFilter.h.
typedef std::list< IndexType > itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::ListType |
Definition at line 118 of file itkBinaryImageToLabelMapFilter.h.
typedef TInputImage::OffsetType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::OffsetType |
Definition at line 109 of file itkBinaryImageToLabelMapFilter.h.
typedef TInputImage::OffsetValueType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::OffsetValueType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 95 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 204 of file itkBinaryImageToLabelMapFilter.h.
typedef TOutputImage::PixelType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::OutputImagePixelType |
Definition at line 116 of file itkBinaryImageToLabelMapFilter.h.
typedef TOutputImage itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::OutputImageType |
Definition at line 111 of file itkBinaryImageToLabelMapFilter.h.
typedef TOutputImage::IndexType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::OutputIndexType |
Definition at line 113 of file itkBinaryImageToLabelMapFilter.h.
typedef TOutputImage::OffsetType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::OutputOffsetType |
Definition at line 115 of file itkBinaryImageToLabelMapFilter.h.
typedef TOutputImage::PixelType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::OutputPixelType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 92 of file itkBinaryImageToLabelMapFilter.h.
typedef TOutputImage::SizeType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::OutputSizeType |
Definition at line 114 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 187 of file itkBinaryImageToLabelMapFilter.h.
typedef SmartPointer< Self > itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::Pointer |
Definition at line 70 of file itkBinaryImageToLabelMapFilter.h.
typedef TOutputImage::RegionType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::RegionType |
Definition at line 112 of file itkBinaryImageToLabelMapFilter.h.
typedef BinaryImageToLabelMapFilter itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::Self |
Standard "Self" & Superclass typedef.
Definition at line 68 of file itkBinaryImageToLabelMapFilter.h.
typedef TInputImage::SizeType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::SizeType |
Definition at line 108 of file itkBinaryImageToLabelMapFilter.h.
typedef TInputImage::SizeValueType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::SizeValueType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 94 of file itkBinaryImageToLabelMapFilter.h.
typedef ImageToImageFilter< TInputImage, TOutputImage > itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::Superclass |
Definition at line 69 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 207 of file itkBinaryImageToLabelMapFilter.h.
|
protected |
|
inlineprotectedvirtual |
Definition at line 159 of file itkBinaryImageToLabelMapFilter.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 method.
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.
|
private |
|
protectedvirtual |
BinaryImageToLabelMapFilter 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 |
BinaryImageToLabelMapFilter needs the entire input. Therefore it must provide an implementation GenerateInputRequestedRegion().
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
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 the value to be consider "foreground" in the input image. Defaults to NumericTraits<InputPixelType>::max().
|
virtual |
Run-time type information (and related methods)
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
virtual |
|
virtual |
Set/Get the value used as "background" in the output image. Defaults to NumericTraits<OutputPixelType>::NonpositiveMin().
|
inlineprivate |
Definition at line 211 of file itkBinaryImageToLabelMapFilter.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 |
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 the value to be consider "foreground" in the input image. Defaults to NumericTraits<InputPixelType>::max().
|
virtual |
Set/Get the value used as "background" in the output image. Defaults to NumericTraits<OutputPixelType>::NonpositiveMin().
|
private |
|
protected |
itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::typedef | ( | Concept::SameDimension< itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) > | ) |
This class requires SameDimension in the form of ( Concept::SameDimension< itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) > )
|
inlineprivate |
Definition at line 235 of file itkBinaryImageToLabelMapFilter.h.
|
static |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 96 of file itkBinaryImageToLabelMapFilter.h.
|
static |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 98 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 254 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 209 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 252 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 249 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 245 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 257 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 251 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 247 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 244 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 208 of file itkBinaryImageToLabelMapFilter.h.
|
static |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 97 of file itkBinaryImageToLabelMapFilter.h.