Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | List of all members
otb::RelabelComponentImageFilter< TInputImage, TOutputImage > Class Template Reference

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

#include <otbRelabelComponentImageFilter.h>

+ Inheritance diagram for otb::RelabelComponentImageFilter< TInputImage, TOutputImage >:
+ Collaboration diagram for otb::RelabelComponentImageFilter< TInputImage, TOutputImage >:

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef TInputImage::IndexType IndexType
 
typedef
Superclass::InputImagePointer 
InputImagePointer
 
typedef TInputImage InputImageType
 
typedef
TInputImage::InternalPixelType 
InputInternalPixelType
 
typedef TInputImage::PixelType InputPixelType
 
typedef unsigned long int LabelType
 
typedef unsigned long int ObjectSizeType
 
typedef TOutputImage OutputImageType
 
typedef
TOutputImage::InternalPixelType 
OutputInternalPixelType
 
typedef TOutputImage::PixelType OutputPixelType
 
typedef itk::SmartPointer< SelfPointer
 
typedef TOutputImage::RegionType RegionType
 
typedef RelabelComponentImageFilter Self
 
typedef TInputImage::SizeType SizeType
 
typedef
itk::RelabelComponentImageFilter
< TInputImage, TOutputImage > 
Superclass
 
- Public Types inherited from itk::RelabelComponentImageFilter< TInputImage, TOutputImage >
typedef SmartPointer< const SelfConstPointer
 
typedef TInputImage::IndexType IndexType
 
typedef
Superclass::InputImagePointer 
InputImagePointer
 
typedef TInputImage InputImageType
 
typedef
TInputImage::InternalPixelType 
InputInternalPixelType
 
typedef TInputImage::PixelType InputPixelType
 
typedef IdentifierType LabelType
 
typedef std::vector< float > ObjectSizeInPhysicalUnitsContainerType
 
typedef std::vector
< ObjectSizeType
ObjectSizeInPixelsContainerType
 
typedef SizeValueType ObjectSizeType
 
typedef TOutputImage OutputImageType
 
typedef
TOutputImage::InternalPixelType 
OutputInternalPixelType
 
typedef TOutputImage::PixelType OutputPixelType
 
typedef SmartPointer< SelfPointer
 
typedef TOutputImage::RegionType RegionType
 
typedef RelabelComponentImageFilter Self
 
typedef TInputImage::SizeType SizeType
 
typedef InPlaceImageFilter
< TInputImage, TOutputImage > 
Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
- Public Member Functions inherited from itk::RelabelComponentImageFilter< TInputImage, TOutputImage >
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual ObjectSizeType GetMinimumObjectSize () const
 
virtual LabelType GetNumberOfObjects () const
 
virtual const LabelTypeGetNumberOfObjectsToPrint () const
 
virtual LabelType GetOriginalNumberOfObjects () const
 
float GetSizeOfObjectInPhysicalUnits (LabelType obj) const
 
ObjectSizeType GetSizeOfObjectInPixels (LabelType obj) const
 
const
ObjectSizeInPhysicalUnitsContainerType
GetSizeOfObjectsInPhysicalUnits () const
 
const
ObjectSizeInPixelsContainerType
GetSizeOfObjectsInPixels () const
 
virtual void SetMinimumObjectSize (ObjectSizeType _arg)
 
virtual void SetNumberOfObjectsToPrint (LabelType _arg)
 
 typedef (Concept::EqualityComparable< InputPixelType >) InputEqualityComparableCheck
 
 typedef (Concept::Convertible< OutputPixelType, LabelType >) OutputLongConvertibleToUnsignedLongCheck
 
 typedef (Concept::Convertible< InputPixelType, OutputPixelType >) InputConvertibleToOutputCheck
 
 typedef (Concept::Convertible< LabelType, InputPixelType >) UnsignedLongConvertibleToInputCheck
 
 typedef (Concept::SameDimension< InputImageDimension, ImageDimension >) SameDimensionCheck
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::RelabelComponentImageFilter< TInputImage, TOutputImage >
static Pointer New ()
 
- Static Public Member Functions inherited from itk::ImageSource< TOutputImage >
static const
ImageRegionSplitterBase
GetGlobalDefaultSplitter (void)
 

Static Public Attributes

