Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::LabelMapWithAdjacency< TLabelObject > Class Template Reference

This class is a LabelMap with additionnal adjacency information. More...

#include <otbLabelMapWithAdjacency.h>

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

Public Types

typedef std::map< LabelType,
AdjacentLabelsContainerType
AdjacencyMapType
 
typedef std::set< LabelTypeAdjacentLabelsContainerType
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef itk::WeakPointer
< const Self
ConstWeakPointer
 
typedef TLabelObject LabelObjectType
 
typedef std::pair< LabelType,
LabelType
LabelPairType
 
typedef std::vector
< LabelPairType
LabelPairVectorType
 
typedef LabelObjectType::LabelType LabelType
 
typedef
Functor::MergeLabelObjectFunctor
< TLabelObject > 
MergeFunctorType
 
typedef itk::SmartPointer< SelfPointer
 
typedef LabelMapWithAdjacency Self
 
typedef itk::LabelMap
< TLabelObject > 
Superclass
 
- Public Types inherited from itk::LabelMap< TLabelObject >
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef WeakPointer< const SelfConstWeakPointer
 
typedef Superclass::DirectionType DirectionType
 
typedef Matrix
< SpacePrecisionType,
VImageDimension,
VImageDimension > 
DirectionType
 
typedef Superclass::IndexType IndexType
 
typedef Index< VImageDimension > IndexType
 
typedef IndexType::IndexValueType IndexValueType
 
typedef LabelObjectType::Pointer LabelObjectPointerType
 
typedef TLabelObject LabelObjectType
 
typedef std::vector
< LabelObjectPointerType
LabelObjectVectorType
 
typedef LabelObjectType::LabelType LabelType
 
typedef std::vector< LabelTypeLabelVectorType
 
typedef SizeValueType LengthType
 
typedef Superclass::OffsetType OffsetType
 
typedef Offset< VImageDimension > OffsetType
 
typedef Superclass::OffsetValueType OffsetValueType
 
typedef OffsetType::OffsetValueType OffsetValueType
 
typedef LabelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::PointType PointType
 
typedef Point< PointValueType,
VImageDimension > 
PointType
 
typedef SpacePrecisionType PointValueType
 
typedef Superclass::RegionType RegionType
 
typedef ImageRegion
< VImageDimension > 
RegionType
 
typedef ImageBase Self
 
typedef LabelMap Self
 
typedef Superclass::SizeType SizeType
 
typedef Size< VImageDimension > SizeType
 
typedef SizeType::SizeValueType SizeValueType
 
typedef Superclass::SizeValueType SizeValueType
 
typedef Vector
< SpacingValueType,
VImageDimension > 
SpacingType
 
typedef Superclass::SpacingType SpacingType
 
typedef SpacePrecisionType SpacingValueType
 
typedef DataObject Superclass
 
typedef ImageBase
< TLabelObject::ImageDimension > 
Superclass
 

Public Member Functions

void AddAdjacentLabel (LabelType label1, LabelType label2)
 
void ClearAdjacentLabels (LabelType label)
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
const AdjacencyMapTypeGetAdjacencyMap () const
 
const AdjacentLabelsContainerTypeGetAdjacentLabels (LabelType label) const
 
virtual const char * GetNameOfClass () const
 
void MergeLabels (const LabelType &label1, const LabelType &label2)
 
void MergeLabels (const LabelPairVectorType &labels)
 
void RemoveAdjacentLabel (LabelType label1, LabelType label2)
 
void SetAdjacencyMap (const AdjacencyMapType &amap)
 
- Public Member Functions inherited from itk::LabelMap< TLabelObject >
void AddLabelObject (LabelObjectType *labelObject)
 
void AddPixel (const IndexType &idx, const LabelType &label)
 
virtual void Allocate (bool initialize=false) ITK_OVERRIDE
 
void ClearLabels ()
 
IndexType ComputeIndex (OffsetValueType offset) const
 
OffsetValueType ComputeOffset (const IndexType &ind) const
 
virtual void CopyInformation (const DataObject *data) ITK_OVERRIDE
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual LabelType GetBackgroundValue () const
 
virtual const RegionTypeGetBufferedRegion () const
 
virtual const DirectionTypeGetDirection () const
 
virtual const DirectionTypeGetInverseDirection () const
 
LabelObjectTypeGetLabelObject (const LabelType &label)
 
