OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
otb::LabelMapWithAdjacency< TLabelObject > Class Template Reference

#include <otbLabelMapWithAdjacency.h>

+ Inheritance diagram for otb::LabelMapWithAdjacency< TLabelObject >:
+ Collaboration diagram for otb::LabelMapWithAdjacency< TLabelObject >:

Public Types

typedef std::map< LabelType, AdjacentLabelsContainerTypeAdjacencyMapType
 
typedef std::set< LabelTypeAdjacentLabelsContainerType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::WeakPointer< const SelfConstWeakPointer
 
typedef TLabelObject LabelObjectType
 
typedef std::pair< LabelType, LabelTypeLabelPairType
 
typedef std::vector< LabelPairTypeLabelPairVectorType
 
typedef LabelObjectType::LabelType LabelType
 
typedef Functor::MergeLabelObjectFunctor< TLabelObject > MergeFunctorType
 
typedef itk::SmartPointer< SelfPointer
 
typedef LabelMapWithAdjacency Self
 
typedef itk::LabelMap< TLabelObject > Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
const AdjacencyMapTypeGetAdjacencyMap () const
 
virtual const char * GetNameOfClass () const
 
void SetAdjacencyMap (const AdjacencyMapType &amap)
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = LabelObjectType::ImageDimension
 
AdjacencyMapType m_AdjacencyMap
 
void AddAdjacentLabel (LabelType label1, LabelType label2)
 
void ClearAdjacentLabels (LabelType label)
 
void RemoveAdjacentLabel (LabelType label1, LabelType label2)
 
const AdjacentLabelsContainerTypeGetAdjacentLabels (LabelType label) const
 
void MergeLabels (const LabelType &label1, const LabelType &label2)
 
void MergeLabels (const LabelPairVectorType &labels)
 
 LabelMapWithAdjacency ()
 
 ~LabelMapWithAdjacency () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
