OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue > Class Template Reference

#include <otbAttributesMapLabelObject.h>

+ Inheritance diagram for otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >:
+ Collaboration diagram for otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >:

Public Types

typedef AttributesMapType::const_iterator AttributesMapConstIteratorType
 
typedef AttributesMapType::iterator AttributesMapIteratorType
 
typedef std::map< std::string, AttributesValueTypeAttributesMapType
 
typedef TAttributesValue AttributesValueType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::WeakPointer< const SelfConstWeakPointer
 
typedef Superclass::IndexType IndexType
 
typedef itk::LabelMap< SelfLabelMapType
 
typedef Superclass::LabelObjectType LabelObjectType
 
typedef TLabel LabelType
 
typedef Superclass::LengthType LengthType
 
typedef Superclass::LineType LineType
 
typedef itk::SmartPointer< SelfPointer
 
typedef PolygonType::Pointer PolygonPointerType
 
typedef Polygon< double > PolygonType
 
typedef AttributesMapLabelObject Self
 
typedef itk::LabelObject< TLabel, VImageDimension > Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
void SetAttribute (const char *name, AttributesValueType value)
 
void SetAttribute (const std::string &name, AttributesValueType value)
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = VImageDimension
 
AttributesMapType m_Attributes
 
PolygonPointerType m_Polygon
 
AttributesValueType GetAttribute (const char *name) const
 
unsigned int GetNumberOfAttributes () const
 
std::vector< std::string > GetAvailableAttributes () const
 
virtual void CopyAttributesFrom (const LabelObjectType *lo)
 
const PolygonTypeGetPolygon () const
 
PolygonTypeGetPolygon ()
 
