![]() |
Orfeo Toolbox
3.16
|
A LabelObject with a generic attributes map. More...
#include <otbAttributesMapLabelObject.h>
Inheritance diagram for otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >:
Collaboration diagram for otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >:Public Member Functions | |
| void | AddIndex (const IndexType &idx) |
| void | AddLine (const IndexType &idx, const LengthType &length) |
| void | AddLine (const LineType &line) |
| void | CopyAllFrom (const Self *src) |
| virtual void | CopyAttributesFrom (const LabelObjectType *lo) |
| virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
| virtual void | Delete () |
| bool | Empty () const |
| AttributesValueType | GetAttribute (const char *name) const |
| std::vector< std::string > | GetAvailableAttributes () const |
| IndexType | GetIndex (SizeValueType offset) const |
| const LabelType & | GetLabel () const |
| const LineType & | GetLine (SizeValueType i) const |
| LineType & | GetLine (SizeValueType i) |
| const LineContainerType & | GetLineContainer () const |
| LineContainerType & | GetLineContainer () |
| virtual const char * | GetNameOfClass () const |
| unsigned int | GetNumberOfAttributes () const |
| SizeValueType | GetNumberOfLines () const |
| const PolygonType * | GetPolygon () const |
| PolygonType * | GetPolygon () |
| virtual int | GetReferenceCount () const |
| bool | HasIndex (const IndexType &idx) const |
| void | Optimize () |
| void | Print (std::ostream &os, Indent indent=0) const |
| virtual void | Register () const |
| void | SetAttribute (const char *name, AttributesValueType value) |
| void | SetAttribute (const std::string &name, AttributesValueType value) |
| void | SetLabel (const LabelType &label) |
| void | SetLineContainer (const LineContainerType &lineContainer) |
| void | SetPolygon (PolygonType *p) |
| virtual void | SetReferenceCount (int) |
| SizeValueType | Size () const |
| virtual void | UnRegister () const |
Static Public Member Functions | |
| static void | BreakOnError () |
| static AttributeType | GetAttributeFromName (const std::string &s) |
| static std::string | GetNameFromAttribute (const AttributeType &a) |
| static Pointer | New () |
Static Public Attributes | |
| static const unsigned int | ImageDimension = VImageDimension |
| static const AttributeType | LABEL = 0 |
Protected Types | |
| typedef int | InternalReferenceCountType |
Protected Member Functions | |
| AttributesMapLabelObject () | |
| virtual | ~AttributesMapLabelObject () |
| virtual void | PrintHeader (std::ostream &os, Indent indent) const |
| void | PrintSelf (std::ostream &os, itk::Indent indent) const |
| virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
Protected Attributes | |
| InternalReferenceCountType | m_ReferenceCount |
| SimpleFastMutexLock | m_ReferenceCountLock |
Private Member Functions | |
| AttributesMapLabelObject (const Self &) | |
| void | operator= (const Self &) |
Private Attributes | |
| AttributesMapType | m_Attributes |
| PolygonPointerType | m_Polygon |
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 to store any custom attributes as necessary.
Definition at line 155 of file otbAttributesMapLabelObject.h.
| typedef AttributesMapType::const_iterator otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::AttributesMapConstIteratorType |
Definition at line 191 of file otbAttributesMapLabelObject.h.
| typedef AttributesMapType::iterator otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::AttributesMapIteratorType |
Definition at line 190 of file otbAttributesMapLabelObject.h.
| typedef std::map<std::string, AttributesValueType> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::AttributesMapType |
Map container typedefs.
Definition at line 189 of file otbAttributesMapLabelObject.h.
| typedef TAttributesValue otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::AttributesValueType |
Definition at line 180 of file otbAttributesMapLabelObject.h.
|
inherited |
Definition at line 79 of file itkLabelObject.h.
| typedef itk::SmartPointer<const Self> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::ConstPointer |
Definition at line 164 of file otbAttributesMapLabelObject.h.
| typedef itk::WeakPointer<const Self> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::ConstWeakPointer |
Definition at line 165 of file otbAttributesMapLabelObject.h.
| typedef Superclass::IndexType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::IndexType |
Definition at line 183 of file otbAttributesMapLabelObject.h.
|
protectedinherited |
Define the type of the reference count according to the target. This allows the use of atomic operations
Definition at line 137 of file itkLightObject.h.
| typedef itk::LabelMap<Self> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::LabelMapType |
Type of a label map using an AttributesMapLabelObject.
Definition at line 176 of file otbAttributesMapLabelObject.h.
| typedef Superclass::LabelObjectType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::LabelObjectType |
Definition at line 162 of file otbAttributesMapLabelObject.h.
| typedef TLabel otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::LabelType |
Template parameters typedef.
Definition at line 179 of file otbAttributesMapLabelObject.h.
| typedef Superclass::LengthType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::LengthType |
Definition at line 185 of file otbAttributesMapLabelObject.h.
| typedef Superclass::LineContainerType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::LineContainerType |
Definition at line 186 of file otbAttributesMapLabelObject.h.
| typedef Superclass::LineType otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::LineType |
Definition at line 184 of file otbAttributesMapLabelObject.h.
| typedef itk::SmartPointer<Self> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::Pointer |
Definition at line 163 of file otbAttributesMapLabelObject.h.
| typedef PolygonType::Pointer otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::PolygonPointerType |
Definition at line 195 of file otbAttributesMapLabelObject.h.
| typedef Polygon<double> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::PolygonType |
Definition at line 194 of file otbAttributesMapLabelObject.h.
| typedef AttributesMapLabelObject otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::Self |
Standard class typedefs
Definition at line 160 of file otbAttributesMapLabelObject.h.
|
inherited |
Definition at line 80 of file itkLabelObject.h.
| typedef itk::LabelObject<TLabel, VImageDimension> otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::Superclass |
Definition at line 161 of file otbAttributesMapLabelObject.h.
|
inlineprotected |
Constructor
Definition at line 292 of file otbAttributesMapLabelObject.h.
|
inlineprotectedvirtual |
Destructor
Definition at line 294 of file otbAttributesMapLabelObject.h.
|
private |
|
inherited |
Add an index to the object. If the index is already in the object, the index can be found several time in the object.
Definition at line 106 of file itkLabelObject.txx.
References itk::LabelObjectLine< VImageDimension >::GetLength(), itk::LabelObjectLine< VImageDimension >::IsNextIndex(), and itk::LabelObjectLine< VImageDimension >::SetLength().
|
inherited |
Add a new line to the object, without any check.
Definition at line 128 of file itkLabelObject.txx.
|
inherited |
Add a new line to the object, without any check.
Definition at line 140 of file itkLabelObject.txx.
|
staticinherited |
This method is called when itkExceptionMacro executes. It allows the debugger to break on error.
Definition at line 149 of file itkLightObject.cxx.
|
inherited |
Copy the lines, the label and the attributes from another node.
Definition at line 252 of file itkLabelObject.txx.
References NULL.
|
inlinevirtual |
This method is overloaded to add the copy of the attributes map.
Reimplemented from itk::LabelObject< TLabel, VImageDimension >.
Reimplemented in otb::AttributesMapLabelObjectWithClassLabel< TLabel, VImageDimension, TAttributesValue, TClassLabel >.
Definition at line 259 of file otbAttributesMapLabelObject.h.
References otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::m_Attributes, and NULL.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::LightObject.
Reimplemented in otb::AttributesMapLabelObjectWithClassLabel< TLabel, VImageDimension, TAttributesValue, TClassLabel >.
|
virtualinherited |
Delete an itk object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting.
Delete a itk object. This method should always be used to delete an object when the new operator was used to create it. Using the C++ delete method will not work with reference counting.
Definition at line 88 of file itkLightObject.cxx.
|
inherited |
Definition at line 206 of file itkLabelObject.txx.
|
inline |
Returns the attribute corresponding to name
Definition at line 218 of file otbAttributesMapLabelObject.h.
|
staticinherited |
Definition at line 37 of file itkLabelObject.txx.
|
inline |
Returns the list of available attributes
Definition at line 242 of file otbAttributesMapLabelObject.h.
|
inherited |
Definition at line 213 of file itkLabelObject.txx.
References itk::Index< VIndexDimension >::GetIndex().
|
inherited |
Set/Get the label associated with the object.
Set/Get the label associated with that object.
Definition at line 66 of file itkLabelObject.txx.
|
inherited |
Definition at line 178 of file itkLabelObject.txx.
|
inherited |
Definition at line 185 of file itkLabelObject.txx.
|
inherited |
Return the line container of this object
Definition at line 149 of file itkLabelObject.txx.
|
inherited |
Definition at line 156 of file itkLabelObject.txx.
|
staticinherited |
Definition at line 50 of file itkLabelObject.txx.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::LabelObject< TLabel, VImageDimension >.
Reimplemented in otb::AttributesMapLabelObjectWithClassLabel< TLabel, VImageDimension, TAttributesValue, TClassLabel >.
|
inline |
Returns the total number of attributes
Definition at line 234 of file otbAttributesMapLabelObject.h.
|
inherited |
Definition at line 170 of file itkLabelObject.txx.
|
inline |
Return the polygon (const version)
Definition at line 273 of file otbAttributesMapLabelObject.h.
|
inline |
Return the polygon (non const version)
Definition at line 279 of file otbAttributesMapLabelObject.h.
|
inlinevirtualinherited |
Gets the reference count on this object.
Definition at line 105 of file itkLightObject.h.
|
inherited |
Return true if the object contain the given index and false otherwise. Worst case complexity is O(L) where L is the number of lines in the object.
Definition at line 85 of file itkLabelObject.txx.
|
static |
Method for creation through the object factory.
|
private |
|
inherited |
Reorder the lines, merge the touching lines and ensure that no pixel is covered by two lines
Definition at line 265 of file itkLabelObject.txx.
References itk::LabelObjectLine< VImageDimension >::GetIndex(), itk::Index< VIndexDimension >::GetIndex(), and itk::LabelObjectLine< VImageDimension >::GetLength().
|
inherited |
Cause the object to print itself out.
Avoid DLL boundary problems. This function will be common to all itk objects. It just calls the header/self/trailer virtual print methods, which can be overriden by subclasses (any itk object).
Definition at line 135 of file itkLightObject.cxx.
References itk::Indent::GetNextIndent().
Referenced by itk::operator<<().
|
protectedvirtualinherited |
Define a default print header for all objects.
Definition at line 320 of file itkLightObject.cxx.
|
inlineprotectedvirtual |
The printself method
Reimplemented from itk::LightObject.
Reimplemented in otb::AttributesMapLabelObjectWithClassLabel< TLabel, VImageDimension, TAttributesValue, TClassLabel >.
Definition at line 297 of file otbAttributesMapLabelObject.h.
|
protectedvirtualinherited |
Define a default print trailer for all objects.
Definition at line 331 of file itkLightObject.cxx.
|
virtualinherited |
Increase the reference count (mark as used by another object).
Reimplemented in itk::ExceptionObject::ReferenceCountedExceptionData, and itk::Object.
Definition at line 160 of file itkLightObject.cxx.
Referenced by itk::ExceptionObject::ReferenceCountedExceptionData::Register().
|
inline |
Set an attribute value. If the key name already exists in the map, the value is overwritten.
Definition at line 201 of file otbAttributesMapLabelObject.h.
|
inline |
Set an attribute value. If the key name already exists in the map, the value is overwritten.
Definition at line 210 of file otbAttributesMapLabelObject.h.
|
inherited |
Definition at line 73 of file itkLabelObject.txx.
|
inherited |
Definition at line 163 of file itkLabelObject.txx.
|
inline |
Set the polygon
Definition at line 285 of file otbAttributesMapLabelObject.h.
|
virtualinherited |
Sets the reference count on this object. This is a dangerous method, use it with care.
Sets the reference count (use with care)
Reimplemented in itk::Object.
Definition at line 244 of file itkLightObject.cxx.
|
inherited |
Definition at line 192 of file itkLabelObject.txx.
|
virtualinherited |
Decrease the reference count (release by another object).
Reimplemented in itk::ExceptionObject::ReferenceCountedExceptionData, and itk::Object.
Definition at line 192 of file itkLightObject.cxx.
Referenced by itk::LightObject::New(), and itk::ExceptionObject::ReferenceCountedExceptionData::UnRegister().
|
static |
Definition at line 173 of file otbAttributesMapLabelObject.h.
|
staticinherited |
Definition at line 82 of file itkLabelObject.h.
|
private |
The attributes map
Definition at line 312 of file otbAttributesMapLabelObject.h.
Referenced by otb::AttributesMapLabelObject< TLabel, VImageDimension, TAttributesValue >::CopyAttributesFrom().
|
private |
The polygon corresponding to the label object. Caution, this will be empty by default
Definition at line 316 of file otbAttributesMapLabelObject.h.
|
mutableprotectedinherited |
Number of uses of this object by other objects.
Definition at line 141 of file itkLightObject.h.
|
mutableprotectedinherited |
Mutex lock to protect modification to the reference count
Definition at line 144 of file itkLightObject.h.