OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private 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,
AttributesValueType
AttributesMapType
 
typedef TAttributesValue AttributesValueType
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef itk::WeakPointer
< const Self
ConstWeakPointer
 
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 Types inherited from itk::LabelObject< TLabel, VImageDimension >
typedef unsigned int AttributeType
 
typedef SmartPointer< const SelfConstPointer
 
typedef WeakPointer< const SelfConstWeakPointer
 
typedef Index< VImageDimension > IndexType
 
typedef Self LabelObjectType
 
typedef TLabel LabelType
 
typedef LineType::LengthType LengthType
 
typedef LabelObjectLine
< VImageDimension > 
LineType
 
typedef Offset< VImageDimension > OffsetType
 
typedef SmartPointer< SelfPointer
 
typedef LabelObject Self
 
typedef itk::SizeValueType SizeValueType
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual void CopyAttributesFrom (const LabelObjectType *lo)
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
std::vector< std::string > GetAvailableAttributes () const
 
virtual const char * GetNameOfClass () const
 
unsigned int GetNumberOfAttributes () const
 
const PolygonTypeGetPolygon () const
 
PolygonTypeGetPolygon ()
 
void SetAttribute (const char *name, AttributesValueType value)
 
void SetAttribute (const std::string &name, AttributesValueType value)
 
void SetPolygon (PolygonType *p)
 
AttributesValueType GetAttribute (const char *name) const
 
- Public Member Functions inherited from itk::LabelObject< TLabel, VImageDimension >
void AddIndex (const IndexType &idx)
 
void AddLine (const LineType &line)
 
void AddLine (const IndexType &idx, const LengthType &length)
 
void Clear ()
 
void CopyAllFrom (const TSourceLabelObject *src)
 
void CopyAttributesFrom (const TSourceLabelObject *src)
 
void CopyLinesFrom (const TSourceLabelObject *src)
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
bool Empty () const
 
IndexType GetIndex (SizeValueType i) const
 
const LabelTypeGetLabel () const
 
const LineTypeGetLine (SizeValueType i) const
 
LineTypeGetLine (SizeValueType i)
 
SizeValueType GetNumberOfLines () const
 
bool HasIndex (const IndexType &idx) const
 
void Optimize ()
 
bool RemoveIndex (const IndexType &idx)
 
void SetLabel (const LabelType &label)
 
void Shift (OffsetType offset)
 
SizeValueType Size () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::LabelObject< TLabel, VImageDimension >
static AttributeType GetAttributeFromName (const std::string &s)
 
static std::string GetNameFromAttribute (const AttributeType &a)
 
static Pointer New ()
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = VImageDimension
 
- Static Public Attributes inherited from itk::LabelObject< TLabel, VImageDimension >
static const unsigned int ImageDimension
 
static const AttributeType LABEL
 

Protected Member Functions

 AttributesMapLabelObject ()
 
 ~AttributesMapLabelObject () override
 
- Protected Member Functions inherited from itk::LabelObject< TLabel, VImageDimension >
 LabelObject ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

AttributesMapType m_Attributes
 
PolygonPointerType m_Polygon
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 AttributesMapLabelObject (const Self &)=delete
 
void operator= (const Self &)=delete
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

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 173 of file otbAttributesMapLabelObject.h.

Member Typedef Documentation

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

Definition at line 208 of file otbAttributesMapLabelObject.h.

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

Definition at line 207 of file otbAttributesMapLabelObject.h.

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 206 of file otbAttributesMapLabelObject.h.

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

Definition at line 198 of file otbAttributesMapLabelObject.h.

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

Definition at line 182 of file otbAttributesMapLabelObject.h.

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

Definition at line 183 of file otbAttributesMapLabelObject.h.

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

Definition at line 201 of file otbAttributesMapLabelObject.h.

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 194 of file otbAttributesMapLabelObject.h.

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

Definition at line 180 of file otbAttributesMapLabelObject.h.

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

Template parameters typedef.

Definition at line 197 of file otbAttributesMapLabelObject.h.

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

Definition at line 203 of file otbAttributesMapLabelObject.h.

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

Definition at line 202 of file otbAttributesMapLabelObject.h.

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

Definition at line 181 of file otbAttributesMapLabelObject.h.

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

Definition at line 212 of file otbAttributesMapLabelObject.h.

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

Definition at line 211 of file otbAttributesMapLabelObject.h.

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

Standard class typedefs

Definition at line 178 of file otbAttributesMapLabelObject.h.

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

Definition at line 179 of file otbAttributesMapLabelObject.h.

Constructor & Destructor Documentation

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

Constructor

Definition at line 310 of file otbAttributesMapLabelObject.h.

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

Destructor

Definition at line 313 of file otbAttributesMapLabelObject.h.

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

The printself method

Member Function Documentation

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

This method is overloaded to add the copy of the attributes map.

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

Definition at line 277 of file otbAttributesMapLabelObject.h.

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
virtual::itk::LightObject::Pointer otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::CreateAnother ( void  ) const
virtual
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 235 of file otbAttributesMapLabelObject.h.

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 260 of file otbAttributesMapLabelObject.h.

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
virtual const char* otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::GetNameOfClass ( ) const
virtual
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 252 of file otbAttributesMapLabelObject.h.

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 291 of file otbAttributesMapLabelObject.h.

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 297 of file otbAttributesMapLabelObject.h.

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

Method for creation through the object factory.

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

The printself method

template<class TLabel , unsigned int VImageDimension, class TAttributesValue >
void otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
inlineoverrideprotectedvirtual
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 218 of file otbAttributesMapLabelObject.h.

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 227 of file otbAttributesMapLabelObject.h.

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

Set the polygon

Definition at line 303 of file otbAttributesMapLabelObject.h.

Member Data Documentation

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

Definition at line 191 of file otbAttributesMapLabelObject.h.

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

The attributes map

Definition at line 332 of file otbAttributesMapLabelObject.h.

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 336 of file otbAttributesMapLabelObject.h.


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