const LabelObjectTypeGetLabelObject (const LabelType &label) const
 
LabelObjectTypeGetLabelObject (const IndexType &idx) const
 
LabelObjectVectorType GetLabelObjects () const
 
LabelVectorType GetLabels () const
 
virtual const RegionTypeGetLargestPossibleRegion () const
 
LabelObjectTypeGetNthLabelObject (const SizeValueType &pos)
 
const LabelObjectTypeGetNthLabelObject (const SizeValueType &pos) const
 
virtual unsigned int GetNumberOfComponentsPerPixel () const
 
Self::SizeValueType GetNumberOfLabelObjects () const
 
const OffsetValueTypeGetOffsetTable () const
 
virtual const PointTypeGetOrigin () const
 
const LabelTypeGetPixel (const IndexType &idx) const
 
virtual const RegionTypeGetRequestedRegion () const
 
virtual const SpacingTypeGetSpacing () const
 
virtual void Graft (const DataObject *data)
 
bool HasLabel (const LabelType label) const
 
virtual void Initialize ()
 
void Optimize ()
 
void PrintLabelObjects (std::ostream &os) const
 
void PrintLabelObjects () const
 
void PushLabelObject (LabelObjectType *labelObject)
 
void RemoveLabel (const LabelType &label)
 
void RemoveLabelObject (LabelObjectType *labelObject)
 
void RemovePixel (const IndexType &idx, const LabelType &label)
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion () ITK_OVERRIDE
 
virtual void SetBackgroundValue (LabelType _arg)
 
virtual void SetBufferedRegion (const RegionType &region)
 
virtual void SetDirection (const DirectionType &direction)
 
virtual void SetLargestPossibleRegion (const RegionType &region)
 
void SetLine (const IndexType &idx, const LengthType &length, const LabelType &label)
 
virtual void SetNumberOfComponentsPerPixel (unsigned int)
 
virtual void SetOrigin (const double origin[VImageDimension])
 
virtual void SetOrigin (const float origin[VImageDimension])
 
virtual void SetOrigin (PointType _arg)
 
void SetPixel (const IndexType &idx, const LabelType &label)
 
virtual void SetRegions (const SizeType &size)
 
virtual void SetRegions (const RegionType &region)
 
virtual void SetRequestedRegion (const RegionType &region)
 
virtual void SetRequestedRegion (const DataObject *data) ITK_OVERRIDE
 
virtual void SetRequestedRegionToLargestPossibleRegion () ITK_OVERRIDE
 
virtual void SetSpacing (const SpacingType &spacing)
 
virtual void SetSpacing (const float spacing[VImageDimension])
 
virtual void SetSpacing (const double spacing[VImageDimension])
 
void TransformContinuousIndexToPhysicalPoint (const ContinuousIndex< TIndexRep, VImageDimension > &index, Point< TCoordRep, VImageDimension > &point) const
 
void TransformIndexToPhysicalPoint (const IndexType &index, Point< TCoordRep, VImageDimension > &point) const
 
void TransformLocalVectorToPhysicalVector (const FixedArray< TCoordRep, VImageDimension > &inputGradient, FixedArray< TCoordRep, VImageDimension > &outputGradient) const
 
bool TransformPhysicalPointToContinuousIndex (const Point< TCoordRep, VImageDimension > &point, ContinuousIndex< TIndexRep, VImageDimension > &index) const
 
bool TransformPhysicalPointToIndex (const Point< TCoordRep, VImageDimension > &point, IndexType &index) const
 
void TransformPhysicalVectorToLocalVector (const FixedArray< TCoordRep, VImageDimension > &inputGradient, FixedArray< TCoordRep, VImageDimension > &outputGradient) const
 
virtual void UpdateOutputData () ITK_OVERRIDE
 
virtual void UpdateOutputInformation () ITK_OVERRIDE
 
virtual bool VerifyRequestedRegion () ITK_OVERRIDE
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::LabelMap< TLabelObject >
static unsigned int GetImageDimension ()
 
static Pointer New ()
 
static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = LabelObjectType::ImageDimension
 
- Static Public Attributes inherited from itk::LabelMap< TLabelObject >
static const unsigned int ImageDimension
 

Protected Member Functions

 LabelMapWithAdjacency ()
 
virtual ~LabelMapWithAdjacency ()
 
virtual void CopyInformation (itk::DataObject *data)
 
void PrintSelf (std::ostream &os, itk::Indent indent) const
 
- Protected Member Functions inherited from itk::LabelMap< TLabelObject >
 LabelMap ()
 
 ~ImageBase ()
 
virtual ~LabelMap ()
 
virtual void ComputeIndexToPhysicalPointMatrices ()
 
void ComputeOffsetTable ()
 
 ImageBase ()
 
virtual void InitializeBufferedRegion (void)
 
void PrintSelf (std::ostream &os, Indent indent) const
 

Private Member Functions

 LabelMapWithAdjacency (const Self &)
 
void operator= (const Self &)
 

Private Attributes

AdjacencyMapType m_AdjacencyMap
 

Additional Inherited Members

- Protected Attributes inherited from itk::LabelMap< TLabelObject >
DirectionType m_Direction
 
DirectionType m_IndexToPhysicalPoint
 
DirectionType m_InverseDirection
 
PointType m_Origin
 
DirectionType m_PhysicalPointToIndex
 
SpacingType m_Spacing
 

Detailed Description

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

This class is a LabelMap with additionnal adjacency information.

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

Definition at line 36 of file otbLabelMapWithAdjacency.h.

Member Typedef Documentation

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 68 of file otbLabelMapWithAdjacency.h.

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

A set containing adjacent labels

Definition at line 65 of file otbLabelMapWithAdjacency.h.

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

Definition at line 43 of file otbLabelMapWithAdjacency.h.

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

Definition at line 44 of file otbLabelMapWithAdjacency.h.

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

Typedef of the LabelObject

Definition at line 50 of file otbLabelMapWithAdjacency.h.

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

A pair of labels

Definition at line 74 of file otbLabelMapWithAdjacency.h.

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

A vector of pair of labels

Definition at line 77 of file otbLabelMapWithAdjacency.h.

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

Label typedef support.

Definition at line 62 of file otbLabelMapWithAdjacency.h.

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

The merging functor

Definition at line 71 of file otbLabelMapWithAdjacency.h.

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

Definition at line 42 of file otbLabelMapWithAdjacency.h.

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

Standard class typedefs

Definition at line 40 of file otbLabelMapWithAdjacency.h.

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

Definition at line 41 of file otbLabelMapWithAdjacency.h.

Constructor & Destructor Documentation

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

Constructor

Definition at line 214 of file otbLabelMapWithAdjacency.h.

template<class TLabelObject >
virtual otb::LabelMapWithAdjacency< TLabelObject >::~LabelMapWithAdjacency ( )
inlineprotectedvirtual

Destructor

Definition at line 216 of file otbLabelMapWithAdjacency.h.

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

Member Function Documentation

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 91 of file otbLabelMapWithAdjacency.h.

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

Clear the adjacent labels of a given label

Definition at line 106 of file otbLabelMapWithAdjacency.h.

template<class TLabelObject >
virtual void otb::LabelMapWithAdjacency< TLabelObject >::CopyInformation ( itk::DataObject data)
inlineprotectedvirtual

Re-implement CopyInformation to pass the adjancency graph through

Definition at line 225 of file otbLabelMapWithAdjacency.h.

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

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

Definition at line 85 of file otbLabelMapWithAdjacency.h.

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 124 of file otbLabelMapWithAdjacency.h.

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

Run-time type information (and related methods).

Reimplemented from itk::LabelMap< TLabelObject >.

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 138 of file otbLabelMapWithAdjacency.h.

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 186 of file otbLabelMapWithAdjacency.h.

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

Method for creation through the object factory.

template<class TLabelObject >
void otb::LabelMapWithAdjacency< TLabelObject >::operator= ( const Self )
private
template<class TLabelObject >
void otb::LabelMapWithAdjacency< TLabelObject >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
inlineprotectedvirtual

Printself

Reimplemented from itk::ImageBase< TLabelObject::ImageDimension >.

Definition at line 218 of file otbLabelMapWithAdjacency.h.

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 115 of file otbLabelMapWithAdjacency.h.

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

Set/Get the adjacency map

Definition at line 80 of file otbLabelMapWithAdjacency.h.

Member Data Documentation

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 59 of file otbLabelMapWithAdjacency.h.

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

The adjacency map

Definition at line 243 of file otbLabelMapWithAdjacency.h.

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


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