void SetPolygon (PolygonType *p)
 
 AttributesMapLabelObject ()
 
 ~AttributesMapLabelObject () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 AttributesMapLabelObject (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TLabel, unsigned int VImageDimension, class TAttributesValue>
class otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >

A LabelObject with a generic attributes map.

This class derives from itk::LabelObject and extends it to store pairs of key, value (of type TAttributesValue) in an internal map container.

As such it allows storing any custom attributes as necessary.

See also
LabelObject, ShapeLabelObject, StatisticsLabelObject

Definition at line 177 of file otbAttributesMapLabelObject.h.

Member Typedef Documentation

◆ AttributesMapConstIteratorType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef AttributesMapType::const_iterator otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::AttributesMapConstIteratorType

Definition at line 211 of file otbAttributesMapLabelObject.h.

◆ AttributesMapIteratorType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef AttributesMapType::iterator otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::AttributesMapIteratorType

Definition at line 210 of file otbAttributesMapLabelObject.h.

◆ AttributesMapType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef std::map<std::string, AttributesValueType> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::AttributesMapType

Map container typedefs.

Definition at line 209 of file otbAttributesMapLabelObject.h.

◆ AttributesValueType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef TAttributesValue otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::AttributesValueType

Definition at line 201 of file otbAttributesMapLabelObject.h.

◆ ConstPointer

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef itk::SmartPointer<const Self> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::ConstPointer

Definition at line 185 of file otbAttributesMapLabelObject.h.

◆ ConstWeakPointer

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef itk::WeakPointer<const Self> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::ConstWeakPointer

Definition at line 186 of file otbAttributesMapLabelObject.h.

◆ IndexType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef Superclass::IndexType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::IndexType

Definition at line 204 of file otbAttributesMapLabelObject.h.

◆ LabelMapType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef itk::LabelMap<Self> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::LabelMapType

Type of a label map using an AttributesMapLabelObject.

Definition at line 197 of file otbAttributesMapLabelObject.h.

◆ LabelObjectType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef Superclass::LabelObjectType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::LabelObjectType

Definition at line 183 of file otbAttributesMapLabelObject.h.

◆ LabelType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef TLabel otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::LabelType

Template parameters typedef.

Definition at line 200 of file otbAttributesMapLabelObject.h.

◆ LengthType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef Superclass::LengthType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::LengthType

Definition at line 206 of file otbAttributesMapLabelObject.h.

◆ LineType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef Superclass::LineType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::LineType

Definition at line 205 of file otbAttributesMapLabelObject.h.

◆ Pointer

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef itk::SmartPointer<Self> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::Pointer

Definition at line 184 of file otbAttributesMapLabelObject.h.

◆ PolygonPointerType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef PolygonType::Pointer otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::PolygonPointerType

Definition at line 215 of file otbAttributesMapLabelObject.h.

◆ PolygonType

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef Polygon<double> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::PolygonType

Definition at line 214 of file otbAttributesMapLabelObject.h.

◆ Self

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef AttributesMapLabelObject otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::Self

Standard class typedefs

Definition at line 181 of file otbAttributesMapLabelObject.h.

◆ Superclass

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
typedef itk::LabelObject<TLabel, VImageDimension> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::Superclass

Definition at line 182 of file otbAttributesMapLabelObject.h.

Constructor & Destructor Documentation

◆ AttributesMapLabelObject() [1/2]

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::AttributesMapLabelObject ( )
inlineprotected

Constructor

Definition at line 313 of file otbAttributesMapLabelObject.h.

◆ ~AttributesMapLabelObject()

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::~AttributesMapLabelObject ( )
inlineoverrideprotected

Destructor

Definition at line 318 of file otbAttributesMapLabelObject.h.

◆ AttributesMapLabelObject() [2/2]

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::AttributesMapLabelObject ( const Self )
privatedelete

The attributes map

Member Function Documentation

◆ CopyAttributesFrom()

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
virtual void otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::CopyAttributesFrom ( const LabelObjectType lo)
inlinevirtual

◆ CreateAnother()

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
virtual::itk::LightObject::Pointer otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::CreateAnother ( void  ) const

◆ GetAttribute()

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
AttributesValueType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::GetAttribute ( const char *  name) const
inline

Returns the attribute corresponding to name

Definition at line 238 of file otbAttributesMapLabelObject.h.

◆ GetAvailableAttributes()

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
std::vector<std::string> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::GetAvailableAttributes ( ) const
inline

Returns the list of available attributes

Definition at line 263 of file otbAttributesMapLabelObject.h.

◆ GetNameOfClass()

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
virtual const char* otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented in otb::AttributesMapLabelObjectWithClassLabel< TLabel, VImageDimension, TAttributesValue, TClassLabel >.

◆ GetNumberOfAttributes()

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
unsigned int otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::GetNumberOfAttributes ( ) const
inline

Returns the total number of attributes

Definition at line 255 of file otbAttributesMapLabelObject.h.

◆ GetPolygon() [1/2]

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
PolygonType* otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::GetPolygon ( )
inline

Return the polygon (non const version)

Definition at line 300 of file otbAttributesMapLabelObject.h.

◆ GetPolygon() [2/2]

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
const PolygonType* otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::GetPolygon ( ) const
inline

Return the polygon (const version)

Definition at line 294 of file otbAttributesMapLabelObject.h.

◆ New()

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
static Pointer otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
void otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::operator= ( const Self )
privatedelete

The attributes map

◆ PrintSelf()

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
void otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
inlineoverrideprotected

The printself method

Definition at line 323 of file otbAttributesMapLabelObject.h.

◆ SetAttribute() [1/2]

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
void otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::SetAttribute ( const char *  name,
AttributesValueType  value 
)
inline

Set an attribute value. If the key name already exists in the map, the value is overwritten.

Definition at line 221 of file otbAttributesMapLabelObject.h.

◆ SetAttribute() [2/2]

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
void otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::SetAttribute ( const std::string &  name,
AttributesValueType  value 
)
inline

Set an attribute value. If the key name already exists in the map, the value is overwritten.

Definition at line 230 of file otbAttributesMapLabelObject.h.

◆ SetPolygon()

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
void otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::SetPolygon ( PolygonType p)
inline

Set the polygon

Definition at line 306 of file otbAttributesMapLabelObject.h.

Member Data Documentation

◆ ImageDimension

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
const unsigned int otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::ImageDimension = VImageDimension
static

Definition at line 194 of file otbAttributesMapLabelObject.h.

◆ m_Attributes

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
AttributesMapType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::m_Attributes
private

◆ m_Polygon

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
PolygonPointerType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::m_Polygon
private

The polygon corresponding to the label object. Caution, this will be empty by default

Definition at line 343 of file otbAttributesMapLabelObject.h.


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