DGtal  1.5.beta
DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData > Struct Template Reference

#include <DGtal/topology/IndexedDigitalSurface.h>

Public Types

typedef Index Argument
 
typedef TData Data
 
typedef std::vector< DataStorage
 

Public Member Functions

 IndexedPropertyMap ()
 Default constructor. The object is invalid. More...
 
 IndexedPropertyMap (const Self &aSurface, Size s, Data def_data=Data())
 
 IndexedPropertyMap (const Self &aSurface, Storage &aStorage)
 
const Selfsurface () const
 
const Dataoperator() (Argument v) const
 
const Dataoperator[] (Argument v) const
 
Dataoperator[] (Argument v)
 
bool isValid () const
 
Size size () const
 
Storagestorage ()
 
const Storagestorage () const
 

Private Attributes

const SelfmySurface
 The associated indexed digital surface. More...
 
OwningOrAliasingPtr< StoragemyData
 An owned or aliased pointer to the vector of data. More...
 

Detailed Description

template<typename TDigitalSurfaceContainer>
template<typename TData>
struct DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >

This structure is used to define efficient maps between vertices and any data specified by type TData. The indexed digital surface provides a default vertex map for vertex positions.

Template Parameters
TDatathe value type for the map.
See also
positions
makeVertexMap
Note
This property map uses a vector structure as storage.

Definition at line 149 of file IndexedDigitalSurface.h.

Member Typedef Documentation

◆ Argument

template<typename TDigitalSurfaceContainer >
template<typename TData >
typedef Index DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::Argument

Definition at line 150 of file IndexedDigitalSurface.h.

◆ Data

template<typename TDigitalSurfaceContainer >
template<typename TData >
typedef TData DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::Data

Definition at line 151 of file IndexedDigitalSurface.h.

◆ Storage

template<typename TDigitalSurfaceContainer >
template<typename TData >
typedef std::vector<Data> DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::Storage

Definition at line 152 of file IndexedDigitalSurface.h.

Constructor & Destructor Documentation

◆ IndexedPropertyMap() [1/3]

template<typename TDigitalSurfaceContainer >
template<typename TData >
DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::IndexedPropertyMap ( )
inline

Default constructor. The object is invalid.

Definition at line 155 of file IndexedDigitalSurface.h.

155 : mySurface( 0 ), myData( 0 ) {}
OwningOrAliasingPtr< Storage > myData
An owned or aliased pointer to the vector of data.
const Self * mySurface
The associated indexed digital surface.

◆ IndexedPropertyMap() [2/3]

template<typename TDigitalSurfaceContainer >
template<typename TData >
DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::IndexedPropertyMap ( const Self aSurface,
Size  s,
Data  def_data = Data() 
)
inline

Creates an empty vertex property map

Parameters
aSurfacethe corresponding indexed digital surface.
sone more than the maximal allowed index (i.e. nb of elements).
def_datathe default value at initialization.

Definition at line 161 of file IndexedDigitalSurface.h.

162  : mySurface( &aSurface ),
163  myData( Storage( s, def_data ) )
164  {}

◆ IndexedPropertyMap() [3/3]

template<typename TDigitalSurfaceContainer >
template<typename TData >
DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::IndexedPropertyMap ( const Self aSurface,
Storage aStorage 
)
inline

Creates the IndexedPropertyMap that points to one that exists already.

Parameters
aSurfacethe corresponding indexed digital surface.
aStoragethe map to reference in this property map.
Note
This method is used to give to a user the map vertex -> position that is stored within the indexed digital surface.

Definition at line 173 of file IndexedDigitalSurface.h.

175  : mySurface( &aSurface ),
176  myData( &aStorage, false )
177  {}

Member Function Documentation

◆ isValid()

◆ operator()()

template<typename TDigitalSurfaceContainer >
template<typename TData >
const Data& DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::operator() ( Argument  v) const
inline

◆ operator[]() [1/2]

template<typename TDigitalSurfaceContainer >
template<typename TData >
Data& DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::operator[] ( Argument  v)
inline

◆ operator[]() [2/2]

template<typename TDigitalSurfaceContainer >
template<typename TData >
const Data& DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::operator[] ( Argument  v) const
inline

◆ size()

template<typename TDigitalSurfaceContainer >
template<typename TData >
Size DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::size ( ) const
inline

◆ storage() [1/2]

template<typename TDigitalSurfaceContainer >
template<typename TData >
Storage& DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::storage ( )
inline
Returns
a reference to the storage class (a vector of Data).

Definition at line 220 of file IndexedDigitalSurface.h.

220 { return *myData; }

References DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::myData.

◆ storage() [2/2]

template<typename TDigitalSurfaceContainer >
template<typename TData >
const Storage& DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::storage ( ) const
inline
Returns
a const reference to the storage class (a vector of Data).

Definition at line 223 of file IndexedDigitalSurface.h.

223 { return *myData; }

References DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::myData.

◆ surface()

template<typename TDigitalSurfaceContainer >
template<typename TData >
const Self& DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::surface ( ) const
inline

Field Documentation

◆ myData

◆ mySurface

template<typename TDigitalSurfaceContainer >
template<typename TData >
const Self* DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer >::IndexedPropertyMap< TData >::mySurface
private

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