static const unsigned int ImageDimension = TOutputImage::ImageDimension
 
static const unsigned int InputImageDimension = TInputImage::ImageDimension
 
- Static Public Attributes inherited from itk::RelabelComponentImageFilter< TInputImage, TOutputImage >
static const unsigned int ImageDimension
 
static const unsigned int InputImageDimension
 

Protected Member Functions

 RelabelComponentImageFilter ()
 
virtual ~RelabelComponentImageFilter ()
 
void EnlargeOutputRequestedRegion (itk::DataObject *)
 
void GenerateInputRequestedRegion ()
 
- Protected Member Functions inherited from itk::RelabelComponentImageFilter< TInputImage, TOutputImage >
 RelabelComponentImageFilter ()
 
void GenerateData ()
 
void GenerateInputRequestedRegion ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 

Private Member Functions

 RelabelComponentImageFilter (const Self &)
 
void operator= (const Self &)
 

Detailed Description

template<class TInputImage, class TOutputImage>
class otb::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 relabeling 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 74 of file otbRelabelComponentImageFilter.h.

Member Typedef Documentation

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

Definition at line 115 of file otbRelabelComponentImageFilter.h.

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

Definition at line 107 of file otbRelabelComponentImageFilter.h.

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

Types from the Superclass

Definition at line 87 of file otbRelabelComponentImageFilter.h.

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

Image typedef support

Definition at line 105 of file otbRelabelComponentImageFilter.h.

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

Definition at line 96 of file otbRelabelComponentImageFilter.h.

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

Definition at line 95 of file otbRelabelComponentImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef unsigned long int otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::LabelType

Type used as identifier for the different component labels.

Definition at line 125 of file otbRelabelComponentImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef unsigned long int otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::ObjectSizeType

Type used to count number of pixels in objects.

Definition at line 131 of file otbRelabelComponentImageFilter.h.

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

Definition at line 106 of file otbRelabelComponentImageFilter.h.

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

Definition at line 94 of file otbRelabelComponentImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef TOutputImage::PixelType otb::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 93 of file otbRelabelComponentImageFilter.h.

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

Smart pointer typedef support

Definition at line 114 of file otbRelabelComponentImageFilter.h.

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

Definition at line 109 of file otbRelabelComponentImageFilter.h.

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

Standard "Self" & Superclass typedef.

Definition at line 81 of file otbRelabelComponentImageFilter.h.

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

Definition at line 108 of file otbRelabelComponentImageFilter.h.

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

Definition at line 82 of file otbRelabelComponentImageFilter.h.

Constructor & Destructor Documentation

template<class TInputImage , class TOutputImage >
otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::RelabelComponentImageFilter ( )
protected

Definition at line 32 of file otbRelabelComponentImageFilter.txx.

template<class TInputImage , class TOutputImage >
virtual otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::~RelabelComponentImageFilter ( )
inlineprotectedvirtual
template<class TInputImage , class TOutputImage >
otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::RelabelComponentImageFilter ( const Self )
private

Member Function Documentation

template<class TInputImage , class TOutputImage >
virtual::itk::LightObject::Pointer otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::CreateAnother ( void  ) const
template<class TInputImage , class TOutputImage >
void otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::EnlargeOutputRequestedRegion ( itk::DataObject )
inlineprotected

Definition at line 140 of file otbRelabelComponentImageFilter.h.

template<class TInputImage , class TOutputImage >
void otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::GenerateInputRequestedRegion ( void  )
protected

Definition at line 40 of file otbRelabelComponentImageFilter.txx.

template<class TInputImage , class TOutputImage >
virtual const char* otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods)

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

template<class TInputImage , class TOutputImage >
static Pointer otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::New ( )
static

Method for creation through the object factory.

template<class TInputImage , class TOutputImage >
void otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::operator= ( const Self )
private

Member Data Documentation

template<class TInputImage , class TOutputImage >
const unsigned int otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::ImageDimension = TOutputImage::ImageDimension
static

Definition at line 98 of file otbRelabelComponentImageFilter.h.

template<class TInputImage , class TOutputImage >
const unsigned int otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::InputImageDimension = TInputImage::ImageDimension
static

Definition at line 100 of file otbRelabelComponentImageFilter.h.


The documentation for this class was generated from the following files: