OTB  9.0.0
Orfeo Toolbox
Public Types | List of all members
otb::RelabelComponentImageFilter< TInputImage, TOutputImage > Class Template Reference

#include <otbRelabelComponentImageFilter.h>

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

Public Types

typedef Superclass::InputImagePointer InputImagePointer
 
typedef RelabelComponentImageFilter Self
 
typedef itk::RelabelComponentImageFilter< TInputImage, TOutputImage > Superclass
 
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 itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef unsigned long int LabelType
 
typedef unsigned long int ObjectSizeType
 
static const unsigned int ImageDimension = TOutputImage::ImageDimension
 
static const unsigned int InputImageDimension = TInputImage::ImageDimension
 
virtual const char * GetNameOfClass () const
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
static Pointer New ()
 
 RelabelComponentImageFilter ()
 
virtual ~RelabelComponentImageFilter ()
 
void GenerateInputRequestedRegion ()
 
void EnlargeOutputRequestedRegion (itk::DataObject *)
 
 RelabelComponentImageFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

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 80 of file otbRelabelComponentImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

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

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

Definition at line 119 of file otbRelabelComponentImageFilter.h.

◆ IndexType

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

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

Definition at line 111 of file otbRelabelComponentImageFilter.h.

◆ InputImagePointer

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

Types from the Superclass

Definition at line 92 of file otbRelabelComponentImageFilter.h.

◆ InputImageType

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

Image typedef support

Definition at line 109 of file otbRelabelComponentImageFilter.h.

◆ InputInternalPixelType

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

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

Definition at line 101 of file otbRelabelComponentImageFilter.h.

◆ InputPixelType

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

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

Definition at line 100 of file otbRelabelComponentImageFilter.h.

◆ LabelType

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 129 of file otbRelabelComponentImageFilter.h.

◆ ObjectSizeType

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 135 of file otbRelabelComponentImageFilter.h.

◆ OutputImageType

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

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

Definition at line 110 of file otbRelabelComponentImageFilter.h.

◆ OutputInternalPixelType

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

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

Definition at line 99 of file otbRelabelComponentImageFilter.h.

◆ OutputPixelType

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 98 of file otbRelabelComponentImageFilter.h.

◆ Pointer

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

Smart pointer typedef support

Definition at line 118 of file otbRelabelComponentImageFilter.h.

◆ RegionType

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

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

Definition at line 113 of file otbRelabelComponentImageFilter.h.

◆ Self

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

Standard "Self" & Superclass typedef.

Definition at line 86 of file otbRelabelComponentImageFilter.h.

◆ SizeType

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

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

Definition at line 112 of file otbRelabelComponentImageFilter.h.

◆ Superclass

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

Definition at line 87 of file otbRelabelComponentImageFilter.h.

Constructor & Destructor Documentation

◆ RelabelComponentImageFilter() [1/2]

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

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

Definition at line 35 of file otbRelabelComponentImageFilter.hxx.

◆ ~RelabelComponentImageFilter()

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

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

Definition at line 139 of file otbRelabelComponentImageFilter.h.

◆ RelabelComponentImageFilter() [2/2]

template<class TInputImage , class TOutputImage >
otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::RelabelComponentImageFilter ( const Self )
privatedelete

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

Member Function Documentation

◆ CreateAnother()

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

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

◆ EnlargeOutputRequestedRegion()

template<class TInputImage , class TOutputImage >
void otb::RelabelComponentImageFilter< TInputImage, TOutputImage >::EnlargeOutputRequestedRegion ( itk::DataObject *  )
inlineprotected

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

Definition at line 145 of file otbRelabelComponentImageFilter.h.

◆ GenerateInputRequestedRegion()

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

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

Definition at line 41 of file otbRelabelComponentImageFilter.hxx.

◆ GetNameOfClass()

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

Run-time type information (and related methods)

◆ New()

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

Method for creation through the object factory.

◆ operator=()

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

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

Member Data Documentation

◆ ImageDimension

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

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

Definition at line 102 of file otbRelabelComponentImageFilter.h.

◆ InputImageDimension

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

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

Definition at line 103 of file otbRelabelComponentImageFilter.h.


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