ITK
4.8.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 63 of file itkBinaryImageToLabelMapFilter.h.
Classes | |
class | runLength |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Protected Types | |
typedef SizeValueType | InternalLabelType |
Protected Types inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(OutputImageDimension), itkGetStaticConstMacro(InputImageDimension) > | InputToOutputRegionCopierType |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) > | OutputToInputRegionCopierType |
Private Types | |
typedef std::vector < OutputPixelType > | ConsecutiveVectorType |
typedef std::vector< runLength > | lineEncoding |
typedef std::vector< lineEncoding > | LineMapType |
typedef std::vector < OffsetValueType > | OffsetVectorType |
typedef TOutputImage::RegionType::SizeType | OutSizeType |
typedef std::vector < InternalLabelType > | UnionFindType |
Private Member Functions | |
BinaryImageToLabelMapFilter (const Self &) | |
bool | CheckNeighbors (const OutputIndexType &A, const OutputIndexType &B) |
void | CompareLines (lineEncoding ¤t, const lineEncoding &Neighbour) |
SizeValueType | CreateConsecutive () |
void | FillOutput (const LineMapType &LineMap, ProgressReporter &progress) |
void | InitUnion (const InternalLabelType size) |
void | InsertSet (const InternalLabelType label) |
void | LinkLabels (const InternalLabelType lab1, const InternalLabelType lab2) |
InternalLabelType | LookupSet (const InternalLabelType label) |
void | operator= (const Self &) |
void | SetupLineOffsets (OffsetVectorType &LineOffsets) |
void | Wait () |
Private Attributes | |
Barrier::Pointer | m_Barrier |
ConsecutiveVectorType | m_Consecutive |
std::vector< SizeValueType > | m_FirstLineIdToJoin |
bool | m_FullyConnected |
ImageRegionSplitterDirection::Pointer | m_ImageRegionSplitter |
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 |
Static Public Attributes inherited from itk::ImageSource< TOutputImage > | |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Static Protected Member Functions inherited from itk::ImageSource< TOutputImage > | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_TYPE | ThreaderCallback (void *arg) |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime |
bool | m_Updating |
Protected Attributes inherited from itk::LightObject | |
AtomicInt< int > | m_ReferenceCount |
|
private |
Definition at line 217 of file itkBinaryImageToLabelMapFilter.h.
typedef SmartPointer< const Self > itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::ConstPointer |
Definition at line 73 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 83 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 95 of file itkBinaryImageToLabelMapFilter.h.
|
protected |
Definition at line 162 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 206 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 209 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 97 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 211 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 94 of file itkBinaryImageToLabelMapFilter.h.
typedef TOutputImage::SizeType itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::OutputSizeType |
Definition at line 114 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 194 of file itkBinaryImageToLabelMapFilter.h.
typedef SmartPointer< Self > itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::Pointer |
Definition at line 72 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 70 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 96 of file itkBinaryImageToLabelMapFilter.h.
typedef ImageToImageFilter< TInputImage, TOutputImage > itk::BinaryImageToLabelMapFilter< TInputImage, TOutputImage >::Superclass |
Definition at line 71 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 214 of file itkBinaryImageToLabelMapFilter.h.
|
protected |
|
inlineprotectedvirtual |
Definition at line 159 of file itkBinaryImageToLabelMapFilter.h.
|
private |
|
overrideprotectedvirtual |
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 >.
|
overrideprotectedvirtual |
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 |
|
overrideprotectedvirtual |
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.
|
overrideprotectedvirtual |
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.
|
overrideprotectedvirtual |
Provide an ImageRegionSplitter that does not split along the first dimension – we assume the data is complete along this dimension when threading.
Reimplemented from itk::ImageSource< TOutputImage >.
|
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().
|
private |
|
private |
|
private |
|
private |
|
static |
Method for creation through the object factory.
|
private |
|
overrideprotectedvirtual |
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 |
|
overrideprotected |
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) > )
|
private |
|
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.
|
static |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 100 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 254 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 218 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 256 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 245 of file itkBinaryImageToLabelMapFilter.h.
|
private |
Definition at line 259 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 215 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 99 of file itkBinaryImageToLabelMapFilter.h.