void CopyInformation (const itk::DataObject *data) override
 
 LabelMapWithAdjacency (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TLabelObject>
class otb::LabelMapWithAdjacency< TLabelObject >

This class is a LabelMap with additional adjacency information.

The adjacency information is stored as a map of set of labels, in order to avoid duplicated neighbors.

Definition at line 41 of file otbLabelMapWithAdjacency.h.

Member Typedef Documentation

◆ AdjacencyMapType

template<class TLabelObject >
typedef std::map<LabelType, AdjacentLabelsContainerType> otb::LabelMapWithAdjacency< TLabelObject >::AdjacencyMapType

A map containing the set of adjacent labels per label

Definition at line 73 of file otbLabelMapWithAdjacency.h.

◆ AdjacentLabelsContainerType

template<class TLabelObject >
typedef std::set<LabelType> otb::LabelMapWithAdjacency< TLabelObject >::AdjacentLabelsContainerType

A set containing adjacent labels

Definition at line 70 of file otbLabelMapWithAdjacency.h.

◆ ConstPointer

template<class TLabelObject >
typedef itk::SmartPointer<const Self> otb::LabelMapWithAdjacency< TLabelObject >::ConstPointer

Definition at line 48 of file otbLabelMapWithAdjacency.h.

◆ ConstWeakPointer

template<class TLabelObject >
typedef itk::WeakPointer<const Self> otb::LabelMapWithAdjacency< TLabelObject >::ConstWeakPointer

Definition at line 49 of file otbLabelMapWithAdjacency.h.

◆ LabelObjectType

template<class TLabelObject >
typedef TLabelObject otb::LabelMapWithAdjacency< TLabelObject >::LabelObjectType

Typedef of the LabelObject

Definition at line 55 of file otbLabelMapWithAdjacency.h.

◆ LabelPairType

template<class TLabelObject >
typedef std::pair<LabelType, LabelType> otb::LabelMapWithAdjacency< TLabelObject >::LabelPairType

A pair of labels

Definition at line 79 of file otbLabelMapWithAdjacency.h.

◆ LabelPairVectorType

template<class TLabelObject >
typedef std::vector<LabelPairType> otb::LabelMapWithAdjacency< TLabelObject >::LabelPairVectorType

A vector of pair of labels

Definition at line 82 of file otbLabelMapWithAdjacency.h.

◆ LabelType

template<class TLabelObject >
typedef LabelObjectType::LabelType otb::LabelMapWithAdjacency< TLabelObject >::LabelType

Label typedef support.

Definition at line 67 of file otbLabelMapWithAdjacency.h.

◆ MergeFunctorType

template<class TLabelObject >
typedef Functor::MergeLabelObjectFunctor<TLabelObject> otb::LabelMapWithAdjacency< TLabelObject >::MergeFunctorType

The merging functor

Definition at line 76 of file otbLabelMapWithAdjacency.h.

◆ Pointer

template<class TLabelObject >
typedef itk::SmartPointer<Self> otb::LabelMapWithAdjacency< TLabelObject >::Pointer

Definition at line 47 of file otbLabelMapWithAdjacency.h.

◆ Self

template<class TLabelObject >
typedef LabelMapWithAdjacency otb::LabelMapWithAdjacency< TLabelObject >::Self

Standard class typedefs

Definition at line 45 of file otbLabelMapWithAdjacency.h.

◆ Superclass

template<class TLabelObject >
typedef itk::LabelMap<TLabelObject> otb::LabelMapWithAdjacency< TLabelObject >::Superclass

Definition at line 46 of file otbLabelMapWithAdjacency.h.

Constructor & Destructor Documentation

◆ LabelMapWithAdjacency() [1/2]

template<class TLabelObject >
otb::LabelMapWithAdjacency< TLabelObject >::LabelMapWithAdjacency ( )
inlineprotected

Constructor

Definition at line 222 of file otbLabelMapWithAdjacency.h.

◆ ~LabelMapWithAdjacency()

template<class TLabelObject >
otb::LabelMapWithAdjacency< TLabelObject >::~LabelMapWithAdjacency ( )
inlineoverrideprotected

Destructor

Definition at line 227 of file otbLabelMapWithAdjacency.h.

◆ LabelMapWithAdjacency() [2/2]

template<class TLabelObject >
otb::LabelMapWithAdjacency< TLabelObject >::LabelMapWithAdjacency ( const Self )
privatedelete

The adjacency map

Member Function Documentation

◆ AddAdjacentLabel()

template<class TLabelObject >
void otb::LabelMapWithAdjacency< TLabelObject >::AddAdjacentLabel ( LabelType  label1,
LabelType  label2 
)
inline

Add a given label to the adjacent labels set of another label

Definition at line 96 of file otbLabelMapWithAdjacency.h.

◆ ClearAdjacentLabels()

template<class TLabelObject >
void otb::LabelMapWithAdjacency< TLabelObject >::ClearAdjacentLabels ( LabelType  label)
inline

Clear the adjacent labels of a given label

Definition at line 112 of file otbLabelMapWithAdjacency.h.

◆ CopyInformation()

template<class TLabelObject >
void otb::LabelMapWithAdjacency< TLabelObject >::CopyInformation ( const itk::DataObject *  data)
inlineoverrideprotected

Re-implement CopyInformation to pass the adjancency graph through

Definition at line 239 of file otbLabelMapWithAdjacency.h.

References otb::LabelMapWithAdjacency< TLabelObject >::m_AdjacencyMap.

◆ CreateAnother()

template<class TLabelObject >
virtual::itk::LightObject::Pointer otb::LabelMapWithAdjacency< TLabelObject >::CreateAnother ( void  ) const

◆ GetAdjacencyMap()

template<class TLabelObject >
const AdjacencyMapType& otb::LabelMapWithAdjacency< TLabelObject >::GetAdjacencyMap ( ) const
inline

Definition at line 90 of file otbLabelMapWithAdjacency.h.

◆ GetAdjacentLabels()

template<class TLabelObject >
const AdjacentLabelsContainerType& otb::LabelMapWithAdjacency< TLabelObject >::GetAdjacentLabels ( LabelType  label) const
inline

Get the set of adjacent labels from a given label

Definition at line 132 of file otbLabelMapWithAdjacency.h.

◆ GetNameOfClass()

template<class TLabelObject >
virtual const char* otb::LabelMapWithAdjacency< TLabelObject >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ MergeLabels() [1/2]

template<class TLabelObject >
void otb::LabelMapWithAdjacency< TLabelObject >::MergeLabels ( const LabelPairVectorType labels)
inline

Merge a list of pairs of labels. For each pair, the first label will be the one retained

Definition at line 194 of file otbLabelMapWithAdjacency.h.

◆ MergeLabels() [2/2]

template<class TLabelObject >
void otb::LabelMapWithAdjacency< TLabelObject >::MergeLabels ( const LabelType label1,
const LabelType label2 
)
inline

Merge two label objects. The first label will be the one retained

Definition at line 147 of file otbLabelMapWithAdjacency.h.

◆ New()

template<class TLabelObject >
static Pointer otb::LabelMapWithAdjacency< TLabelObject >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TLabelObject >
void otb::LabelMapWithAdjacency< TLabelObject >::operator= ( const Self )
privatedelete

The adjacency map

◆ PrintSelf()

template<class TLabelObject >
void otb::LabelMapWithAdjacency< TLabelObject >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
inlineoverrideprotected

Printself

Definition at line 232 of file otbLabelMapWithAdjacency.h.

◆ RemoveAdjacentLabel()

template<class TLabelObject >
void otb::LabelMapWithAdjacency< TLabelObject >::RemoveAdjacentLabel ( LabelType  label1,
LabelType  label2 
)
inline

Remove the given adjacent label from the given label

Definition at line 122 of file otbLabelMapWithAdjacency.h.

◆ SetAdjacencyMap()

template<class TLabelObject >
void otb::LabelMapWithAdjacency< TLabelObject >::SetAdjacencyMap ( const AdjacencyMapType amap)
inline

Set/Get the adjacency map

Definition at line 85 of file otbLabelMapWithAdjacency.h.

Member Data Documentation

◆ ImageDimension

template<class TLabelObject >
const unsigned int otb::LabelMapWithAdjacency< TLabelObject >::ImageDimension = LabelObjectType::ImageDimension
static

Dimension of the image. This constant is used by functions that are templated over image type (as opposed to being templated over pixel type and dimension) when they need compile time access to the dimension of the image.

Definition at line 64 of file otbLabelMapWithAdjacency.h.

◆ m_AdjacencyMap

template<class TLabelObject >
AdjacencyMapType otb::LabelMapWithAdjacency< TLabelObject >::m_AdjacencyMap
private

The adjacency map

Definition at line 257 of file otbLabelMapWithAdjacency.h.

Referenced by otb::LabelMapWithAdjacency< TLabelObject >::CopyInformation().


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