ITK
4.8.0
Insight Segmentation and Registration Toolkit
|
#include <itkLabelMapFilter.h>
Base class for filters that take an image as input and overwrite that image as the output.
LabelMapFilter is the base class for all process objects whose are using a LabelMapFilter as input. It manage several threads, and run a method ThreadedGenerateData() for each object in the LabelMapFilter. With that class, the developer doesn't need to take care of iterating over all the objects in the image, or to manage by hand the threads.
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 57 of file itkLabelMapFilter.h.
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 () |
Static Public Attributes | |
static const unsigned int | InputImageDimension = TInputImage::ImageDimension |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
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 |
Protected Attributes | |
FastMutexLock::Pointer | m_LabelObjectContainerLock |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime |
bool | m_Updating |
Protected Attributes inherited from itk::LightObject | |
AtomicInt< int > | m_ReferenceCount |
Private Member Functions | |
LabelMapFilter (const Self &) | |
void | operator= (const Self &) |
Private Attributes | |
float | m_InverseNumberOfLabelObjects |
InputImageType::Iterator | m_LabelObjectIterator |
SizeValueType | m_NumberOfLabelObjectsProcessed |
Additional Inherited Members | |
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 const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_TYPE | ThreaderCallback (void *arg) |
typedef SmartPointer< const Self > itk::LabelMapFilter< TInputImage, TOutputImage >::ConstPointer |
Definition at line 66 of file itkLabelMapFilter.h.
typedef Superclass::InputImageConstPointer itk::LabelMapFilter< TInputImage, TOutputImage >::InputImageConstPointer |
Definition at line 77 of file itkLabelMapFilter.h.
typedef Superclass::InputImagePixelType itk::LabelMapFilter< TInputImage, TOutputImage >::InputImagePixelType |
Definition at line 79 of file itkLabelMapFilter.h.
typedef Superclass::InputImagePointer itk::LabelMapFilter< TInputImage, TOutputImage >::InputImagePointer |
Definition at line 76 of file itkLabelMapFilter.h.
typedef Superclass::InputImageRegionType itk::LabelMapFilter< TInputImage, TOutputImage >::InputImageRegionType |
Definition at line 78 of file itkLabelMapFilter.h.
typedef Superclass::InputImageType itk::LabelMapFilter< TInputImage, TOutputImage >::InputImageType |
Some convenient typedefs.
Definition at line 72 of file itkLabelMapFilter.h.
typedef InputImageType::LabelObjectType itk::LabelMapFilter< TInputImage, TOutputImage >::LabelObjectType |
Definition at line 80 of file itkLabelMapFilter.h.
typedef OutputImageType::ConstPointer itk::LabelMapFilter< TInputImage, TOutputImage >::OutputImageConstPointer |
Definition at line 84 of file itkLabelMapFilter.h.
typedef OutputImageType::PixelType itk::LabelMapFilter< TInputImage, TOutputImage >::OutputImagePixelType |
Definition at line 86 of file itkLabelMapFilter.h.
typedef OutputImageType::Pointer itk::LabelMapFilter< TInputImage, TOutputImage >::OutputImagePointer |
Definition at line 83 of file itkLabelMapFilter.h.
typedef OutputImageType::RegionType itk::LabelMapFilter< TInputImage, TOutputImage >::OutputImageRegionType |
Definition at line 85 of file itkLabelMapFilter.h.
typedef TOutputImage itk::LabelMapFilter< TInputImage, TOutputImage >::OutputImageType |
Definition at line 82 of file itkLabelMapFilter.h.
typedef SmartPointer< Self > itk::LabelMapFilter< TInputImage, TOutputImage >::Pointer |
Definition at line 65 of file itkLabelMapFilter.h.
typedef LabelMapFilter itk::LabelMapFilter< TInputImage, TOutputImage >::Self |
Standard class typedefs.
Definition at line 63 of file itkLabelMapFilter.h.
typedef ImageToImageFilter< TInputImage, TOutputImage > itk::LabelMapFilter< TInputImage, TOutputImage >::Superclass |
Definition at line 64 of file itkLabelMapFilter.h.
|
protected |
|
protected |
|
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 >.
Reimplemented in itk::ShapeLabelMapFilter< TImage, TLabelImage >, and itk::ShapeLabelMapFilter< TImage, Image< TImage::PixelType, TImage::ImageDimension > >.
|
overrideprotectedvirtual |
If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). 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 >.
Reimplemented in itk::LabelMapContourOverlayImageFilter< TLabelMap, TFeatureImage, TOutputImage >, itk::LabelMapMaskImageFilter< TInputImage, TOutputImage >, itk::LabelMapOverlayImageFilter< TLabelMap, TFeatureImage, TOutputImage >, itk::StatisticsLabelMapFilter< TImage, TFeatureImage >, itk::LabelMapToBinaryImageFilter< TInputImage, TOutputImage >, itk::ShapeLabelMapFilter< TImage, TLabelImage >, itk::ShapeLabelMapFilter< TImage, Image< TImage::PixelType, TImage::ImageDimension > >, itk::LabelMapToLabelImageFilter< TInputImage, TOutputImage >, and itk::LabelMapToRGBImageFilter< TInputImage, TOutputImage >.
|
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::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >, itk::LabelMapMaskImageFilter< TInputImage, TOutputImage >, itk::ShapeLabelMapFilter< TImage, Image< TImage::PixelType, TImage::ImageDimension > >, itk::LabelMapToRGBImageFilter< TInputImage, TOutputImage >, itk::LabelMapToBinaryImageFilter< TInputImage, TOutputImage >, and itk::LabelMapToLabelImageFilter< TInputImage, TOutputImage >.
|
overridevirtual |
LabelMapFilter will produce the entire output.
Reimplemented from itk::ProcessObject.
Reimplemented in itk::LabelMapMaskImageFilter< TInputImage, TOutputImage >, and itk::LabelMapToBinaryImageFilter< TInputImage, TOutputImage >.
|
overridevirtual |
LabelMapFilter requires the entire input to be available. Thus, it needs to provide an implementation of GenerateInputRequestedRegion().
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::LabelMapMaskImageFilter< TInputImage, TOutputImage >, and itk::LabelMapToBinaryImageFilter< TInputImage, TOutputImage >.
|
inlineprotectedvirtual |
Return the label collection image to use. This method may be overloaded if the label collection image to use is not the input image.
Reimplemented in itk::LabelMapContourOverlayImageFilter< TLabelMap, TFeatureImage, TOutputImage >, itk::InPlaceLabelMapFilter< TInputImage >, and itk::InPlaceLabelMapFilter< TImage >.
Definition at line 117 of file itkLabelMapFilter.h.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::ObjectByObjectLabelMapFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter, TInternalInputImage, TInternalOutputImage >, itk::LabelMapContourOverlayImageFilter< TLabelMap, TFeatureImage, TOutputImage >, itk::LabelMapOverlayImageFilter< TLabelMap, TFeatureImage, TOutputImage >, itk::InPlaceLabelMapFilter< TInputImage >, itk::InPlaceLabelMapFilter< TImage >, itk::LabelMapMaskImageFilter< TInputImage, TOutputImage >, itk::ShapeLabelMapFilter< TImage, TLabelImage >, itk::ShapeLabelMapFilter< TImage, Image< TImage::PixelType, TImage::ImageDimension > >, itk::LabelSelectionLabelMapFilter< TImage >, itk::LabelMapToRGBImageFilter< TInputImage, TOutputImage >, itk::AttributeSelectionLabelMapFilter< TImage, TAttributeAccessor >, itk::AttributeSelectionLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >, itk::LabelMapToBinaryImageFilter< TInputImage, TOutputImage >, itk::LabelMapToLabelImageFilter< TInputImage, TOutputImage >, itk::AttributeUniqueLabelMapFilter< TImage, TAttributeAccessor >, itk::BinaryReconstructionLabelMapFilter< TImage, TMarkerImage, TAttributeAccessor >, itk::MergeLabelMapFilter< TImage >, itk::AttributeUniqueLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >, itk::ConvertLabelMapFilter< TInputImage, TOutputImage >, itk::StatisticsLabelMapFilter< TImage, TFeatureImage >, itk::LabelUniqueLabelMapFilter< TImage >, itk::ShapeOpeningLabelMapFilter< TImage >, itk::AttributeOpeningLabelMapFilter< TImage, TAttributeAccessor >, itk::StatisticsKeepNObjectsLabelMapFilter< TImage >, itk::AttributePositionLabelMapFilter< TImage, TAttributeAccessor, VPhysicalPosition >, itk::AttributeRelabelLabelMapFilter< TImage, TAttributeAccessor >, itk::StatisticsOpeningLabelMapFilter< TImage >, itk::StatisticsRelabelLabelMapFilter< TImage >, itk::AttributeRelabelLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >, itk::AttributeKeepNObjectsLabelMapFilter< TImage, TAttributeAccessor >, itk::RelabelLabelMapFilter< TImage >, itk::ShapeRelabelLabelMapFilter< TImage >, itk::ShapeUniqueLabelMapFilter< TImage >, itk::ShapeKeepNObjectsLabelMapFilter< TImage >, itk::StatisticsPositionLabelMapFilter< TImage >, itk::StatisticsUniqueLabelMapFilter< TImage >, itk::AggregateLabelMapFilter< TImage >, itk::ChangeLabelLabelMapFilter< TImage >, itk::ShiftScaleLabelMapFilter< TImage >, itk::AutoCropLabelMapFilter< TInputImage >, itk::ShapePositionLabelMapFilter< TImage >, itk::ChangeRegionLabelMapFilter< TInputImage >, itk::CropLabelMapFilter< TInputImage >, itk::PadLabelMapFilter< TInputImage >, and itk::RegionFromReferenceLabelMapFilter< TInputImage >.
|
static |
Standard New method.
|
private |
|
overrideprotectedvirtual |
If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). This superclass will automatically split the output image into a number of pieces, spawn multiple threads, and call ThreadedGenerateData() in each thread. Prior to spawning threads, the BeforeThreadedGenerateData() method is called. After all the threads have completed, the AfterThreadedGenerateData() method is called. If an image processing filter cannot support threading, that filter should provide an implementation of the GenerateData() method instead of providing an implementation of ThreadedGenerateData(). If a filter provides a GenerateData() method as its implementation, then the filter is responsible for allocating the output data. If a filter provides a ThreadedGenerateData() method as its implementation, then the output memory will allocated automatically by this superclass. The ThreadedGenerateData() method should only produce the output specified by "outputThreadRegion" parameter. ThreadedGenerateData() cannot write to any other portion of the output image (as this is responsibility of a different thread).
Reimplemented from itk::ImageSource< TOutputImage >.
Reimplemented in itk::LabelMapContourOverlayImageFilter< TLabelMap, TFeatureImage, TOutputImage >, itk::LabelMapMaskImageFilter< TInputImage, TOutputImage >, itk::LabelMapOverlayImageFilter< TLabelMap, TFeatureImage, TOutputImage >, and itk::LabelMapToBinaryImageFilter< TInputImage, TOutputImage >.
|
protectedvirtual |
Reimplemented in itk::LabelMapMaskImageFilter< TInputImage, TOutputImage >, itk::LabelMapToBinaryImageFilter< TInputImage, TOutputImage >, itk::ShapeLabelMapFilter< TImage, Image< TImage::PixelType, TImage::ImageDimension > >, itk::ChangeRegionLabelMapFilter< TInputImage >, itk::LabelMapToLabelImageFilter< TInputImage, TOutputImage >, and itk::LabelMapToRGBImageFilter< TInputImage, TOutputImage >.
|
static |
ImageDimension constants
Definition at line 89 of file itkLabelMapFilter.h.
|
private |
Definition at line 129 of file itkLabelMapFilter.h.
|
protected |
Definition at line 122 of file itkLabelMapFilter.h.
|
private |
Definition at line 128 of file itkLabelMapFilter.h.
|
private |
Definition at line 130 of file itkLabelMapFilter.h.
|
static |
ImageDimension constants
Definition at line 90 of file itkLabelMapFilter.h.