46 template<
class T,
int N>
struct DataSegment;
106 static const int lens[] = { 1, 2, 4, 4, 8 };
137 return organizedWidth > 0;
143 else return utils::Size(organizedWidth, numElements/organizedWidth);
177 size_t numElements=0,
icl32s organizedWidth=-1,
180 organizedWidth(organizedWidth),dataDepth(dataDepth),elemDim(elemDim){}
190 template<
class T,
int N>
216 if(len != other.
len){
244 return const_cast<DataSegmentBase*>(
this)->operator[](idx);
249 return operator[](x + organizedWidth * y );
254 return operator[](x + organizedWidth * y );
const icl8u * getDataPointer() const
returns the internal (strided) data pointer
Definition: DataSegmentBase.h:173
undocument this line if you encounter any issues!
Definition: Any.h:37
Bytes & operator=(const Bytes &other)
deep copy assignment operator
Definition: DataSegmentBase.h:215
const Bytes operator()(int x, int y) const
2D-index operator (only for organized data segments, const)
Definition: DataSegmentBase.h:253
static const Size null
null is w=0, h=0
Definition: Size.h:64
Ipp8u icl8u
8Bit unsigned integer type for the ICL
Definition: BasicTypes.h:64
icl32s organizedWidth
if > 0 , the data is 2D-organized
Definition: DataSegmentBase.h:126
icl8u * getDataPointer()
returns the internal (strided) data pointer
Definition: DataSegmentBase.h:169
Base class for point cloud data types.
Definition: PointCloudObjectBase.h:98
icl8u * data
data pointer (shallowly wrapped)
Definition: DataSegmentBase.h:195
core::depth dataDepth
underlying data depth
Definition: DataSegmentBase.h:129
size_t numElements
number of vector elements contained
Definition: DataSegmentBase.h:123
#define ICLGeom_API
Definition: CompatMacros.h:179
const icl8u operator[](int idx) const
index operator (const)
Definition: DataSegmentBase.h:211
const icl8u * end() const
iterator based access to the data end (const)
Definition: DataSegmentBase.h:233
Very simple Byte Vector class to provide binary access to DataSegmentBase data.
Definition: DataSegmentBase.h:194
const icl8u * begin() const
iterator based access to the data begin (const)
Definition: DataSegmentBase.h:230
Abstract data segment class.
Definition: DataSegmentBase.h:99
core::depth getDepth() const
returns the actual core::depth (data type) of the entries
Definition: DataSegmentBase.h:158
ICLQt_API ImgROI data(ImgQ &r)
creates full ROI ROI-struct
Ipp32s icl32s
32bit signed integer type for the ICL
Definition: BasicTypes.h:58
static int getSizeOf(core::depth d)
associcates a core::depth values and the (byte)-size of the corresponding type
Definition: DataSegmentBase.h:105
size_t stride
stride between elements
Definition: DataSegmentBase.h:120
icl8u & operator[](int idx)
index operator
Definition: DataSegmentBase.h:208
Size class of the ICL.
Definition: Size.h:61
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.
Definition: DataSegmentBase.h:176
int getStride() const
returns the internal stride used
Definition: DataSegmentBase.h:147
int len
Definition: DataSegmentBase.h:196
const Bytes operator[](int idx) const
linear index operator (const)
Definition: DataSegmentBase.h:243
icl8u * begin()
iterator based access to the data begin
Definition: DataSegmentBase.h:224
utils::Size getSize() const
returns the ordred size of the segment of utils::Size::null if it's not organized
Definition: DataSegmentBase.h:141
depth
determines the pixel type of an image (8Bit-int or 32Bit-float)
Definition: Types.h:60
icl8u * end()
iterator based access to the data end
Definition: DataSegmentBase.h:227
Base class for Exception handling in the ICL.
Definition: Exception.h:42
size_t elemDim
vector element dim
Definition: DataSegmentBase.h:132
bool isOrganized() const
returns, whether the segment is 2D-organized
Definition: DataSegmentBase.h:136
Bytes operator()(int x, int y)
2D-index operator (only for organized data segments)
Definition: DataSegmentBase.h:248
ICLCore_API unsigned int getSizeOf(depth eDepth)
return sizeof value for the given depth type
int getElemDim() const
returns the dimension of the contained elements
Definition: DataSegmentBase.h:163
int getDim() const
returns the number of contained byte elements
Definition: DataSegmentBase.h:205
void copy(const T *src, const T *srcEnd, T *dst)
moves data from source to destination array (no casting possible)
Definition: CoreFunctions.h:216
icl8u * data
data pointer orign
Definition: DataSegmentBase.h:111
The DataSegment class defines a strided data segment (or 1D or 2D ordred array of vectors)
Definition: DataSegment.h:147
Bytes operator[](int idx)
linear index operator
Definition: DataSegmentBase.h:238
Bytes(const Bytes &other)
copy constructor (also provivate)
Definition: DataSegmentBase.h:200
int getDim() const
returns the number of elements
Definition: DataSegmentBase.h:153