OTB  9.0.0
Orfeo Toolbox
Public Types | List of all members
otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage > Class Template Reference

#include <otbLabelImageSmallRegionMergingFilter.h>

+ Inheritance diagram for otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >:
+ Collaboration diagram for otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef PersistentLabelImageSmallRegionMergingFilter Self
 
typedef PersistentImageFilter< TInputLabelImage, TInputLabelImage > Superclass
 
- Public Types inherited from otb::PersistentImageFilter< TInputLabelImage, TInputLabelImage >
typedef itk::SmartPointer< const SelfConstPointer
 
typedef TInputLabelImage InputImageType
 
typedef TInputLabelImage OutputImageType
 
typedef itk::SmartPointer< SelfPointer
 
typedef PersistentImageFilter Self
 
typedef itk::ImageToImageFilter< TInputLabelImage, TInputLabelImage > Superclass
 
typedef TInputLabelImage InputImageType
 
typedef InputImageType::Pointer InputImagePointerType
 
typedef InputImageType::PixelType InputLabelType
 
typedef InputImageType::SizeType InputSizeType
 
typedef InputImageType::PointType PointType
 
typedef InputImageType::RegionType RegionType
 
typedef itk::VariableLengthVector< double > RealVectorPixelType
 
typedef std::unordered_map< InputLabelType, std::set< InputLabelType > > NeighboursMapType
 
typedef std::unordered_map< InputLabelType, RealVectorPixelTypeLabelStatisticType
 
typedef std::unordered_map< InputLabelType, double > LabelPopulationType
 
typedef std::unordered_map< InputLabelType, InputLabelTypeLUTType
 
unsigned int m_Size
 
LabelPopulationType m_LabelPopulation
 
LabelStatisticType m_LabelStatistic
 
std::vector< NeighboursMapTypem_NeighboursMapsTmp
 
LUTType m_LUT
 
virtual const char * GetNameOfClass () const
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual unsigned int GetSize ()
 
virtual void SetSize (unsigned int _arg)
 
void SetLabelPopulation (LabelPopulationType const &labelPopulation)
 
LabelPopulationType const & GetLabelPopulation () const
 
void SetLabelStatistic (LabelStatisticType const &labelStatistic)
 
LabelStatisticType const & GetLabelStatistic () const
 
LUTType const & GetLUT () const
 
virtual void Reset (void) override
 
virtual void Synthetize (void) override
 
static Pointer New ()
 
void GenerateInputRequestedRegion () override
 
void ThreadedGenerateData (const RegionType &outputRegionForThread, itk::ThreadIdType threadId) override
 
InputLabelType FindCorrespondingLabel (InputLabelType label)
 
 PersistentLabelImageSmallRegionMergingFilter ()
 
 ~PersistentLabelImageSmallRegionMergingFilter () override=default
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 PersistentLabelImageSmallRegionMergingFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Additional Inherited Members

- Public Member Functions inherited from otb::PersistentImageFilter< TInputLabelImage, TInputLabelImage >
virtual const char * GetNameOfClass () const
 
- Protected Member Functions inherited from otb::PersistentImageFilter< TInputLabelImage, TInputLabelImage >
 PersistentImageFilter ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 ~PersistentImageFilter () override
 

Detailed Description

template<class TInputLabelImage>
class otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >

This class can be used to merge each segments of a given size in a label image to the connected segment with the closest radiometry (in the sense of the euclidean squared distance). This persistent filter should be used as template parameter of a PersistentFilterStreamingDecorator. It computes from an input label image an equivalence table that gives for each pixel, the corresponding label in the merged image. The merged image can then be computed using a ChangeLabelImageFilter.

This filter can be updated several times for different values of size, the output equivalence table will be the results of all computations.

Definition at line 51 of file otbLabelImageSmallRegionMergingFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TInputLabelImage >
typedef itk::SmartPointer<const Self> otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::ConstPointer

Definition at line 58 of file otbLabelImageSmallRegionMergingFilter.h.

◆ InputImagePointerType

template<class TInputLabelImage >
typedef InputImageType::Pointer otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::InputImagePointerType

Template parameters typedefs

Definition at line 68 of file otbLabelImageSmallRegionMergingFilter.h.

◆ InputImageType

template<class TInputLabelImage >
typedef TInputLabelImage otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::InputImageType

Template parameters typedefs

Definition at line 62 of file otbLabelImageSmallRegionMergingFilter.h.

◆ InputLabelType

template<class TInputLabelImage >
typedef InputImageType::PixelType otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::InputLabelType

Template parameters typedefs

Definition at line 69 of file otbLabelImageSmallRegionMergingFilter.h.

◆ InputSizeType

template<class TInputLabelImage >
typedef InputImageType::SizeType otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::InputSizeType

Template parameters typedefs

Definition at line 70 of file otbLabelImageSmallRegionMergingFilter.h.

◆ LabelPopulationType

template<class TInputLabelImage >
typedef std::unordered_map<InputLabelType, double> otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::LabelPopulationType

Template parameters typedefs

Definition at line 79 of file otbLabelImageSmallRegionMergingFilter.h.

◆ LabelStatisticType

template<class TInputLabelImage >
typedef std::unordered_map<InputLabelType, RealVectorPixelType> otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::LabelStatisticType

Template parameters typedefs

Definition at line 78 of file otbLabelImageSmallRegionMergingFilter.h.

◆ LUTType

template<class TInputLabelImage >
typedef std::unordered_map<InputLabelType, InputLabelType> otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::LUTType

Template parameters typedefs

Definition at line 80 of file otbLabelImageSmallRegionMergingFilter.h.

◆ NeighboursMapType

template<class TInputLabelImage >
typedef std::unordered_map<InputLabelType, std::set<InputLabelType> > otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::NeighboursMapType

Template parameters typedefs

Definition at line 76 of file otbLabelImageSmallRegionMergingFilter.h.

◆ Pointer

template<class TInputLabelImage >
typedef itk::SmartPointer<Self> otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::Pointer

Definition at line 57 of file otbLabelImageSmallRegionMergingFilter.h.

◆ PointType

template<class TInputLabelImage >
typedef InputImageType::PointType otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::PointType

Template parameters typedefs

Definition at line 71 of file otbLabelImageSmallRegionMergingFilter.h.

◆ RealVectorPixelType

template<class TInputLabelImage >
typedef itk::VariableLengthVector<double> otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::RealVectorPixelType

Template parameters typedefs

Definition at line 74 of file otbLabelImageSmallRegionMergingFilter.h.

◆ RegionType

template<class TInputLabelImage >
typedef InputImageType::RegionType otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::RegionType

Template parameters typedefs

Definition at line 72 of file otbLabelImageSmallRegionMergingFilter.h.

◆ Self

template<class TInputLabelImage >
typedef PersistentLabelImageSmallRegionMergingFilter otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::Self

Standard class typedef

Definition at line 55 of file otbLabelImageSmallRegionMergingFilter.h.

◆ Superclass

template<class TInputLabelImage >
typedef PersistentImageFilter<TInputLabelImage, TInputLabelImage> otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::Superclass

Definition at line 56 of file otbLabelImageSmallRegionMergingFilter.h.

Constructor & Destructor Documentation

◆ PersistentLabelImageSmallRegionMergingFilter() [1/2]

template<class TInputLabelImage >
otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::PersistentLabelImageSmallRegionMergingFilter
protected

Constructor

Definition at line 32 of file otbLabelImageSmallRegionMergingFilter.hxx.

◆ ~PersistentLabelImageSmallRegionMergingFilter()

template<class TInputLabelImage >
otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::~PersistentLabelImageSmallRegionMergingFilter ( )
overrideprotecteddefault

Destructor

◆ PersistentLabelImageSmallRegionMergingFilter() [2/2]

template<class TInputLabelImage >
otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::PersistentLabelImageSmallRegionMergingFilter ( const Self )
privatedelete

Template parameters typedefs

Member Function Documentation

◆ CreateAnother()

template<class TInputLabelImage >
virtual::itk::LightObject::Pointer otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::CreateAnother ( void  ) const

Template parameters typedefs

◆ FindCorrespondingLabel()

template<class TInputLabelImage >
PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::InputLabelType otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::FindCorrespondingLabel ( InputLabelType  label)
protected

Use the LUT recursively to find the label corresponding to the input label

Definition at line 165 of file otbLabelImageSmallRegionMergingFilter.hxx.

◆ GenerateInputRequestedRegion()

template<class TInputLabelImage >
void otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::GenerateInputRequestedRegion
overrideprotected

The input requested region should be padded by a radius of 1 to use the neighbourhood iterator

Definition at line 178 of file otbLabelImageSmallRegionMergingFilter.hxx.

◆ GetLabelPopulation()

template<class TInputLabelImage >
PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::LabelPopulationType const & otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::GetLabelPopulation

Get the Label population

Definition at line 50 of file otbLabelImageSmallRegionMergingFilter.hxx.

◆ GetLabelStatistic()

template<class TInputLabelImage >
PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::LabelStatisticType const & otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::GetLabelStatistic

Get the label statistic

Definition at line 64 of file otbLabelImageSmallRegionMergingFilter.hxx.

◆ GetLUT()

template<class TInputLabelImage >
PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::LUTType const & otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::GetLUT

Get the LUT

Definition at line 71 of file otbLabelImageSmallRegionMergingFilter.hxx.

◆ GetNameOfClass()

template<class TInputLabelImage >
virtual const char* otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::GetNameOfClass ( ) const
virtual

Type macro

◆ GetSize()

template<class TInputLabelImage >
virtual unsigned int otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::GetSize ( )
virtual

Set/Get size of segments to be merged

◆ New()

template<class TInputLabelImage >
static Pointer otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::New ( )
static

Template parameters typedefs

◆ operator=()

template<class TInputLabelImage >
void otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::operator= ( const Self )
privatedelete

Template parameters typedefs

◆ PrintSelf()

template<class TInputLabelImage >
void otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

PrintSelf method

Definition at line 259 of file otbLabelImageSmallRegionMergingFilter.hxx.

◆ Reset()

template<class TInputLabelImage >
void otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::Reset ( void  )
overridevirtual

Template parameters typedefs

Implements otb::PersistentImageFilter< TInputLabelImage, TInputLabelImage >.

Definition at line 77 of file otbLabelImageSmallRegionMergingFilter.hxx.

◆ SetLabelPopulation()

template<class TInputLabelImage >
void otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::SetLabelPopulation ( LabelPopulationType const &  labelPopulation)

Set the Label population and initialize the LUT

Definition at line 37 of file otbLabelImageSmallRegionMergingFilter.hxx.

◆ SetLabelStatistic()

template<class TInputLabelImage >
void otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::SetLabelStatistic ( LabelStatisticType const &  labelStatistic)

Set the label statistic

Definition at line 57 of file otbLabelImageSmallRegionMergingFilter.hxx.

◆ SetSize()

template<class TInputLabelImage >
virtual void otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::SetSize ( unsigned int  _arg)
virtual

Template parameters typedefs

◆ Synthetize()

template<class TInputLabelImage >
void otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::Synthetize ( void  )
overridevirtual

Template parameters typedefs

Implements otb::PersistentImageFilter< TInputLabelImage, TInputLabelImage >.

Definition at line 84 of file otbLabelImageSmallRegionMergingFilter.hxx.

◆ ThreadedGenerateData()

template<class TInputLabelImage >
void otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::ThreadedGenerateData ( const RegionType outputRegionForThread,
itk::ThreadIdType  threadId 
)
overrideprotected

Threaded Generate Data : find the neighbours of each segments of size m_Size for each tile and store them in an accumulator

Definition at line 218 of file otbLabelImageSmallRegionMergingFilter.hxx.

Member Data Documentation

◆ m_LabelPopulation

template<class TInputLabelImage >
LabelPopulationType otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::m_LabelPopulation
private

Map containing at key i the population of the segment labelled i

Definition at line 136 of file otbLabelImageSmallRegionMergingFilter.h.

◆ m_LabelStatistic

template<class TInputLabelImage >
LabelStatisticType otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::m_LabelStatistic
private

Map containing at key i the mean of element of the segment labelled i

Definition at line 139 of file otbLabelImageSmallRegionMergingFilter.h.

◆ m_LUT

template<class TInputLabelImage >
LUTType otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::m_LUT
private

LUT giving correspondence between labels in the original segmentation and the merged labels

Definition at line 146 of file otbLabelImageSmallRegionMergingFilter.h.

◆ m_NeighboursMapsTmp

template<class TInputLabelImage >
std::vector<NeighboursMapType> otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::m_NeighboursMapsTmp
private

Neighbours maps for each thread

Definition at line 142 of file otbLabelImageSmallRegionMergingFilter.h.

◆ m_Size

template<class TInputLabelImage >
unsigned int otb::PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >::m_Size
private

Size of the segments to be merged

Definition at line 133 of file otbLabelImageSmallRegionMergingFilter.h.


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