Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::RelabelComponentImageFilter< TInputImage, TOutputImage > Class Template Reference

Relabel the components in an image such that consecutive labels are used. More...

#include <itkRelabelComponentImageFilter.h>

Inheritance diagram for itk::RelabelComponentImageFilter< TInputImage, TOutputImage >:

Inheritance graph
[legend]
Collaboration diagram for itk::RelabelComponentImageFilter< TInputImage, TOutputImage >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef RelabelComponentImageFilter Self
typedef InPlaceImageFilter<
TInputImage, TOutputImage > 
Superclass
typedef Superclass::InputImagePointer InputImagePointer
typedef TOutputImage::PixelType OutputPixelType
typedef TOutputImage::InternalPixelType OutputInternalPixelType
typedef TInputImage::PixelType InputPixelType
typedef TInputImage::InternalPixelType InputInternalPixelType
typedef TInputImage InputImageType
typedef TOutputImage OutputImageType
typedef TInputImage::IndexType IndexType
typedef TInputImage::SizeType SizeType
typedef TOutputImage::RegionType RegionType
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer

Public Member Functions

 itkStaticConstMacro (ImageDimension, unsigned int, TOutputImage::ImageDimension)
virtual const char * GetNameOfClass () const
virtual unsigned long GetNumberOfObjects ()
virtual unsigned long GetOriginalNumberOfObjects ()
virtual void SetMinimumObjectSize (unsigned long _arg)
virtual unsigned long GetMinimumObjectSize ()
const std::vector< unsigned
long > & 
GetSizeOfObjectsInPixels () const
const std::vector< float > & GetSizeOfObjectsInPhysicalUnits () const
virtual void SetNumberOfObjectsToPrint (unsigned long _arg)
virtual const unsigned long & GetNumberOfObjectsToPrint ()
unsigned long GetSizeOfObjectInPixels (unsigned long obj) const
float GetSizeOfObjectInPhysicalUnits (unsigned long obj) const

Static Public Member Functions

Pointer New ()

Protected Member Functions

 RelabelComponentImageFilter ()
virtual ~RelabelComponentImageFilter ()
 RelabelComponentImageFilter (const Self &)
void GenerateData ()
void GenerateInputRequestedRegion ()
void PrintSelf (std::ostream &os, Indent indent) const

Detailed Description

template<class TInputImage, class TOutputImage>
class itk::RelabelComponentImageFilter< TInputImage, TOutputImage >

Relabel the components in an image such that consecutive labels are used.

RelabelComponentImageFilter remaps the labels associated with the objects in an image (as from the output of ConnectedComponentImageFilter) such that the label numbers are consecutive with no gaps between the label numbers used. By default, the relabling will also sort the labels based on the size of the object: the largest object will have label #1, the second largest will have label #2, etc.

Label #0 is assumed to be background is left unaltered by the relabeling.

RelabelComponentImageFilter is typically used on the output of the ConnectedComponentImageFilter for those applications that want to extract the largest object or the "k" largest objects. Any particular object can be extracted from the relabeled output using a BinaryThresholdImageFilter. A group of objects can be extracted from the relabled output using a ThresholdImageFilter.

Once all the objects are relabeled, the application can query the number of objects and the size of each object. Object sizes are returned in a vector. The size of the background is not calculated. So the size of object #1 is GetSizeOfObjectsInPixels()[0], the size of object #2 is GetSizeOfObjectsInPixels()[1], etc.

If user sets a minimum object size, all objects with fewer pixelss than the minimum will be discarded, so that the number of objects reported will be only those remaining. The GetOriginalNumberOfObjects method can be called to find out how many objects were present before the small ones were discarded.

RelabelComponentImageFilter can be run as an "in place" filter, where it will overwrite its output. The default is run out of place (or generate a separate output). "In place" operation can be controlled via methods in the superclass, InPlaceImageFilter::InPlaceOn() and InPlaceImageFilter::InPlaceOff().

See also:
ConnectedComponentImageFilter, BinaryThresholdImageFilter, ThresholdImageFilter

Definition at line 72 of file itkRelabelComponentImageFilter.h.


Member Typedef Documentation

template<class TInputImage, class TOutputImage>
typedef SmartPointer<const Self> itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::ConstPointer
 

Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.

Definition at line 111 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TInputImage::IndexType itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::IndexType
 

Definition at line 103 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::InputImagePointer itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::InputImagePointer
 

Types from the Superclass

Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.

Definition at line 85 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TInputImage itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::InputImageType
 

Image typedef support

Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.

Definition at line 101 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TInputImage::InternalPixelType itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::InputInternalPixelType
 

Definition at line 94 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TInputImage::PixelType itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::InputPixelType
 

Definition at line 93 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TOutputImage itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::OutputImageType
 

Superclass typedefs.

Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.

Definition at line 102 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TOutputImage::InternalPixelType itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::OutputInternalPixelType
 

Definition at line 92 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TOutputImage::PixelType itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::OutputPixelType
 

Extract some information from the image types. Dimensionality of the two images is assumed to be the same.

Definition at line 91 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef SmartPointer<Self> itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::Pointer
 

Smart pointer typedef support

Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.

