Image Component Library (ICL)
Public Types | Public Member Functions | List of all members
icl::core::DataSegment< T, 1 > Struct Template Reference

template specialization for data-segments, where each entry is just 1D More...

#include <DataSegment.h>

Inheritance diagram for icl::core::DataSegment< T, 1 >:
icl::core::DataSegmentBase

Public Types

typedef T VectorType
 vector typedef More...
 

Public Member Functions

 DataSegment (T *data=0, size_t stride=0, size_t numElements=0, icl32s organizedWidth=-1)
 Constructor (basically passes all parameters to the Base class) More...
 
T & operator[] (int idx)
 linear index operator (specialized to return a T& directly) More...
 
const T & operator[] (int idx) const
 linear index operator (specialized to return a T& directly, const) More...
 
T & operator() (int x, int y)
 2D-index operator (only for organized data segments, specialized to return a T& directly) More...
 
const T & operator() (int x, int y) const
 2D-index operator (only for organized data segments, specialized to return a T& directly, const) More...
 
template<class OtherT >
void deepCopy (DataSegment< OtherT, 1 > dst) const
 copies the data segment to into another element-wise More...
 
template<class OtherT >
bool equals (DataSegment< OtherT, 1 > dst, float tollerance=1.0e-5) const
 
template<class Fill >
void fillScalar (Fill scalarValue)
 fills each scalar value of each entry with given value More...
 
template<class Fill >
void fill (Fill vecValue)
 fills each vector entry with given value More...
 
- Public Member Functions inherited from icl::core::DataSegmentBase
bool isOrganized () const
 returns, whether the segment is 2D-organized More...
 
utils::Size getSize () const
 returns the ordred size of the segment of utils::Size::null if it's not organized More...
 
int getStride () const
 returns the internal stride used More...
 
int getDim () const
 returns the number of elements More...
 
core::depth getDepth () const
 returns the actual core::depth (data type) of the entries More...
 
int getElemDim () const
 returns the dimension of the contained elements More...
 
icl8ugetDataPointer ()
 returns the internal (strided) data pointer More...
 
const icl8ugetDataPointer () const
 returns the internal (strided) data pointer More...
 
 DataSegmentBase (void *data=0, size_t stride=0, size_t numElements=0, icl32s organizedWidth=-1, core::depth dataDepth=core::depth8u, size_t elemDim=0)
 Constructor with given parameters. More...
 
template<class T , int N>
const DataSegment< T, N > & as () const
 shallow and save cast from data segment base to special data segment version More...
 
Bytes operator[] (int idx)
 linear index operator More...
 
const Bytes operator[] (int idx) const
 linear index operator (const) More...
 
Bytes operator() (int x, int y)
 2D-index operator (only for organized data segments) More...
 
const Bytes operator() (int x, int y) const
 2D-index operator (only for organized data segments, const) More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from icl::core::DataSegmentBase
static int getSizeOf (core::depth d)
 associcates a core::depth values and the (byte)-size of the corresponding type More...
 
- Protected Attributes inherited from icl::core::DataSegmentBase
icl8udata
 data pointer orign More...
 
size_t stride
 stride between elements More...
 
size_t numElements
 number of vector elements contained More...
 
icl32s organizedWidth
 if > 0 , the data is 2D-organized More...
 
core::depth dataDepth
 underlying data depth More...
 
size_t elemDim
 vector element dim More...
 

Detailed Description

template<class T>
struct icl::core::DataSegment< T, 1 >

template specialization for data-segments, where each entry is just 1D

If the vector entries are 1D only, no extra vector struct is created and returned for the single vector elements. Instead, all access functions operator[idx] and operator(x,y) are will just return T-references instead of math::FixedColVector<T,1>

Member Typedef Documentation

◆ VectorType

template<class T >
typedef T icl::core::DataSegment< T, 1 >::VectorType

vector typedef

Constructor & Destructor Documentation

◆ DataSegment()

template<class T >
icl::core::DataSegment< T, 1 >::DataSegment ( T *  data = 0,
size_t  stride = 0,
size_t  numElements = 0,
icl32s  organizedWidth = -1 
)
inline

Constructor (basically passes all parameters to the Base class)

Member Function Documentation

◆ deepCopy()

template<class T >
template<class OtherT >
void icl::core::DataSegment< T, 1 >::deepCopy ( DataSegment< OtherT, 1 >  dst) const
inline

copies the data segment to into another element-wise

◆ equals()

template<class T >
template<class OtherT >
bool icl::core::DataSegment< T, 1 >::equals ( DataSegment< OtherT, 1 >  dst,
float  tollerance = 1.0e-5 
) const
inline

◆ fill()

template<class T >
template<class Fill >
void icl::core::DataSegment< T, 1 >::fill ( Fill  vecValue)
inline

fills each vector entry with given value

◆ fillScalar()

template<class T >
template<class Fill >
void icl::core::DataSegment< T, 1 >::fillScalar ( Fill  scalarValue)
inline

fills each scalar value of each entry with given value

equal to fill in this specialization

◆ operator()() [1/2]

template<class T >
T& icl::core::DataSegment< T, 1 >::operator() ( int  x,
int  y 
)
inline

2D-index operator (only for organized data segments, specialized to return a T& directly)

◆ operator()() [2/2]

template<class T >
const T& icl::core::DataSegment< T, 1 >::operator() ( int  x,
int  y 
) const
inline

2D-index operator (only for organized data segments, specialized to return a T& directly, const)

◆ operator[]() [1/2]

template<class T >
T& icl::core::DataSegment< T, 1 >::operator[] ( int  idx)
inline

linear index operator (specialized to return a T& directly)

◆ operator[]() [2/2]

template<class T >
const T& icl::core::DataSegment< T, 1 >::operator[] ( int  idx) const
inline

linear index operator (specialized to return a T& directly, const)


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