ML Reference
|
ImageVector is the 6D TVector specialization used by the ML for all image indexing. More...
#include <mlImageVector.h>
Public Types | |
typedef TVector< TVector6DBase < CompIntType > > | ParentClass |
Parent class of this class. | |
typedef ParentClass::ComponentType | ComponentType |
Integer type used by this vector. | |
Public Member Functions | |
TImageVector () | |
Constructor. All components are initialized to 0. | |
TImageVector (const ParentClass &v) | |
Copy constructor from Base class. | |
TImageVector (const ComponentType i) | |
Constructor which initializes all components to i. | |
template<typename T2IntType > | |
TImageVector (const TImageVector< T2IntType > &v2) | |
Copy constructor from another TVector of same or other integer type, values are cast. | |
TImageVector (const ComponentType xp, const TImageVector< ComponentType > &p) | |
Constructor which assigns X to x and copies other elements from p. | |
void | set (const ComponentType v=0) |
Set all components to v or - if v is not specified - to 0. | |
void | set (const ParentClass &v) |
Like assignment operator. | |
TImageVector (const MLint num, const ComponentType *const arr, const ComponentType deflt) | |
Constructor which initializes the vector components by copying them from arr[0] ,..., arr[num-1]. | |
TImageVector (const ComponentType xp, const ComponentType yp, const ComponentType zp, const ComponentType cp, const ComponentType tp, const ComponentType up) | |
Constructor which initializes all components with the values x, y, z, c, t and u. | |
TImageVector (const Vector6 &v6) | |
Copy the six double components of v6 into x, ..., u, respectively. | |
void | set (const ComponentType vx, const ComponentType vy, const ComponentType vz=0, const ComponentType vc=0, const ComponentType vt=0, const ComponentType vu=0) |
Set vector to (vx, vy, vz, vc, vt, vu). Not passed components are set to 0. | |
void | get (ComponentType *const xp=NULL, ComponentType *const yp=NULL, ComponentType *const zp=NULL, ComponentType *const cp=NULL, ComponentType *const tp=NULL, ComponentType *const up=NULL) const |
Return the subset of those Vector components whose corresponding pointers are not NULL. | |
bool | iterate (const TImageVector< ComponentType > &ext) |
Coordinate incrementation/iterator function inside ext. | |
Vector6 | toVector6 () const |
Get vector contents as Vector6. | |
Deprecated | |
Vector6 | getVec6 () const |
Static Public Member Functions | |
Properties of an image of the ML. | |
static MLint | dim () |
Returns dimension the ML calculates with. |
ImageVector is the 6D TVector specialization used by the ML for all image indexing.
It uses MLint as default for CompIntType and TVector6DBase<CompIntType> as container type for specialized access to array member with x,y,z,c,t, and u.
In contrast to the base class TVector the members are specialized to MLMaxImageDimension dimensions to implement dedicated functionality for ML images. This class can also be instantiated with arguments or other CompIntType arguments to compile with an arbitrary integer base type.
Example for vector initialization:
ImageVector p; p.x=1; p.y=2; p.z=3; p.c=4; p.t=5; p.u=6; // or ImageVector p; p[0]=3; p[1]=5; p[2]=7; p[3]=9; p[4]=11; p[5]=13; // or ImageVector p; p.set(3, 5, 7, 9, 11, 13); // or ImageVector q(4, p); // or p = ImageVector(1,2,3,4,5,6); // or ImageVector p(1,2,3,4,5,6);
Notes:
Definition at line 132 of file mlImageVector.h.
typedef ParentClass::ComponentType ml::TImageVector< CompIntType >::ComponentType |
Integer type used by this vector.
Reimplemented from ml::TVector< TVector6DBase< CompIntType > >.
Definition at line 139 of file mlImageVector.h.
typedef TVector<TVector6DBase<CompIntType> > ml::TImageVector< CompIntType >::ParentClass |
Parent class of this class.
Reimplemented from ml::TVector< TVector6DBase< CompIntType > >.
Definition at line 136 of file mlImageVector.h.
ml::TImageVector< CompIntType >::TImageVector | ( | ) | [inline] |
Constructor. All components are initialized to 0.
Definition at line 151 of file mlImageVector.h.
ml::TImageVector< CompIntType >::TImageVector | ( | const ParentClass & | v | ) | [inline] |
Copy constructor from Base class.
This allows the usage of the ParentClass objects of the same ComponentType in operators using the TImageVector.
Definition at line 155 of file mlImageVector.h.
ml::TImageVector< CompIntType >::TImageVector | ( | const ComponentType | i | ) | [inline, explicit] |
Constructor which initializes all components to i.
Definition at line 158 of file mlImageVector.h.
ml::TImageVector< CompIntType >::TImageVector | ( | const TImageVector< T2IntType > & | v2 | ) | [inline, explicit] |
Copy constructor from another TVector of same or other integer type, values are cast.
Only valid elements are copied if vectors have different lengths.
Definition at line 163 of file mlImageVector.h.
ml::TImageVector< CompIntType >::TImageVector | ( | const ComponentType | xp, |
const TImageVector< ComponentType > & | p | ||
) | [inline] |
Constructor which assigns X to x and copies other elements from p.
Definition at line 166 of file mlImageVector.h.
ml::TImageVector< CompIntType >::TImageVector | ( | const MLint | num, |
const ComponentType *const | arr, | ||
const ComponentType | deflt | ||
) | [inline] |
Constructor which initializes the vector components by copying them from arr[0] ,..., arr[num-1].
All other elements are initialized to the value deflt. arr must have at least num elements.
Definition at line 177 of file mlImageVector.h.
ml::TImageVector< CompIntType >::TImageVector | ( | const ComponentType | xp, |
const ComponentType | yp, | ||
const ComponentType | zp, | ||
const ComponentType | cp, | ||
const ComponentType | tp, | ||
const ComponentType | up | ||
) | [inline] |
Constructor which initializes all components with the values x, y, z, c, t and u.
Definition at line 182 of file mlImageVector.h.
ml::TImageVector< CompIntType >::TImageVector | ( | const Vector6 & | v6 | ) | [inline, explicit] |
Copy the six double components of v6 into x, ..., u, respectively.
A simple cast is performed to convert the doubles to the ComponentType type.
Definition at line 196 of file mlImageVector.h.
static MLint ml::TImageVector< CompIntType >::dim | ( | ) | [inline, static] |
Returns dimension the ML calculates with.
Definition at line 146 of file mlImageVector.h.
void ml::TImageVector< CompIntType >::get | ( | ComponentType *const | xp = NULL , |
ComponentType *const | yp = NULL , |
||
ComponentType *const | zp = NULL , |
||
ComponentType *const | cp = NULL , |
||
ComponentType *const | tp = NULL , |
||
ComponentType *const | up = NULL |
||
) | const [inline] |
Return the subset of those Vector components whose corresponding pointers are not NULL.
Definition at line 221 of file mlImageVector.h.
Vector6 ml::TImageVector< CompIntType >::getVec6 | ( | ) | const [inline] |
Definition at line 287 of file mlImageVector.h.
bool ml::TImageVector< CompIntType >::iterate | ( | const TImageVector< ComponentType > & | ext | ) | [inline] |
Coordinate incrementation/iterator function inside ext.
Increment x by 1 until it overflows in x (limited by ext). On overflow x is set to 0 and y is incremented by 1 etc. If *this == ext is reached after incrementation then the vector is reset to (0,0,0,0,0,0) and true is returned, otherwise false. Note: Function works sensible only if *this is inside [(0,0,0,0,0,0), (ext.x, ... ,ext.u)[ and if &ext if != this.
Definition at line 244 of file mlImageVector.h.
void ml::TImageVector< CompIntType >::set | ( | const ComponentType | v = 0 | ) | [inline] |
Set all components to v or - if v is not specified - to 0.
Reimplemented from ml::TVector< TVector6DBase< CompIntType > >.
Definition at line 169 of file mlImageVector.h.
Referenced by ml::TSubImage< DATATYPE >::calculateMinMax().
void ml::TImageVector< CompIntType >::set | ( | const ComponentType | vx, |
const ComponentType | vy, | ||
const ComponentType | vz = 0 , |
||
const ComponentType | vc = 0 , |
||
const ComponentType | vt = 0 , |
||
const ComponentType | vu = 0 |
||
) | [inline] |
Set vector to (vx, vy, vz, vc, vt, vu). Not passed components are set to 0.
Definition at line 208 of file mlImageVector.h.
void ml::TImageVector< CompIntType >::set | ( | const ParentClass & | v | ) | [inline] |
Like assignment operator.
Definition at line 172 of file mlImageVector.h.
Vector6 ml::TImageVector< CompIntType >::toVector6 | ( | ) | const [inline] |
Get vector contents as Vector6.
Definition at line 270 of file mlImageVector.h.