Definition at line 110 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TOutputImage::RegionType itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::RegionType
 

Definition at line 105 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef RelabelComponentImageFilter itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::Self
 

Standard "Self" & Superclass typedef.

Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.

Definition at line 79 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TInputImage::SizeType itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::SizeType
 

Definition at line 104 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef InPlaceImageFilter< TInputImage, TOutputImage > itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::Superclass
 

Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.

Definition at line 80 of file itkRelabelComponentImageFilter.h.


Constructor & Destructor Documentation

template<class TInputImage, class TOutputImage>
itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::RelabelComponentImageFilter  )  [inline, protected]
 

Definition at line 206 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
virtual itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::~RelabelComponentImageFilter  )  [inline, protected, virtual]
 

Definition at line 210 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::RelabelComponentImageFilter const Self  )  [inline, protected]
 

Definition at line 211 of file itkRelabelComponentImageFilter.h.


Member Function Documentation

template<class TInputImage, class TOutputImage>
void itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::GenerateData  )  [protected, virtual]
 

Standard pipeline method.

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TInputImage, class TOutputImage>
void itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::GenerateInputRequestedRegion  )  [protected, virtual]
 

RelabelComponentImageFilter needs the entire input. Therefore it must provide an implementation GenerateInputRequestedRegion().

See also:
ProcessObject::GenerateInputRequestedRegion().

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

template<class TInputImage, class TOutputImage>
virtual unsigned long itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::GetMinimumObjectSize  )  [virtual]
 

Get the caller-defined minimum size of an object in pixels. If the caller has not set the minimum, 0 will be returned, which is to be interpreted as meaning that no minimum exists, and all objects in the original label map will be passed through to the output.

template<class TInputImage, class TOutputImage>
virtual const char* itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::GetNameOfClass  )  const [virtual]
 

Run-time type information (and related methods)

Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.

template<class TInputImage, class TOutputImage>
virtual unsigned long itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::GetNumberOfObjects  )  [virtual]
 

Get the number of objects in the image. This information is only valid after the filter has executed.

template<class TInputImage, class TOutputImage>
virtual const unsigned long& itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::GetNumberOfObjectsToPrint  )  [virtual]
 

Get/Set the number of objects enumerated and described when the filter is printed.

template<class TInputImage, class TOutputImage>
virtual unsigned long itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::GetOriginalNumberOfObjects  )  [virtual]
 

Get the original number of objects in the image before small objects were discarded. This information is only valid after the filter has executed. If the caller has not specified a minimum object size, OriginalNumberOfObjects is the same as NumberOfObjects.

template<class TInputImage, class TOutputImage>
float itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::GetSizeOfObjectInPhysicalUnits unsigned long  obj  )  const [inline]
 

Get the size of a particular object in physical space (in units of pixel size). This information is only valid after the filter has executed. Size of the background (object #0) is not calculated.

Definition at line 190 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
unsigned long itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::GetSizeOfObjectInPixels unsigned long  obj  )  const [inline]
 

Get the size of a particular object in pixels. This information is only valid after the filter has executed. Size of the background (object #0) is not calculated.

Definition at line 174 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
const std::vector<float>& itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::GetSizeOfObjectsInPhysicalUnits  )  const [inline]
 

Get the size of each object in physical space (in units of pixel size). This information is only valid after the filter has executed. Size of the background is not calculated. Size of object #1 is GetSizeOfObjectsInPhysicalUnits()[0]. Size of object #2 is GetSizeOfObjectsInPhysicalUnits()[1]. Etc.

Definition at line 168 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
const std::vector<unsigned long>& itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::GetSizeOfObjectsInPixels  )  const [inline]
 

Get the size of each object in pixels. This information is only valid after the filter has executed. Size of the background is not calculated. Size of object #1 is GetSizeOfObjectsInPixels()[0]. Size of object #2 is GetSizeOfObjectsInPixels()[1]. Etc.

Definition at line 160 of file itkRelabelComponentImageFilter.h.

template<class TInputImage, class TOutputImage>
itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::itkStaticConstMacro ImageDimension  ,
unsigned  int,
TOutputImage::ImageDimension 
 

template<class TInputImage, class TOutputImage>
Pointer itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::New  )  [static]
 

Method for creation through the object factory.

Reimplemented from itk::Object.

template<class TInputImage, class TOutputImage>
void itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::PrintSelf std::ostream &  os,
Indent  indent
const [protected, virtual]
 

Standard printself method

Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.

template<class TInputImage, class TOutputImage>
virtual void itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::SetMinimumObjectSize unsigned long  _arg  )  [virtual]
 

Set the minimum size in pixels for an object. All objects smaller than this size will be discarded and will not appear in the output label map. NumberOfObjects will count only the objects whose pixel counts are greater than or equal to the minimum size. Call GetOriginalNumberOfObjects to find out how many objects were present in the original label map.

template<class TInputImage, class TOutputImage>
virtual void itk::RelabelComponentImageFilter< TInputImage, TOutputImage >::SetNumberOfObjectsToPrint unsigned long  _arg  )  [virtual]
 

Get/Set the number of objects enumerated and described when the filter is printed.


The documentation for this class was generated from the following file:
Generated at Thu May 25 02:11:53 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000