itom
|
dataObject contains a n-dimensional matrix More...
Classes | |
struct | MROI |
struct | MSize |
Public Member Functions | |
DataObject (void) | |
constructor for empty data object | |
DataObject (const int size, const int type) | |
constructor for one-dimensional data object. The data is newly allocated and arbitrarily filled. | |
DataObject (const int sizeY, const int sizeX, const int type) | |
constructor for two-dimensional data object. The data is newly allocated and arbitrarily filled. | |
DataObject (const int sizeZ, const int sizeY, const int sizeX, const int type, const unsigned char continuous=0) | |
constructor for three-dimensional data object. The data is newly allocated and arbitrarily filled. | |
DataObject (const int sizeZ, const int sizeY, const int sizeX, const int type, const uchar *continuousDataPtr, const int *steps=NULL) | |
constructor for 3-dimensional data object which uses the data given by the continuousDataPtr. | |
DataObject (const MSize &sizes, const int type, const unsigned char continuous=0) | |
constructor for data object with given dimension. The data is newly allocated and arbitrarily filled. | |
DataObject (const unsigned char dimensions, const int *sizes, const int type, const unsigned char continuous=0) | |
constructor for data object with given dimension. The data is newly allocated and arbitrarily filled. | |
DataObject (const unsigned char dimensions, const int *sizes, const int type, const uchar *continuousDataPtr, const int *steps=NULL) | |
constructor for data object which uses the data given by the continuousDataPtr. | |
DataObject (const unsigned char dimensions, const int *sizes, const int type, const cv::Mat *planes, const unsigned int nrOfPlanes) | |
constructor for data object from a stack of cv::Mat | |
DataObject (const cv::Mat &data) | |
constructor for data object from a single cv::Mat | |
DataObject (const DataObject ©Constr) | |
copy constructor for data object | |
~DataObject (void) | |
destructor | |
double | getValueOffset () const |
< Function return the offset of the values stored within the dataOject | |
double | getValueScale () const |
Function return the unit description for the values stoerd within the dataOject. | |
const std::string | getValueUnit () const |
Function return the description for the values stored within the dataOject, if tagspace does not exist, NULL is returned. | |
std::string | getValueDescription () const |
Function return the axis-offset for the existing axis specified by axisNum. If axisNum is out of dimension range it returns NULL. | |
double | getAxisOffset (const int axisNum) const |
Function returns the axis-description for the exist axis specified by axisNum. If axisNum is out of dimension range it returns NULL. | |
double | getAxisScale (const int axisNum) const |
Function returns the axis-unit-description for the exist axis specified by axisNum. If axisNum is out of dimension range it returns NULL. | |
const std::string | getAxisUnit (const int axisNum, bool &validOperation) const |
Function returns the axis-description for the exist specified by axisNum. If axisNum is out of dimension range it returns NULL. | |
std::string | getAxisDescription (const int axisNum, bool &validOperation) const |
DataObjectTagType | getTag (const std::string &key, bool &validOperation) const |
bool | getTagByIndex (const int tagNumber, std::string &key, DataObjectTagType &value) const |
Function returns the string-value for 'key' identified by int tagNumber. If key in the TagMap do not exist NULL is returned. | |
std::string | getTagKey (const int tagNumber, bool &validOperation) const |
Function returns the number of elements in the Tags-Maps. | |
int | getTagListSize () const |
Function to set the string-value of the value unit, return 1 if values does not exist. | |
int | setValueUnit (const std::string &unit) |
Function to set the string-value of the value description, return 1 if values does not exist. | |
int | setValueDescription (const std::string &description) |
set the offset of the axisNum-th axis. Offset is in pixel. The relation is: physical unit = (pixel unit - offset) * scale | |
int | setAxisOffset (const unsigned int axisNum, const double offset) |
set the scaling of the axisNum-th axis. Scaling is in (physical unit / pixel). The relation is: physical unit = (pixel unit - offset) * scale | |
int | setAxisScale (const unsigned int axisNum, const double scale) |
set the unit of the axisNum-th axis as latin1 encoded string | |
int | setAxisUnit (const unsigned int axisNum, const std::string &unit) |
set the description of the axisNum-th axis as latin1 encoded string | |
int | setAxisDescription (const unsigned int axisNum, const std::string &description) |
int | setTag (const std::string &key, const DataObjectTagType &value) |
bool | existTag (const std::string &key) const |
< Function to check whether tag exist or not | |
bool | deleteTag (const std::string &key) |
< Function deletes specified tag. If tag do not exist, return value is 1 else returnvalue is 0 | |
bool | deleteAllTags () |
int | addToProtocol (const std::string &value) |
double | getPhysToPix (const unsigned int dim, const double phys, bool &isInsideImage) const |
Function returns the not rounded pixel index of a physical coordinate. | |
double | getPhysToPix (const unsigned int dim, const double phys) const |
Function returns the not rounded pixel index of a physical coordinate. | |
double | getPhysToPixUnclipped (const unsigned int dim, const double phys) const |
Function returns the not rounded pixel index of a physical coordinate. | |
int | getPhysToPix2D (const double physY, double &tPxY, bool &isInsideImageY, const double physX, double &tPxX, bool &isInsideImageX) const |
Function returns the not rounded pixel index of a physical coordinate. | |
double | getPixToPhys (const unsigned int dim, const double pix, bool &isInsideImage) const |
Function returns the physical coordinate of a pixel. | |
double | getPixToPhys (const unsigned int dim, const double pix) const |
Function returns the physical coordinate of a pixel. | |
RetVal | setXYRotationalMatrix (double r11, double r12, double r13, double r21, double r22, double r23, double r31, double r32, double r33) |
Function to access (set) the rotiational matrix by each element. | |
RetVal | getXYRotationalMatrix (double &r11, double &r12, double &r13, double &r21, double &r22, double &r23, double &r31, double &r32, double &r33) const |
Function to access (get) the rotiational matrix by each element. | |
RetVal | copyTagMapTo (DataObject &rhs) const |
RetVal | copyAxisTagsTo (DataObject &rhs) const |
RetVal | setReal (DataObject &valuesObj) |
RetVal | setImag (DataObject &valuesObj) |
int | getDims (void) const |
int | getType (void) const |
char | getContinuous (void) const |
char | getOwnData (void) const |
int | seekMat (const int matNum, const int numMats) const |
int | seekMat (const int matNum) const |
int | calcNumMats (void) const |
int | getNumPlanes (void) const |
calculates numbers of single opencv matrices which are part of the ROI which has previously been set. | |
cv::Mat * | getCvPlaneMat (const int planeIndex) |
returns pointer to cv::Mat plane with given index considering a possible roi. | |
const cv::Mat * | getCvPlaneMat (const int planeIndex) const |
returns pointer to cv::Mat plane with given index considering a possible roi. | |
const cv::Mat | getContinuousCvPlaneMat (const int planeIndex) const |
returns a shallow or deep copy of a cv::Mat plane with given index. If the current plane is not continuous (due to a roi), a cloned, continuous matrix is returned, else a shallow copy. | |
cv::Mat ** | get_mdata (void) |
returns array of pointers to cv::_Mat-matrices (planes) of the data object. | |
const cv::Mat ** | get_mdata (void) const |
returns constant array of pointers to cv::_Mat-matrices (planes) of the data object | |
MSize | getSize (void) |
returns the size-member. m_size fits to the physical organization of data in memory. | |
const MSize | getSize (void) const |
returns the size-member. This member does not consider the transpose flag, hence, m_size fits to the physical organization of data in memory. | |
int | getSize (int index) const |
gets the size of the given dimension (this is the size within the ROI) | |
MSize | getOriginalSize (void) |
returns the original size-member. This is equal to getSize() if no roi is set to the dataObject. | |
const MSize | getOriginalSize (void) const |
returns the original size-member. This is equal to getSize() if no roi is set to the dataObject. | |
int | getOriginalSize (int index) const |
gets the original size of the given dimension (this is the size without considering any ROI) | |
int | getStep (int index) const |
returns a normalized step in the index-th axis, this is the number of values one has to walk in order to get the next value in the index-th axis. | |
int | getTotal () const |
gets total number of elements within the data object's ROI | |
int | getOriginalTotal () const |
gets total number of elements of the whole data object | |
RetVal | copyTo (DataObject &rhs, unsigned char regionOnly=0) const |
high-level, non-templated method to deeply copy the data of this matrix to another matrix rhs | |
RetVal | convertTo (DataObject &rhs, const int type, const double alpha=1, const double beta=0) const |
high-level, non-templated matrix conversion | |
RetVal | setTo (const int8 &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const uint8 &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const int16 &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const uint16 &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const int32 &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const uint32 &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const float32 &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const float64 &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const complex64 &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const complex128 &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const ito::Rgba32 &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const ito::DateTime &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | setTo (const ito::TimeDelta &value, const DataObject &mask=DataObject()) |
Sets all or some of the array elements to the specific value. | |
RetVal | deepCopyPartial (DataObject ©To) |
copy all values of this data object to the copyTo data object. The copyTo-data object must be allocated and have the same type and size (of its roi) than this data object. The compared sequence of sizes only contains dimensions whose size is bigger than one (e.g. it is possible to copy a 5x1 object to a 1x1x5 object) | |
DObjIterator | begin () |
Returns the matrix iterator and sets it to the first matrix element. | |
DObjIterator | end () |
Returns the matrix iterator and sets it to the after-last matrix element. | |
DObjConstIterator | constBegin () const |
Returns the matrix read-only iterator and sets it to the first matrix element. | |
DObjConstIterator | constEnd () const |
Returns the matrix read-only iterator and sets it to the after-last matrix element. | |
DataObject & | operator= (const cv::Mat &rhs) |
DataObject & | operator= (const DataObject &rhs) |
DataObject & | operator= (const int8 &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const uint8 &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const int16 &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const uint16 &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const int32 &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const uint32 &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const float32 &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const float64 &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const complex64 &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const complex128 &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const ito::Rgba32 &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const ito::DateTime &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator= (const ito::TimeDelta &value) |
Every data element in this data object is set to the given value. | |
DataObject & | operator+= (const DataObject &rhs) |
DataObject & | operator+= (const float64 &value) |
DataObject & | operator+= (const complex128 &value) |
DataObject & | operator+= (const TimeDelta &value) |
DataObject | operator+ (const DataObject &rhs) |
DataObject | operator+ (const float64 &value) |
DataObject | operator+ (const complex128 &value) |
DataObject | operator+ (const TimeDelta &value) |
DataObject & | operator-= (const DataObject &rhs) |
DataObject & | operator-= (const float64 &value) |
DataObject & | operator-= (const complex128 &value) |
DataObject & | operator-= (const TimeDelta &value) |
DataObject | operator- (const DataObject &rhs) |
DataObject | operator- (const float64 &value) |
DataObject | operator- (const complex128 &value) |
DataObject | operator- (const TimeDelta &value) |
DataObject & | operator*= (const DataObject &rhs) |
inplace matrix multiplication of this dataObject with rhs (this *= rhs) | |
DataObject & | operator*= (const float64 &factor) |
DataObject & | operator*= (const complex128 &factor) |
DataObject | operator* (const DataObject &rhs) |
matrix multiplication of this dataObject with rhs. The result is returned. | |
DataObject | operator* (const float64 &factor) |
DataObject | operator* (const complex128 &factor) |
DataObject | operator< (DataObject &rhs) |
compare operator, compares for "lower than" | |
DataObject | operator> (DataObject &rhs) |
compare operator, compares for "bigger than" | |
DataObject | operator<= (DataObject &rhs) |
compare operator, compares for "lower or equal than" | |
DataObject | operator>= (DataObject &rhs) |
compare operator, compares for "bigger or equal than" | |
DataObject | operator== (DataObject &rhs) |
compare operator, compares for "equal to" | |
DataObject | operator!= (DataObject &rhs) |
compare operator, compares for "unequal to" | |
DataObject | operator< (const float64 &value) |
compare operator, compares for "lower than" | |
DataObject | operator> (const float64 &value) |
compare operator, compares for "bigger than" | |
DataObject | operator<= (const float64 &value) |
compare operator, compares for "lower or equal than" | |
DataObject | operator>= (const float64 &value) |
compare operator, compares for "bigger or equal than" | |
DataObject | operator== (const float64 &value) |
compare operator, compares for "equal to" | |
DataObject | operator!= (const float64 &value) |
compare operator, compares for "unequal to" | |
DataObject | operator== (const ito::complex64 &value) |
DataObject | operator!= (const ito::complex64 &value) |
compare operator, compares for "unequal to" | |
DataObject | operator== (const ito::complex128 &value) |
DataObject | operator!= (const ito::complex128 &value) |
DataObject | operator== (const ito::Rgba32 &value) |
compare operator, compares for "equal to" | |
DataObject | operator!= (const ito::Rgba32 &value) |
compare operator, compares for "unequal to" | |
DataObject | operator< (const ito::DateTime &value) |
compare operator, compares for "lower than" | |
DataObject | operator> (const ito::DateTime &value) |
compare operator, compares for "bigger than" | |
DataObject | operator<= (const ito::DateTime &value) |
compare operator, compares for "lower or equal than" | |
DataObject | operator>= (const ito::DateTime &value) |
compare operator, compares for "bigger or equal than" | |
DataObject | operator== (const ito::DateTime &value) |
compare operator, compares for "equal to" | |
DataObject | operator!= (const ito::DateTime &value) |
compare operator, compares for "unequal to" | |
DataObject | operator< (const ito::TimeDelta &value) |
compare operator, compares for "lower than" | |
DataObject | operator> (const ito::TimeDelta &value) |
compare operator, compares for "bigger than" | |
DataObject | operator<= (const ito::TimeDelta &value) |
compare operator, compares for "lower or equal than" | |
DataObject | operator>= (const ito::TimeDelta &value) |
compare operator, compares for "bigger or equal than" | |
DataObject | operator== (const ito::TimeDelta &value) |
compare operator, compares for "equal to" | |
DataObject | operator!= (const ito::TimeDelta &value) |
compare operator, compares for "unequal to" | |
DataObject | operator<< (const unsigned int shiftbit) |
DataObject & | operator<<= (const unsigned int shiftbit) |
DataObject | operator>> (const unsigned int shiftbit) |
DataObject & | operator>>= (const unsigned int shiftbit) |
DataObject | operator& (const DataObject &rhs) |
DataObject & | operator&= (const DataObject &rhs) |
DataObject | operator| (const DataObject &rhs) |
DataObject & | operator|= (const DataObject &rhs) |
DataObject | operator^ (const DataObject &rhs) |
DataObject & | operator^= (const DataObject &rhs) |
DataObject | bitwise_not () const |
RetVal | zeros (const int type) |
allocates a zero-value matrix of size 1x1 with the given type | |
RetVal | zeros (const int size, const int type) |
allocates a zero-value matrix of size 1 x size with the given type | |
RetVal | zeros (const int sizeY, const int sizeX, const int type) |
allocates a zero-value matrix of size sizeY x sizeX with the given type | |
RetVal | zeros (const int sizeZ, const int sizeY, const int sizeX, const int type, const unsigned char continuous=0) |
allocates a zero-value, 3D- matrix of size sizeZ x sizeY x sizeX with the given type | |
RetVal | zeros (const unsigned char dimensions, const int *sizes, const int type, const unsigned char continuous=0) |
RetVal | ones (const int type) |
allocates a one-value matrix of size 1x1 with the given type | |
RetVal | ones (const int size, const int type) |
allocates a one-value matrix of size 1 x size with the given type | |
RetVal | ones (const int sizeY, const int sizeX, const int type) |
allocates a one-value matrix of size sizeY x sizeX with the given type | |
RetVal | ones (const int sizeZ, const int sizeY, const int sizeX, const int type, const unsigned char continuous=0) |
allocates a one-valued, 3D- matrix of size sizeZ x sizeY x sizeX with the given type | |
RetVal | ones (const unsigned char dimensions, const int *sizes, const int type, const unsigned char continuous=0) |
RetVal | nans (const int type) |
allocates a one-value matrix of size 1x1 with the given type | |
RetVal | nans (const int size, const int type) |
allocates a one-value matrix of size 1 x size with the given type | |
RetVal | nans (const int sizeY, const int sizeX, const int type) |
allocates a one-value matrix of size sizeY x sizeX with the given type | |
RetVal | nans (const int sizeZ, const int sizeY, const int sizeX, const int type, const unsigned char continuous=0) |
allocates a one-valued, 3D- matrix of size sizeZ x sizeY x sizeX with the given type | |
RetVal | nans (const unsigned char dimensions, const int *sizes, const int type, const unsigned char continuous=0) |
RetVal | rand (const int type, const bool randMode=false) |
allocates a random-value matrix of size 1x1 with the given type | |
RetVal | rand (const int size, const int type, const bool randMode=false) |
allocates a random-value matrix of size 1 x size with the given type | |
RetVal | rand (const int sizeY, const int sizeX, const int type, const bool randMode=false) |
allocates a random-value matrix of size sizeY x sizeX with the given type | |
RetVal | rand (const int sizeZ, const int sizeY, const int sizeX, const int type, const bool randMode, const unsigned char continuous=0) |
allocates a random-valued, 3D- matrix of size sizeZ x sizeY x sizeX with the given type | |
RetVal | rand (const unsigned char dimensions, const int *sizes, const int type, const bool randMode, const unsigned char continuous=0) |
RetVal | eye (const int type) |
sets the matrix of this data object to a two-dimensional eye-matrix of size 1, hence [1] | |
RetVal | eye (const int size, const int type) |
sets the matrix of this data object to a two-dimensional eye-matrix of given size | |
RetVal | conj () |
converts every element of the data object to its conjugate complex value | |
DataObject | adj () const |
converts every element of the data object to its adjungate value | |
DataObject | trans () const |
transposes this data object | |
DataObject | mul (const DataObject &mat2, const double scale=1.0) const |
DataObject | div (const DataObject &mat2, const double scale=1.0) const |
DataObject | pow (const ito::float64 &power) |
void | pow (const ito::float64 &power, DataObject &dst) |
DataObject | sqrt () |
void | sqrt (DataObject &dst) |
DataObject | squeeze () const |
DataObject | reshape (int newDims, const int *newSizes) const |
int | elemSize () const |
returns number of bytes required by each value in the array. | |
template<typename _Tp > | |
const _Tp & | at (const unsigned int y, const unsigned int x) const |
addressing method for two-dimensional data object. | |
template<typename _Tp > | |
_Tp & | at (const unsigned int y, const unsigned int x) |
addressing method for two-dimensional data object. | |
template<typename _Tp > | |
const _Tp & | at (const unsigned int z, const unsigned int y, const unsigned int x) const |
addressing method for three-dimensional data object. | |
template<typename _Tp > | |
_Tp & | at (const unsigned int z, const unsigned int y, const unsigned int x) |
addressing method for three-dimensional data object. | |
template<typename _Tp > | |
const _Tp & | at (const unsigned int *idx) const |
addressing method for n-dimensional data object. | |
template<typename _Tp > | |
_Tp & | at (const unsigned int *idx) |
addressing method for n-dimensional data object. | |
DataObject | at (const ito::Range &rowRange, const ito::Range &colRange) const |
DataObject | at (ito::Range *ranges) const |
DataObject | at (const DataObject &mask) const |
uchar * | rowPtr (const int matNum, const int y) |
returns pointer to the data in the y-th row in the 2d-matrix plane matNum | |
const uchar * | rowPtr (const int matNum, const int y) const |
returns pointer to the data in the y-th row in the 2d-matrix plane matNum | |
template<typename _Tp > | |
_Tp * | rowPtr (const int matNum, const int y) |
returns pointer to the data in the y-th row in the 2d-matrix plane matNum | |
template<typename _Tp > | |
const _Tp * | rowPtr (const int matNum, const int y) const |
returns pointer to the data in the y-th row in the 2d-matrix plane matNum | |
DataObject | row (const int selRow) const |
DataObject | col (const int selCol) const |
DataObject | toGray (const int destinationType=ito::tUInt8) const |
converts a color image (rgba32) to a gray-scale image | |
DataObject | splitColor (const char *destinationColor, const int &dtype) const |
returns a color channel of a color image (rgba32) | |
DataObject | lineCut (const double *coordinates, const int &len) const |
high-level method which takes a line cut across the planes of a dataObject. | |
DataObject & | adjustROI (const int dtop, const int dbottom, const int dleft, const int dright) |
adjust submatrix size and position within the two-dimensional data-object | |
DataObject & | adjustROI (const unsigned char dims, const int *lims) |
adjust submatrix size and position within the n-dimensional data-object | |
RetVal | locateROI (int *wholeSizes, int *offsets) const |
method locates ROI of this data object within its original data block | |
RetVal | locateROI (int *lims) const |
method get ROI of this data object within its original data block | |
template<typename _Tp > | |
RetVal | copyFromData2D (const _Tp *src, const int sizeX, const int sizeY) |
copies the externally given source data inside this data object | |
template<typename _Tp > | |
RetVal | copyFromData2D (const _Tp *src, const int sizeX, const int sizeY, const int x0, const int y0, const int width, const int height) |
copies the externally given source data inside this data object | |
template<typename T2 > | |
operator T2 () | |
cast operator for data object | |
template<typename _Tp > | |
RetVal | linspace (const _Tp start, const _Tp end, const _Tp inc, const int transposed) |
template<typename _Tp > | |
ito::RetVal | linspace (const _Tp start, const _Tp end, const _Tp inc, const int transposed) |
equivalent to matlab linspace function | |
Static Public Member Functions | |
static DataObject | stack (const DataObject *mats, int num, unsigned int axis=0) |
returns a stack of multiple dataObjects (number is equal to num) along the given axis (default: 0). | |
Private Member Functions | |
void | createHeader (const unsigned char dimensions, const int *sizes, const int *steps, const int elemSize) |
create header information for data objects with a given size and step sizes to jump from one element in a dimension to the next one. | |
void | createHeaderWithROI (const unsigned char dimensions, const int *sizes, const int *osizes=NULL, const int *roi=NULL) |
create header information for data objects with a given size, optional roi indices and a possible original size | |
void | create (const unsigned char dimensions, const int *sizes, const int type, const unsigned char continuous, const uchar *continuousDataPtr=NULL, const int *steps=NULL) |
high-level, non-templated method for data allocation | |
void | create (const unsigned char dimensions, const int *sizes, const int type, const cv::Mat *planes, const unsigned int nrOfPlanes) |
high-level, non-templated method for data allocation | |
void | freeData (void) |
high-level, non-templated method for freeing data | |
void | secureFreeData (void) |
high-level, non-templated method for securely freeing data | |
ito::RetVal | matNumToIdx (const int matNum, int *matIdx) const |
ito::RetVal | matIdxToNum (const unsigned int *matIdx, int *matNum) const |
calculates the index of the matrix-plane in the m_data-vector for a given vector of indices, which address one element in the n-dimensional matrix | |
DataObject (const DataObject &dObj, bool transposed) | |
int | mdata_realloc (const int size) |
int | mdata_size (void) const |
int | mdata_free () |
RetVal | copyFromData2DInternal (const uchar *src, const int sizeOfElem, const int sizeX, const int sizeY) |
RetVal | copyFromData2DInternal (const uchar *src, const int sizeOfElem, const int sizeX, const int x0, const int y0, const int width, const int height) |
Private Attributes | |
char | m_continuous |
char | m_owndata |
int | m_type |
int * | m_pRefCount |
int | m_dims |
MSize | m_osize |
MROI | m_roi |
MSize | m_size |
uchar ** | m_data |
DataObjectTagsPrivate * | m_pDataObjectTags |
Static Private Attributes | |
static const int | m_sizeofs = sizeof(int) < sizeof(int*) ? 1 : sizeof(int) / sizeof(int*) |
Friends | |
template<typename _Tp > | |
RetVal | CreateFunc (DataObject *dObj, const unsigned char dimensions, const int *sizes, const unsigned char continuous, const uchar *continuousDataPtr, const int *steps) |
templated method for create | |
template<typename _Tp > | |
RetVal | CreateFuncWithCVPlanes (DataObject *dObj, const unsigned char dimensions, const int *sizes, const cv::Mat *planes, const unsigned int nrOfPlanes) |
templated method for creation with given vector of cv::Mat-planes | |
template<typename _Tp > | |
RetVal | FreeFunc (DataObject *dObj) |
low-level, templated method for freeing allocated data blocks | |
template<typename _Tp > | |
RetVal | SecureFreeFunc (DataObject *dObj) |
template<typename _Tp > | |
RetVal | CopyToFunc (const DataObject &lhs, DataObject &rhs, unsigned char regionOnly) |
low-level, templated method for deeply copying the data of one matrix to another given matrix | |
template<typename _Tp > | |
RetVal | ConvertToFunc (const DataObject &lhs, DataObject &rhs, const int type, const double alpha, const double beta) |
converts data in DataObject lhs to DataObject rhs with a given type | |
template<typename _Tp > | |
RetVal | AdjustROIFunc (DataObject *dObj, const int *lims) |
template<typename _Tp > | |
RetVal | AssignScalarFunc (const DataObject *src, const ito::tDataType type, const void *scalar) |
template<typename _Tp > | |
RetVal | MakeContinuousFunc (const DataObject &dObj, DataObject &resDObj) |
template<typename _Tp > | |
RetVal | EvaluateTransposeFlagFunc (DataObject *dObj) |
template<typename _Tp > | |
std::ostream & | coutFunc (std::ostream &out, const DataObject &dObj) |
template<typename _Tp > | |
RetVal | GetRangeFunc (DataObject *dObj, const int dtop, const int dbottom, const int dleft, const int dright) |
template<typename _Tp > | |
RetVal | AdjustROIFunc (DataObject *dObj, int dtop, int dbottom, int dleft, int dright) |
dataObject contains a n-dimensional matrix
The n-dimensional matrix can have different element types. Recently the following types are supported: int8, uint8, int16, uint16, int32, uint32, float32, float64 (=> double), complex64 (2x float32), complex128 (2x float64)
In order to handle huge matrices, the data object can divide one matrix into subparts in memory. Each subpart (called matrix-plane) is two-dimensional and covers data of the last two dimensions. Each of these matrix-planes is of type cv::Mat_<type> and can be used with every operator given by the openCV-framework (version 2.3.1 or higher).
We assume to have a n-dimensional matrix A, where each dimension has its size s_i, hence A=[s_1, s_2, ..., s_(n-2), s_(n-1), s_n]
Hence, in total there are s_1 * s_2 * ... * s_(n-2) different matrix-planes, which are all accessible by the member m_data, which is a std::vector of the general type int*. This type has to be casted to the specific cv::Mat_<...> when one matrix-plane has to be accessed. Sometimes it is also possible to simply cast to cv::Mat.
In order to make the data object compatible to continuously organized data structures, like numpy-arrays, it is also possible to have all matrix-planes in one data-block in memory. Then the continuous-flag will be set and the whole data block can be accessed by taking the pointer given by m_data[0]. Nevertheless, the indicated data structure with the two-dimensional sub-matrix-planes is still existing, hence, the pointer to each matrix-planes points to the entry point of its matrix-planes lying within the huge data block.
The data organization is equal to the one of open-cv, hence, two-dimensional matrices are stored row-by-row (C-style)...
The real size of each dimension is stored in the vector m_osize. Since it is possible to set a n-dimensional region of interest (ROI) to each matrix, the virtual dimensions, which will be delivered if the user asks for the matrix size, are stored in the member vector m_size.
According to openCV, the class dataObject is not templated, because there are some structures in the entire itom-framework which does not support any templating concept, like the plugin-handling or communication with external dll-functions. Additionally the signal-slot-design of the Qt-framework does not accept templated parameters beside some standard-objects. Therefore the element-data-type is set by the integer-member m_type. The transformation between the real data type and the integer number is coded several times within the whole framework and can be accessed by the enumeration tDataType in typeDefs.h. Since templating has got many advantages concerning low-level calculation, we adapted the transformation-process which is used by openCV:
define a templated helper-method in the following form:
template<typename _Tp> returnType 'MethodName'Func(Parameters1)
By the macro MAKEFUNCLIST a list fList'MethodName'Func is generated with each entry being a function pointer to the specific templated version of 'MethodName'Func. The specific method is accessed by using getType() of dataObject. Hence it is important to keep the element-data-types and their order consistent for the whole itom-project.
|
private |
copy constructor for transposed creation
ito::DataObject::DataObject | ( | void | ) |
constructor for empty data object
no data will be allocated, the number of elements and dimensions is set to zero
ito::DataObject::DataObject | ( | const int | size, |
const int | type ) |
constructor for one-dimensional data object. The data is newly allocated and arbitrarily filled.
In fact, by this constructor a two-dimensional matrix with dimension 1 x size will be created. the owndata-flag is set to true, the continuously-flag, too (since only one matrix-plane will be created)
size | is the number of elements |
type | is the data-type of each element (use type of enumeration tDataType) |
ito::DataObject::DataObject | ( | const int | sizeY, |
const int | sizeX, | ||
const int | type ) |
constructor for two-dimensional data object. The data is newly allocated and arbitrarily filled.
the owndata-flag is set to true, the continuously-flag, too (since only one matrix-plane will be created)
sizeY | is the number of rows in each matrix-plane |
sizeX | is the number of columns in each matrix-plane |
type | is the data-type of each element (use type of enumeration tDataType) |
ito::DataObject::DataObject | ( | const int | sizeZ, |
const int | sizeY, | ||
const int | sizeX, | ||
const int | type, | ||
const unsigned char | continuous = 0 ) |
constructor for three-dimensional data object. The data is newly allocated and arbitrarily filled.
constructor for three-dimensional data object. The data is newly allocated and arbitrarily filled.
the owndata-flag is set to true
sizeZ | is the number of images in the z-direction |
sizeY | is the number of rows in each matrix-plane |
sizeX | is the number of columns in each matrix-plane |
type | is the data-type of each element (use type of enumeration tDataType) |
continuous | indicates whether all matrix-planes should continuously lie in memory (1) or not (0) (default: 0) |
ito::DataObject::DataObject | ( | const int | sizeZ, |
const int | sizeY, | ||
const int | sizeX, | ||
const int | type, | ||
const uchar * | continuousDataPtr, | ||
const int * | steps = NULL ) |
constructor for 3-dimensional data object which uses the data given by the continuousDataPtr.
In case of the continuousDataPtr, the owndata-flag is set to false, hence this DataObject will not delete the data. Additionally the continuous-flag is set to true. The external data must be kept alive during the entire lifetime of this DataObject.
sizeZ | is the number of images in the z-direction |
sizeY | is the number of rows in each matrix-plane |
sizeX | is the number of columns in each matrix-plane |
type | is the data-type of each element (use type of enumeration tDataType) |
*continuousDataPtr | points to the first element of a continuous data block of the specific data type |
*steps | may be NULL, if the data in continuousDataPtr should be taken continuously, hence the ROI is the whole matrix, else this is a vector with three elements, where each elements indicates the number of bytes one has to move in order to get from one element to the next one in the same dimension. Hence, the last element in this vector is equal to the size of one single element (in bytes) |
ito::DataObject::DataObject | ( | const MSize & | sizes, |
const int | type, | ||
const unsigned char | continuous = 0 ) |
constructor for data object with given dimension. The data is newly allocated and arbitrarily filled.
constructor for data object with given dimension. The data is newly allocated and arbitrarily filled.
the owndata-flag is set to true
sizes | |
type | is the data-type of each element (use type of enumeration tDataType) |
continuous | indicates whether all matrix-planes should continuously lie in memory (1) or not (0) (default: 0) |
ito::DataObject::DataObject | ( | const unsigned char | dimensions, |
const int * | sizes, | ||
const int | type, | ||
const unsigned char | continuous = 0 ) |
constructor for data object with given dimension. The data is newly allocated and arbitrarily filled.
constructor for data object with given dimension. The data is newly allocated and arbitrarily filled.
the owndata-flag is set to true
dimensions | indicates the total number of dimensions |
*sizes | is a vector of size 'dimensions', where each element gives the size (not osize) of the specific dimension |
type | is the data-type of each element (use type of enumeration tDataType) |
continuous | indicates whether all matrix-planes should continuously lie in memory (1) or not (0) (default: 0) |
ito::DataObject::DataObject | ( | const unsigned char | dimensions, |
const int * | sizes, | ||
const int | type, | ||
const uchar * | continuousDataPtr, | ||
const int * | steps = NULL ) |
constructor for data object which uses the data given by the continuousDataPtr.
In case of the continuousDataPtr, the owndata-flag is set to false, hence this dataObj will not delete the data. Additionally the continuous-flag is set to true. The external data must be kept alive during the entire lifetime of this DataObject.
dimensions | indicates the total number of dimensions |
*sizes | is a vector of size 'dimensions', where each element gives the size (not osize) of the specific dimension |
type | is the data-type of each element (use type of enumeration tDataType) |
*continuousDataPtr | points to the first element of a continuous data block of the specific data type |
*steps | may be NULL, if the data in continuousDataPtr should be taken continuously, hence the ROI is the whole matrix, else this is a vector of size 'dimensions', where each elements indicates the number of bytes one has to move in order to get from one element to the next one in the same dimension. Hence, the last element in this vector is equal to the size of one single element (in bytes) |
ito::DataObject::DataObject | ( | const DataObject & | copyConstr | ) |
copy constructor for data object
copy constructor
creates a data object with respect to the given data object. The header information is completely copied, while the data is a shallow copy. The lock of the new data object is unlocked while the lock for the common data block is taken from the current lock status of the given data object.
©Constr | is the data object, which will be copied |
ito::DataObject::~DataObject | ( | void | ) |
destructor
reference pointer of data is decremented and if <0, data will be deleted if owndata-flag is true. Additionally the allocated memory for header information will be deleted, too.
int ito::DataObject::addToProtocol | ( | const std::string & | value | ) |
< Function adds value to the protocol-tag. If this object is an ROI, the ROI-coordinates are added. If string do not end with an
,
is added.
DataObject ito::DataObject::adj | ( | ) | const |
converts every element of the data object to its adjungate value
The adjungate is the transposed matrix, where each element is complex conjugated.
cv::Exception | if data type is not complex. |
DataObject & ito::DataObject::adjustROI | ( | const int | dtop, |
const int | dbottom, | ||
const int | dleft, | ||
const int | dright ) |
adjust submatrix size and position within the two-dimensional data-object
changes the boundaries of the ROI of a two-dimensional data object by the given incremental values
dtop | The shift of the top submatrix boundary upwards (positive value means upwards) |
dbottom | The shift of the bottom submatrix boundary downwards (positive value means downwards) |
dleft | The shift of the left submatrix boundary to the left (positive value means to the left) |
dright | The shift of the right submatrix boundary to the right (positive value means to the right) |
cv::Exception | if data object is not two-dimensional |
DataObject & ito::DataObject::adjustROI | ( | const unsigned char | dims, |
const int * | lims ) |
adjust submatrix size and position within the n-dimensional data-object
changes the boundaries of the ROI of a n-dimensional data object by the given incremental values
\params dims is the number of dimensions
*lims | is a integer array whose length is 2*dims. For every dimension, two adjacent values indicates the shift of the ROI. The first of both values indicates the shift of the ROI towards the first element in the matrix (positive direction). The second value indicates the shift of the ROI towards the last element in the matrix (positive direction). |
DataObject ito::DataObject::at | ( | const DataObject & | mask | ) | const |
addressing method that returns a Mx1 data object of the same type than this object with only values that are marked in the given uint8 mask object
addressing method that returns a 1xM data object of the same type than this object with only values that are marked in the given uint8 mask object
This method returns a new 1xM data object with the same type than this data object. The M columns are filled with a values of this data object whose corresponding mask value is != 0.
mask | is a uint8 mask data object with the same size than this object. Values != 0 are valid values in the mask. |
DataObject ito::DataObject::at | ( | const ito::Range & | rowRange, |
const ito::Range & | colRange ) const |
addressing method for two-dimensional data object with two given range-values. returns shallow copy of addressed regions
addressing method for two-dimensional data object with two given range-values. returns shallow copy of addressed regions.
rowRange | is the desired rowRange which should be in the new ROI (considers any existing ROI, too) |
colRange | is the desired colRange which should be in the new ROI (considers any existing ROI, too) |
cv::Exception | if number of dimensions is unequal to two. |
|
inline |
addressing method for n-dimensional data object.
*idx | is vector whose size is equal to the data object's dimensions. Each entry indicates the zero-based index of its specific dimension considering any ROI |
|
inline |
addressing method for n-dimensional data object.
*idx | is vector whose size is equal to the data object's dimensions. Each entry indicates the zero-based index of its specific dimension considering any ROI |
|
inline |
addressing method for two-dimensional data object.
y | is the zero-based row-index to the element which is requested (considering any ROI) |
x | is the zero-based column-index to the element which is requested (considering any ROI) |
|
inline |
addressing method for two-dimensional data object.
y | is the zero-based row-index to the element which is requested (considering any ROI) |
x | is the zero-based column-index to the element which is requested (considering any ROI) |
|
inline |
addressing method for three-dimensional data object.
z | is the zero-based z-index to the element which is requested (considering any ROI) |
y | is the zero-based row-index to the element which is requested (considering any ROI) |
x | is the zero-based column-index to the element which is requested (considering any ROI) |
|
inline |
addressing method for three-dimensional data object.
z | is the zero-based z-index to the element which is requested (considering any ROI) |
y | is the zero-based row-index to the element which is requested (considering any ROI) |
x | is the zero-based column-index to the element which is requested (considering any ROI) |
DataObject ito::DataObject::at | ( | ito::Range * | ranges | ) | const |
addressing method for n-dimensional data object with n given range-values. returns shallow copy of addressed regions
addressing method for n-dimensional data object with n given range-values. returns shallow copy of addressed regions
If any of the given ranges exceed the boundaries of its corresponding dimension, the range will be set to the boundaries. ranges will be given in "virtual" order, hence, the transpose-flag is considered by this method.
*ranges | is vector of desired ranges for each dimension |
DObjIterator ito::DataObject::begin | ( | ) |
Returns the matrix iterator and sets it to the first matrix element.
returns iterator to the first item in the data object array
DataObject ito::DataObject::bitwise_not | ( | ) | const |
All other types will raise an exception. Compute bit-wise and element-wise inversion. For signed integer inputs, the two's complement is returned. For floating-point objects, its machine-specific bit representation is used for the operation
int ito::DataObject::calcNumMats | ( | void | ) | const |
calculates numbers of single opencv matrices which are part of the ROI which has previously been set.
DataObject ito::DataObject::col | ( | const int | selCol | ) | const |
low-level, templated method which changes the region of interest of the data object to the selected zero-based col index
*dObj | |
unsigned | int selCol indicates the zero-based col-index (considering any existing ROI) |
selCol | is the specific zero-based row index |
cv::Exception | if dimension is unequal to two. |
RetVal ito::DataObject::conj | ( | ) |
converts every element of the data object to its conjugate complex value
cv::Exception | if data type is not complex. |
DObjConstIterator ito::DataObject::constBegin | ( | ) | const |
Returns the matrix read-only iterator and sets it to the first matrix element.
returns constant iterator to the first item in the data object array
DObjConstIterator ito::DataObject::constEnd | ( | ) | const |
Returns the matrix read-only iterator and sets it to the after-last matrix element.
returns constant iterator to the end value of this data object array
The end value is the first item outside of the data object array.
RetVal ito::DataObject::convertTo | ( | DataObject & | rhs, |
const int | type, | ||
const double | alpha = 1, | ||
const double | beta = 0 ) const |
high-level, non-templated matrix conversion
Convertes an array to another data type with optional scaling (alpha * value + beta)
Every element of the source matrix is converted to a new, given type. Additionally a floating-point scaling and offset parameter is possible.
&rhs | is the destination data object, whose memory is firstly deleted, then newly allocated |
type | is the type-number of the destination element |
alpha | scaling factor (default: 1.0) |
beta | offset value (default: 0.0) |
cv::Exception | if cast failed, e.g. if cast not possible or types unknown |
RetVal ito::DataObject::copyAxisTagsTo | ( | DataObject & | rhs | ) | const |
Deep copies the axistags to rhs object
this function makes a deepcopy of the axis and value metadata from this object to rhs object. It copies
&rhs | is the matrix where the map is copied from. The old map of this object is cleared first |
|
inline |
copies the externally given source data inside this data object
This method obtains an externally given source array that must have the same element type than this data object. Its dimension is given by sizeX and sizeY and must correspond to the x-size and y-size of this data object. It is allowed that this data object is a shallow copy with a possible region of interest of another (bigger) object.
Then, the given array is copied inside of the values of the data object. The external array must have a row-wise data arrangement (c-style), hence, one row follows after the other one.
_Tp* | src is the source array. The type of the array is analyzed at compile time (_Tp is the placeholder for this type as template parameter) |
sizeX | is the width of the array and must fit to the plane width of the data object |
sizeY | is the height of the array and must fit to the plane height of the data object |
|
inline |
copies the externally given source data inside this data object
This method obtains an externally given source array that must have the same element type than this data object. Its dimension is given by sizeX and sizeY and must correspond to the x-size and y-size of this data object. It is allowed that this data object is a shallow copy with a possible region of interest of another (bigger) object.
Then, the given array is copied inside of the values of the data object. The external array must have a row-wise data arrangement (c-style), hence, one row follows after the other one.
In this method, it is allowed that the original width and height of the given data is different than the plane size of this data object. Then only a subregion of the external data is copied, indicated by the x0 and y0 indices of the first value and its width and height (sizeX and sizeY are the original size of the given data). width and height must correspond to the plane size of the data object.
_Tp* | src is the source array. The type of the array is analyzed at compile time (_Tp is the placeholder for this type as template parameter) |
sizeX | is the width of the array. |
sizeY | is the height of the array. |
x0 | is the x-index of the first value of the source data that is copied. |
y0 | is the y-index of the first value of the source data that is copied. |
width | is the width of the sub-region of the source data that should be copied (must fit to the width of the data object) |
height | is the height of the sub-region of the source data that should be copied (must fit to the height of the data object) |
RetVal ito::DataObject::copyTagMapTo | ( | DataObject & | rhs | ) | const |
Deep copies the tagmap with all entries to rhs object
\detail this function makes a deepcopy of the tags map to rhs object from this object.
&rhs | is the matrix where the map is copied to. The old map of this object is cleared first |
RetVal ito::DataObject::copyTo | ( | DataObject & | rhs, |
unsigned char | regionOnly = 0 ) const |
high-level, non-templated method to deeply copy the data of this matrix to another matrix rhs
deeply copies the data of this data object to the given rhs-dataObject. regionOnly defines if only data within the current ROI should be copied or the entire matrix with the current ROI borders. The destination object is newly allocated if its current number od dimensions, type or size of the ROI does not fit.
In case of 'regionOnly' == false, the destination dataObject 'rhs' is always newly allocated before copying data and the tags as well as the axis descriptions etc. are also copied from the source object. If the source object has a ROI set, the entire object with all data outside of the ROI is copied and the ROI is applied to the destination object, too.
If 'regionOnly' == true, only data within a current ROI is copied to the destination object. In this case, the destination is only newly allocated if its current dimension, size or type do not fit to the source object. Else, data is copied into the existing memory. Tags and axis descriptions etc. are always copied to the destination object.
&rhs | is the matrix where the data is copied to. The old data of rhs is deleted first |
regionOnly,if | true, only the data of the ROI in lhs is copied, hence, the org-size of rhs corresponds to the ROI-size of lhs, else the whole data block is copied and the ROI of rhs is set to the ROI of lhs |
|
private |
high-level, non-templated method for data allocation
[in] | dimensions | is the total number of dimensions |
[in] | *sizes | is a vector whose length is equal to dimensions. Each entry indicates the size of the specific dimension. Each matrix-plane is allocated with the size of the last two sizes |
[in] | type | is the desired element data type (see tDataType) |
[in] | *planes | is an array of cv::Mat-planes which will be used as matrices for every single 2D-plane. Every Mat must have the same size and type. The type must correspond to the param type, the size must fit to the last two given sizes. |
[in] | nrOfPlanes | is the length of the planes-array. This value must be the same than (sizes[0]*sizes[1]*...*sizes[dimensions-2]) |
open-cv | error in case of error |
|
private |
high-level, non-templated method for data allocation
allocates new data
dimensions | is the total number of dimensions |
*sizes | is a vector whose length is equal to dimensions. Each entry indicates the size of the specific dimension. Each matrix-plane is allocated with the size of the last two sizes |
type | is the desired element data type (see tDataType) |
continuous | indicates whether the entire array should be allocated in one connected data block in memory (true) or not (default, better for huge matrices) |
*continuousDataPtr | is NULL if new data storage should be allocated (then m_owndata is true). Otherwise this pointer points to the starting point of a continuous data block, where this data-object should be refer to (then m_owndata is false). The data is not copied and the dataObject does not take ownership of the external data, hence it must be allocated during the lifetime of the dataObject and deallocated afterwards. |
*steps | vector with size of dimensions, indicates how many bytes one has to move in order to get to the next element in the same dimension, the step-size for the last element must be set to element-size |
open-cv | error in case of error |
|
private |
create header information for data objects with a given size and step sizes to jump from one element in a dimension to the next one.
helper method for creation of header information
This method allocates memory for the member variables m_roi, m_osize and m_size. Therefore one memory-block is continuously allocated with length 3*(dims+1):
[dimensions, roi1, ..., roiN, dimensions, osize1,..., osizeN, dimensions, size1,...,sizeN] m_roi.m_p points to roi1, m_osize.m_p points to osize1 and m_size.m_p points to size1
dimensions | indicates the number of dimensions |
*sizes | is an array with length of 'dimensions'. Each element gives the size of the corresponding dimension |
*steps | This parameter makes the data object compatible to numpy and opencv and is only used if a continuousDataPtr has been given to the data object. Else set steps = NULL. Each element if steps indicates by how many bytes one has to go in order to get from one element in this dimension to the next one. Hence, the last element is equal to elemSize |
elemSize | number of bytes each element requires |
cv::Exception | if dimensions is <= 1 |
|
private |
create header information for data objects with a given size, optional roi indices and a possible original size
helper method for creation of header information considering the region of interest
This method allocates memory for the member variables m_roi, m_osize and m_size. Therefore one memory-block is continuously allocated with length 3*(dims+1):
[dimensions, roi1, ..., roiN, dimensions, osize1,..., osizeN, dimensions, size1,...,sizeN] m_roi.m_p points to roi1, m_osize.m_p points to osize1 and m_size.m_p points to size1
dimensions | indicates the number of dimensions |
*sizes | is an array with length of 'dimensions'. Each element gives the size of the corresponding dimension |
*osizes | gives a vector with the original size of each dimension, which corresponds to the physical data in memory, if NULL, a full size ROI is assumed, hence osize is equal to size (default : NULL) |
*roi | gives a vector with the offset from the starting point of the allocated data block to the first element in the region of interest, must be NULL if osizes is NULL too (default : NULL) |
cv::Exception | if dimensions is <= 1 |
RetVal ito::DataObject::deepCopyPartial | ( | DataObject & | copyTo | ) |
copy all values of this data object to the copyTo data object. The copyTo-data object must be allocated and have the same type and size (of its roi) than this data object. The compared sequence of sizes only contains dimensions whose size is bigger than one (e.g. it is possible to copy a 5x1 object to a 1x1x5 object)
high-level, non-templated method. Deeply copies data of this data object which is within its ROI to the ROI of rhs.
&rhs | is the right-handed data object, where data is copied to. |
cv::Exception(CV_StsAssert) | if sizes or type of both matrices are not equal |
DataObject ito::DataObject::div | ( | const DataObject & | mat2, |
const double | scale = 1.0 ) const |
high-level method which does a element-wise division of elements in this matrix by elements in second source matrix.
The result is returned as new data object with the same type and size than this object. The axis scale, offset, description and unit values are copied from this object. Tags are copied from this object, too.
&mat2 | is the second source matrix |
scale | is the scaling factor (default: 1.0) |
int ito::DataObject::elemSize | ( | ) | const |
returns number of bytes required by each value in the array.
number of bytes that are required by each value inside of the data object array (e.g. 1 for uint8, 2 for int16...)
DObjIterator ito::DataObject::end | ( | ) |
Returns the matrix iterator and sets it to the after-last matrix element.
returns iterator to the end value of this data object array
The end value is the first item outside of the data object array.
RetVal ito::DataObject::eye | ( | const int | size, |
const int | type ) |
RetVal ito::DataObject::eye | ( | const int | type | ) |
sets the matrix of this data object to a two-dimensional eye-matrix of size 1, hence [1]
type | is the desired element data-type |
|
private |
high-level, non-templated method for freeing data
decrements reference counter and deletes data, if no other instance is using them (ref counter < 0)
|
inline |
returns array of pointers to cv::_Mat-matrices (planes) of the data object.
The returned array of matrices contains all matrices of this object, including the matrices that may lie outside of a possible region of interest. In order to access the i-th plane considering any roi, use getCvPlaneMat or calculate the right accessing index using seekMat.
|
inline |
returns constant array of pointers to cv::_Mat-matrices (planes) of the data object
The returned array of matrices contains all matrices of this object, including the matrices that may lie outside of a possible region of interest. In order to access the i-th plane considering any roi, use getCvPlaneMat or calculate the right accessing index using seekMat.
std::string ito::DataObject::getAxisDescription | ( | const int | axisNum, |
bool & | validOperation ) const |
< Function returns the axis-description for the exist specified by axisNum. If axisNum is out of dimension range it returns NULL.
double ito::DataObject::getAxisScale | ( | const int | axisNum | ) | const |
Function returns the axis-unit-description for the exist axis specified by axisNum. If axisNum is out of dimension range it returns NULL.
< Function returns the axis-description for the exist axis specified by axisNum. If axisNum is out of dimension range it returns NULL.
const std::string ito::DataObject::getAxisUnit | ( | const int | axisNum, |
bool & | validOperation ) const |
Function returns the axis-description for the exist specified by axisNum. If axisNum is out of dimension range it returns NULL.
< Function returns the axis-unit-description for the exist axis specified by axisNum. If axisNum is out of dimension range it returns NULL.
|
inline |
returns if the data object is owner of the data, hence, the data will be deleted by this data object, if nobody else is using the data any more
const cv::Mat ito::DataObject::getContinuousCvPlaneMat | ( | const int | planeIndex | ) | const |
returns a shallow or deep copy of a cv::Mat plane with given index. If the current plane is not continuous (due to a roi), a cloned, continuous matrix is returned, else a shallow copy.
returns a shallow or deep copy of a cv::Mat plane with given index. If the current plane is not continuous (due to a roi), a cloned, continuous matrix is returned, else a shallow copy.
planeIndex | is the zero-based index of the requested plane within the current ROI of the data object |
cv::Mat * ito::DataObject::getCvPlaneMat | ( | const int | planeIndex | ) |
returns pointer to cv::Mat plane with given index considering a possible roi.
returns the pointer to the underlying cv::Mat that represents the plane with given planeIndex of the entire data object.
This command is equivalent to get_mdata()[seekMat(planeIndex)] but checks for out-of-range errors.
planeIndex | is the zero-based index of the requested plane within the current ROI of the data object |
const cv::Mat * ito::DataObject::getCvPlaneMat | ( | const int | planeIndex | ) | const |
returns pointer to cv::Mat plane with given index considering a possible roi.
returns the pointer to the underlying cv::Mat that represents the plane with given planeIndex of the entire data object.
This command is equivalent to get_mdata()[seekMat(planeIndex)] but checks for out-of-range errors.
planeIndex | is the zero-based index of the requested plane within the current ROI of the data object |
|
inline |
< returns the number of dimensions returns the element data type in form of its type-number
|
inline |
calculates numbers of single opencv matrices which are part of the ROI which has previously been set.
This method replaces calcNumMats due to its more consistent method name.
|
inline |
gets the original size of the given dimension (this is the size without considering any ROI)
index | is the specific zero-based dimension-index whose size is requested |
|
inline |
|
inline |
|
inline |
|
inline |
returns the real plane index of cv::Mat array returned by get_mdata() for a given plane number considering a possible roi. Use this method if you already know the total number of planes within the roi.
double ito::DataObject::getPhysToPix | ( | const unsigned int | dim, |
const double | phys ) const |
Function returns the not rounded pixel index of a physical coordinate.
Function returns the not rounded pixel index of a physical coordinate \detail Function returns the not rounded pixel index of a physical coordinate (Unit-Coordinate = ( px-Coordinate - Offset)* Scale). To avoid memory access-error, the return value is clipped within the range of the image ([0...imagesize-1])
The pixel value is clipped to the valid range of this object.
[in] | dim | Axis-dimension for which the physical coordinate is calculated |
[in] | pix | Pixel-index as double |
double ito::DataObject::getPhysToPix | ( | const unsigned int | dim, |
const double | phys, | ||
bool & | isInsideImage ) const |
Function returns the not rounded pixel index of a physical coordinate.
Function returns the not rounded pixel index of a physical coordinate \detail Function returns the not rounded pixel index of a physical coordinate (Unit-Coordinate = ( px-Coordinate - Offset)* Scale). If the pixel is outside of the image, the isInsideImage-flag is set to false else it is set to true. To avoid memory access-error, the returnvalue is clipped within the range of the image ([0...imagesize-1])
The pixel value is clipped to the valid range of this object.
[in] | dim | Axis-dimension for which the physical coordinate is calculated |
[in] | pix | Pixel-index as double |
[out] | isInsideImage | flag which is set to true if coordinate is within range of the image. |
int ito::DataObject::getPhysToPix2D | ( | const double | physY, |
double & | tPxY, | ||
bool & | isInsideImageY, | ||
const double | physX, | ||
double & | tPxX, | ||
bool & | isInsideImageX ) const |
Function returns the not rounded pixel index of a physical coordinate.
This method only considers the x- and y-coordinates (last two dimensions of the dataObject).
physY | is the physical coordinate of the y axis |
tPxY | [byRef] contains the corresponding pixel coordinate of physY after the function has been called |
isInsideImageY | [byRef] is true if physY is inside of the dataObject area, else false |
physX | is the physical coordinate of the x axis |
tPxX | [byRef] contains the corresponding pixel coordinate of physX after the function has been called |
isInsideImageX | [byRef] is true if physX is inside of the dataObject area, else false |
double ito::DataObject::getPhysToPixUnclipped | ( | const unsigned int | dim, |
const double | phys ) const |
Function returns the not rounded pixel index of a physical coordinate.
The pixel value is not clipped to the valid range of this object, hence, the returned index might not exist in the dataObject.
double ito::DataObject::getPixToPhys | ( | const unsigned int | dim, |
const double | pix ) const |
Function returns the physical coordinate of a pixel.
Function returns the physical coordinate of a pixel \detail Function returns the physical coordinate of a pixel index (Unit-Coordinate = ( px-Coordinate.
[in] | dim | Axis-dimension for which the physical coordinate is calculated |
[in] | pix | Pixel-index as double |
double ito::DataObject::getPixToPhys | ( | const unsigned int | dim, |
const double | pix, | ||
bool & | isInsideImage ) const |
Function returns the physical coordinate of a pixel.
Function returns the physical coordinate of a pixel \detail Function returns the physical coordinate of a pixel index (Unit-Coordinate = ( px-Coordinate.
[in] | dim | Axis-dimension for which the physical coordinate is calculated |
[in] | pix | Pixel-index as double |
[out] | isInsideImage | flag which is set to true if coordinate is within range of the image. |
|
inline |
gets the size of the given dimension (this is the size within the ROI)
index | is the specific zero-based dimension-index whose size is requested |
|
inline |
returns the size-member. m_size fits to the physical organization of data in memory.
|
inline |
returns the size-member. This member does not consider the transpose flag, hence, m_size fits to the physical organization of data in memory.
int ito::DataObject::getStep | ( | int | index | ) | const |
returns a normalized step in the index-th axis, this is the number of values one has to walk in order to get the next value in the index-th axis.
Please consider, that this value can only be used for pointer-arithmetic operations if the dataObject is continuous. Else, it only indicates the number of values, however their pixel position might be interrupted at plane boundaries.
index | is the axis for which the step size should be determined \raises Exception if index is out of bounds |
std::string ito::DataObject::getTagKey | ( | const int | tagNumber, |
bool & | validOperation ) const |
Function returns the number of elements in the Tags-Maps.
< Function returns the string-value for 'key' identified by int tagNumber. If key in the TagMap do not exist NULL is returned
int ito::DataObject::getTagListSize | ( | ) | const |
Function to set the string-value of the value unit, return 1 if values does not exist.
< Function returns the number of elements in the Tags-Maps
|
inline |
|
inline |
returns if the data in the first n-2 dimensions is stored within one entire block in memory (true), else (false)
double ito::DataObject::getValueOffset | ( | ) | const |
< Function return the offset of the values stored within the dataOject
Function return the scaling of values stored within the dataOject
RetVal ito::DataObject::getXYRotationalMatrix | ( | double & | r11, |
double & | r12, | ||
double & | r13, | ||
double & | r21, | ||
double & | r22, | ||
double & | r23, | ||
double & | r31, | ||
double & | r32, | ||
double & | r33 ) const |
Function to access (get) the rotiational matrix by each element.
[out] | r11 | Upper left element |
[out] | r12 | Upper middle element |
[out] | r13 | Upper right element |
[out] | r21 | Middle left element |
[out] | r22 | Middle middle element |
[out] | r23 | Middle right element |
[out] | r31 | Lower left element |
[out] | r32 | Lower middle element |
[out] | r33 | Lower right element |
DataObject ito::DataObject::lineCut | ( | const double * | coordinates, |
const int & | len ) const |
high-level method which takes a line cut across the planes of a dataObject.
The result is stored in a 2d result matrix of the same type.
*coordinates | start and end point coordinates of line cut (physical). The coordinates are interpreted as followed: [x0,y0,x1,y1]. |
&len | length of coordinates list. |
ito::RetVal ito::DataObject::linspace | ( | const _Tp | start, |
const _Tp | end, | ||
const _Tp | inc, | ||
const int | transposed ) |
equivalent to matlab linspace function
&dObj | is the source data object |
RetVal ito::DataObject::locateROI | ( | int * | lims | ) | const |
method get ROI of this data object within its original data block
locates the boundaries of the ROI of a n-dimensional data object the distances to the physical borders
\params dims is the number of dimensions
*lims | is a integer array whose length is 2*dims. For every dimension, two adjacent values indicates the shift of the ROI. The first of both values indicates the shift of the ROI towards the first element in the matrix (positive direction). The second value indicates the shift of the ROI towards the last element in the matrix (positive direction). |
RetVal ito::DataObject::locateROI | ( | int * | wholeSizes, |
int * | offsets ) const |
method locates ROI of this data object within its original data block
locates the boundaries of the ROI of a n-dimensional data object and returns the original size and the distances to the physical borders
long description
*wholeSizes | is an allocated array of size m_dims, which is filled with the original matrix-sizes (considering the transpose-flag, hence, the output is in user-friendly form) |
offsets | is dimension-wise offset in order to get from the original first element of the matrix to the subpart within the region of interest, array must be pre-allocated, too. |
|
private |
calculates the index of the matrix-plane in the m_data-vector for a given vector of indices, which address one element in the n-dimensional matrix
The matrix indices are zero-based and consider the ROI of this data object.
*matIdx | is a vector containing indices which address one element in the n-dimensional matrix |
*matNum | is a pointer, where the resulting matrix-plane-index is written. |
cv::Exception | if the given indices are out of bounds |
|
private |
DataObject ito::DataObject::mul | ( | const DataObject & | mat2, |
const double | scale = 1.0 ) const |
high-level method which does a element-wise multiplication of elements in this matrix with elements in the second matrix.
The result is returned as new data object with the same type and size than this object. The axis scale, offset, description and unit values are copied from this object. Tags are copied from this object, too. Optionally the multiplication can be scaled by a scaling factor, which is set to one by default.
&mat2 | is the second source matrix |
scale | is the scaling factor (default: 1.0) |
RetVal ito::DataObject::nans | ( | const int | size, |
const int | type ) |
RetVal ito::DataObject::nans | ( | const int | sizeY, |
const int | sizeX, | ||
const int | type ) |
RetVal ito::DataObject::nans | ( | const int | sizeZ, |
const int | sizeY, | ||
const int | sizeX, | ||
const int | type, | ||
const unsigned char | continuous = 0 ) |
allocates a one-valued, 3D- matrix of size sizeZ x sizeY x sizeX with the given type
sizeZ | are the number of matrix-planes |
sizeY | are the number of rows |
sizeX | are the number of columns |
type | is the desired type-number |
unsigned | char continuous indicates whether the data should be in one continuous block (true) or not (false) |
RetVal ito::DataObject::nans | ( | const int | type | ) |
RetVal ito::DataObject::nans | ( | const unsigned char | dimensions, |
const int * | sizes, | ||
const int | type, | ||
const unsigned char | continuous = 0 ) |
high-level, non-templated base function for allocation of new matrix whose elements are all set to one
dimensions | indicates the number of dimensions |
*sizes | is a vector with the same length than dimensions. Every element indicates the size of the specific dimension |
type | is the desired data-element-type |
continuous | indicates whether the data should be in one continuous block (true) or not (false) |
RetVal ito::DataObject::ones | ( | const int | size, |
const int | type ) |
RetVal ito::DataObject::ones | ( | const int | sizeY, |
const int | sizeX, | ||
const int | type ) |
RetVal ito::DataObject::ones | ( | const int | sizeZ, |
const int | sizeY, | ||
const int | sizeX, | ||
const int | type, | ||
const unsigned char | continuous = 0 ) |
allocates a one-valued, 3D- matrix of size sizeZ x sizeY x sizeX with the given type
sizeZ | are the number of matrix-planes |
sizeY | are the number of rows |
sizeX | are the number of columns |
type | is the desired type-number |
unsigned | char continuous indicates whether the data should be in one continuous block (true) or not (false) |
RetVal ito::DataObject::ones | ( | const int | type | ) |
RetVal ito::DataObject::ones | ( | const unsigned char | dimensions, |
const int * | sizes, | ||
const int | type, | ||
const unsigned char | continuous = 0 ) |
high-level, non-templated base function for allocation of new matrix whose elements are all set to one
dimensions | indicates the number of dimensions |
*sizes | is a vector with the same length than dimensions. Every element indicates the size of the specific dimension |
type | is the desired data-element-type |
continuous | indicates whether the data should be in one continuous block (true) or not (false) |
ito::DataObject::operator T2 | ( | ) |
DataObject ito::DataObject::operator!= | ( | const float64 & | value | ) |
compare operator, compares for "unequal to"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator!= | ( | const ito::complex64 & | value | ) |
compare operator, compares for "unequal to"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator!= | ( | const ito::DateTime & | value | ) |
compare operator, compares for "unequal to"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator!= | ( | const ito::Rgba32 & | value | ) |
compare operator, compares for "unequal to"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator!= | ( | const ito::TimeDelta & | value | ) |
compare operator, compares for "unequal to"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator!= | ( | DataObject & | rhs | ) |
compare operator, compares for "unequal to"
&rhs | is the data object with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator& | ( | const DataObject & | rhs | ) |
high-level operator, which executes the element-wise operation "bitwise and" between this data object and a given data object
the result is returned as a newly allocated data object.
&rhs | is the matrix which is used for the operator |
cv::Exception | if data type is not supported or both data objects differs either in their size or data type |
DataObject & ito::DataObject::operator&= | ( | const DataObject & | rhs | ) |
high-level operator, which executes the element-wise operation "bitwise and" between this data object and a given data object
&rhs | is the matrix which is used for the operator |
cv::Exception | if data type is not supported or both data objects differs either in their size or data type |
DataObject ito::DataObject::operator* | ( | const DataObject & | rhs | ) |
matrix multiplication of this dataObject with rhs. The result is returned.
This multiplication is only implemented for float32 and float64. The matrix multiplication is only executed plane-by-plane, hence, the multiplication is done separately for each plane.
For an element wise multiplication use the mul-method.
DataObject ito::DataObject::operator* | ( | const float64 & | factor | ) |
high-level method which multiplies every element in this data object by a given floating-point factor. The result matrix is returned as a new matrix.
factor |
DataObject & ito::DataObject::operator*= | ( | const DataObject & | rhs | ) |
inplace matrix multiplication of this dataObject with rhs (this *= rhs)
This multiplication is only implemented for float32 and float64. The matrix multiplication is only executed plane-by-plane, hence, the multiplication is done separately for each plane. This operation is only inplace, if the second matrix is squared and both matrices have the same number of columns. Else, this dataObject is reallocated to the new size.
For an element wise multiplication use the mul-method.
DataObject & ito::DataObject::operator*= | ( | const float64 & | factor | ) |
high-level method which multiplies every element in this data object by a given floating-point factor
factor |
DataObject ito::DataObject::operator+ | ( | const DataObject & | rhs | ) |
high-level, non-templated arithmetic operator for element-wise addition of values of two given data objects
&rhs | is the data object whose elements will be added to this data object |
cv::Exception | if both data objects don't have the same size or type |
DataObject & ito::DataObject::operator+= | ( | const DataObject & | rhs | ) |
high-level, non-templated arithmetic operator for element-wise addition of values of given data object to this data object
&rhs | is the data object whose elements will be added to this data object |
cv::Exception | if both data objects don't have the same size or type |
DataObject ito::DataObject::operator- | ( | const DataObject & | rhs | ) |
high-level, non-templated arithmetic operator for element-wise subtraction of values of given data object from values of this data object
&rhs | is the data object whose elements will be subtracted from this data object |
cv::Exception | if both data objects don't have the same size or type |
DataObject & ito::DataObject::operator-= | ( | const DataObject & | rhs | ) |
high-level, non-templated arithmetic operator for element-wise subtraction of values of given data object from values of this data object
&rhs | is the data object whose elements will be subtracted from this data object |
cv::Exception | if both data objects don't have the same size or type |
DataObject ito::DataObject::operator< | ( | const float64 & | value | ) |
compare operator, compares for "lower than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator< | ( | const ito::DateTime & | value | ) |
compare operator, compares for "lower than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator< | ( | const ito::TimeDelta & | value | ) |
compare operator, compares for "lower than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator< | ( | DataObject & | rhs | ) |
compare operator, compares for "lower than"
&rhs | is the data object with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator<< | ( | const unsigned int | shiftbit | ) |
high-level operator, which shifts the elements of this data objects by a given number of bits to the left and returns the new data object
shiftbit | defines the number of bits to shift |
DataObject & ito::DataObject::operator<<= | ( | const unsigned int | shiftbit | ) |
high-level operator, which shifts the elements of this data objects by a given number of bits to the left
shiftbit | defines the number of bits to shift |
DataObject ito::DataObject::operator<= | ( | const float64 & | value | ) |
compare operator, compares for "lower or equal than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator<= | ( | const ito::DateTime & | value | ) |
compare operator, compares for "lower or equal than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator<= | ( | const ito::TimeDelta & | value | ) |
compare operator, compares for "lower or equal than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator<= | ( | DataObject & | rhs | ) |
compare operator, compares for "lower or equal than"
&rhs | is the data object with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject & ito::DataObject::operator= | ( | const complex128 & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const complex64 & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const cv::Mat & | rhs | ) |
assign-operator which creates a two-dimensional data object as a shallow copy of a two dimensional cv::Mat object.
shallow-copy means, that the header information of this data-object is physically created at the hard disk, while the data is shared with the original cv::Mat.
&rhs | is the cv::Mat where the shallow copy is taken from. At first, the existing data of this object is freed. |
cv::Exception | if rhs is not two-dimensional or data type has no compatible data type of dataObject. |
DataObject & ito::DataObject::operator= | ( | const DataObject & | rhs | ) |
assign-operator which makes a shallow-copy of the rhs data object and stores it in this data object
shallow-copy means, that the header information of the rhs data-object is physically copied to this-dataObject while the data is shared, hence, only its reference counter is incremented.
The previous array covered by this data object is completely released before assigning the new rhs data object. In order to deeply copy the values from one object into another pre-allocated object use the method deepCopyPartial.
&rhs | is the data object where the shallow copy is taken from. At first, the existing data of this object is freed. |
cv::Exception | if lock state of both objects is not equal. Please make sure, that both lock states are equal |
DataObject & ito::DataObject::operator= | ( | const float32 & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const float64 & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const int16 & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const int32 & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const int8 & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const ito::DateTime & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const ito::Rgba32 & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const ito::TimeDelta & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const uint16 & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const uint32 & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject & ito::DataObject::operator= | ( | const uint8 & | value | ) |
Every data element in this data object is set to the given value.
sets all elements of the data object to the given value. Value is cast to the data object's type
value | is the scalar assignment value |
DataObject ito::DataObject::operator== | ( | const float64 & | value | ) |
compare operator, compares for "equal to"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator== | ( | const ito::DateTime & | value | ) |
compare operator, compares for "equal to"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator== | ( | const ito::Rgba32 & | value | ) |
compare operator, compares for "equal to"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator== | ( | const ito::TimeDelta & | value | ) |
compare operator, compares for "equal to"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator== | ( | DataObject & | rhs | ) |
compare operator, compares for "equal to"
&rhs | is the data object with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator> | ( | const float64 & | value | ) |
compare operator, compares for "bigger than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator> | ( | const ito::DateTime & | value | ) |
compare operator, compares for "bigger than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator> | ( | const ito::TimeDelta & | value | ) |
compare operator, compares for "bigger than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator> | ( | DataObject & | rhs | ) |
compare operator, compares for "bigger than"
&rhs | is the data object with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator>= | ( | const float64 & | value | ) |
compare operator, compares for "bigger or equal than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator>= | ( | const ito::DateTime & | value | ) |
compare operator, compares for "bigger or equal than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator>= | ( | const ito::TimeDelta & | value | ) |
compare operator, compares for "bigger or equal than"
value | is the value with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator>= | ( | DataObject & | rhs | ) |
compare operator, compares for "bigger or equal than"
&rhs | is the data object with which this data object should element-wisely be compared |
cv::Exception | if both data objects doesn't have the same size or type |
DataObject ito::DataObject::operator>> | ( | const unsigned int | shiftbit | ) |
high-level operator, which shifts the elements of this data objects by a given number of bits to the right and returns the new data object
shiftbit | defines the number of bits to shift |
DataObject & ito::DataObject::operator>>= | ( | const unsigned int | shiftbit | ) |
high-level operator, which shifts the elements of this data objects by a given number of bits to the right
shiftbit | defines the number of bits to shift |
DataObject ito::DataObject::operator^ | ( | const DataObject & | rhs | ) |
high-level operator, which executes the element-wise operation "bitwise or" between this data object and a given data object
the result is returned as a newly allocated data object.
&rhs | is the matrix which is used for the operator |
cv::Exception | if data type is not supported or both data objects differs either in their size or data type |
DataObject & ito::DataObject::operator^= | ( | const DataObject & | rhs | ) |
high-level operator, which executes the element-wise operation "bitwise xor" between this data object and a given data object
&rhs | is the matrix which is used for the operator |
cv::Exception | if data type is not supported or both data objects differs either in their size or data type |
DataObject ito::DataObject::operator| | ( | const DataObject & | rhs | ) |
high-level operator, which executes the element-wise operation "bitwise or" between this data object and a given data object
the result is returned as a newly allocated data object.
&rhs | is the matrix which is used for the operator |
cv::Exception | if data type is not supported or both data objects differs either in their size or data type |
DataObject & ito::DataObject::operator|= | ( | const DataObject & | rhs | ) |
high-level operator, which executes the element-wise operation "bitwise or" between this data object and a given data object
&rhs | is the matrix which is used for the operator |
cv::Exception | if data type is not supported or both data objects differs either in their size or data type |
RetVal ito::DataObject::rand | ( | const int | size, |
const int | type, | ||
const bool | randMode = false ) |
allocates a random-value matrix of size 1 x size with the given type
\detail this function allocates an random value matrix using cv::randu for uniform (randMode = false) or gausion noise (randMode = true). In case of an integer type, the uniform noise is from min(inclusiv) to max(inclusiv). For floating point types, the noise is between 0(inclusiv) and 1(exclusive). In case of an integer type, the Gaussian noise mean value is (max+min)/2.0 and the standard deviation is (max-min/)6.0 to max. For floating point types, the noise mean value is 0 and the standard deviation is 1.0/3.0.
size | is the desired length of the vector |
type | is the desired type-number |
randMode | switch mode between uniform distributed(false) and normal distributed noise(true) |
RetVal ito::DataObject::rand | ( | const int | sizeY, |
const int | sizeX, | ||
const int | type, | ||
const bool | randMode = false ) |
allocates a random-value matrix of size sizeY x sizeX with the given type
\detail this function allocates an random value matrix using cv::randu for uniform (randMode = false) or gausion noise (randMode = true). In case of an integer type, the uniform noise is from min(inclusiv) to max(inclusiv). For floating point types, the noise is between 0(inclusiv) and 1(exclusive). In case of an integer type, the Gaussian noise mean value is (max+min)/2.0 and the standard deviation is (max-min/)6.0 to max. For floating point types, the noise mean value is 0 and the standard deviation is 1.0/3.0.
sizeY | are the number of rows |
sizeX | are the number of columns |
type | is the desired type-number |
randMode | switch mode between uniform distributed(false) and normal distributed noise(true) |
RetVal ito::DataObject::rand | ( | const int | sizeZ, |
const int | sizeY, | ||
const int | sizeX, | ||
const int | type, | ||
const bool | randMode, | ||
const unsigned char | continuous = 0 ) |
allocates a random-valued, 3D- matrix of size sizeZ x sizeY x sizeX with the given type
\detail this function allocates an random value matrix using cv::randu for uniform (randMode = false) or gausion noise (randMode = true). In case of an integer type, the uniform noise is from min(inclusiv) to max(inclusiv). For floating point types, the noise is between 0(inclusiv) and 1(exclusive). In case of an integer type, the Gaussian noise mean value is (max+min)/2.0 and the standard deviation is (max-min/)6.0 to max. For floating point types, the noise mean value is 0 and the standard deviation is 1.0/3.0.
sizeZ | are the number of matrix-planes |
sizeY | are the number of rows |
sizeX | are the number of columns |
type | is the desired type-number |
randMode | switch mode between uniform distributed(false) and normal distributed noise(true) |
unsigned | char continuous indicates whether the data should be in one continuous block (true) or not (false) |
RetVal ito::DataObject::rand | ( | const int | type, |
const bool | randMode = false ) |
allocates a random-value matrix of size 1x1 with the given type
\detail this function allocates an random value matrix using cv::randu for uniform (randMode = false) or gausion noise (randMode = true). In case of an integer type, the uniform noise is from min(inclusiv) to max(inclusiv). For floating point types, the noise is between 0(inclusiv) and 1(exclusive). In case of an integer type, the Gaussian noise mean value is (max+min)/2.0 and the standard deviation is (max-min/)6.0 to max. For floating point types, the noise mean value is 0 and the standard deviation is 1.0/3.0.
type | is the desired type-number |
randMode | switch mode between uniform distributed(false) and normal distributed noise(true) |
RetVal ito::DataObject::rand | ( | const unsigned char | dimensions, |
const int * | sizes, | ||
const int | type, | ||
const bool | randMode, | ||
const unsigned char | continuous = 0 ) |
high-level, non-templated base function for allocation of new matrix whose elements are all set to one
\detail this function allocates an random value matrix using cv::randu for uniform (randMode = false) or gausion noise (randMode = true). In case of an integer type, the uniform noise is from min(inclusiv) to max(exclusive). For floating point types, the noise is between 0(inclusiv) and 1(exclusive). In case of an integer type, the Gaussian noise mean value is (max+min)/2.0 and the standard deviation is (max-min/)6.0 to max. For floating point types, the noise mean value is 0 and the standard deviation is 1.0/3.0.
dimensions | indicates the number of dimensions |
*sizes | is a vector with the same length than dimensions. Every element indicates the size of the specific dimension |
type | is the desired data-element-type |
randMode | switch mode between uniform distributed(false) and normal distributed noise(true) |
continuous | indicates whether the data should be in one continuous block (true) or not (false) |
DataObject ito::DataObject::row | ( | const int | selRow | ) | const |
low-level, templated method which changes the region of interest of the data object to the selected zero-based row index
*dObj | |
selRow | indicates the zero-based row-index (considering any existing ROI) |
selRow | is the specific zero-based row index |
cv::Exception | if dimension is unequal to two. |
|
inline |
returns pointer to the data in the y-th row in the 2d-matrix plane matNum
cast this pointer to the data type of the matrix elements (as pointer).
|
inline |
returns pointer to the data in the y-th row in the 2d-matrix plane matNum
This is a templated version to return the pointer already casted to the right type, e.g. ito::float64* myPtr = myObj->rowPtr<ito::float64>(0,0).
|
inline |
returns pointer to the data in the y-th row in the 2d-matrix plane matNum
cast this pointer to the data type of the matrix elements (as pointer).
|
inline |
returns pointer to the data in the y-th row in the 2d-matrix plane matNum
This is a templated version to return the pointer already casted to the right type, e.g. const ito::float64* myPtr = myObj->rowPtr<ito::float64>(0,0).
|
private |
high-level, non-templated method for securely freeing data
decrements reference counter and deletes data, if no other instance is using them (ref counter < 0). This method makes a lot of security checks instead of freeFunc.
int ito::DataObject::seekMat | ( | const int | matNum | ) | const |
returns the number of planes of this data object (considering a possible ROI). This method simply calls getNumPlanes and is only there for historical reasons.
returns the index vector-index of m_data which corresponds to the given zero-based two-dimensional matrix-index
Since there might be a difference between the "real" matrix size in memory and the virtual size which is set by subslicing a matrix and hence setting any ROI, this method transforms a desired matrix-plane index to the real index in memory of the data-vector m_data
matNum | zero-based matrix-plane considering the virtual matrix size (ROI), 0<=matNum<getNumPlanes |
int ito::DataObject::seekMat | ( | const int | matNum, |
const int | numMats ) const |
returns the real plane index of cv::Mat array returned by get_mdata() for a given plane number considering a possible roi. This method internally calculates the number of planes within the roi using getNumPlanes.
returns the index vector-index of m_data which corresponds to the given zero-based two-dimensional matrix-index
Since there might be a difference between the "real" matrix size in memory and the virtual size which is set by subslicing a matrix and hence setting any ROI, this method transforms a desired matrix-plane index to the real index in memory of the data-vector m_data
matNum | zero-based matrix-plane-index, considering the virtual matrix size (ROI), 0<=matNum<getNumPlanes |
numMats | total number of matrix-planes, lying within the ROI |
begin 1. possibility: determine indices within region of interest an call matIdxToNum in order to get the plane-number for this index /begin 2. possibility: integrate matIdxToNum here.
int ito::DataObject::setAxisDescription | ( | const unsigned int | axisNum, |
const std::string & | description ) |
< Function to set the description (string value) of the specified axis, return 1 if axis does not exist
int ito::DataObject::setAxisOffset | ( | const unsigned int | axisNum, |
const double | offset ) |
set the scaling of the axisNum-th axis. Scaling is in (physical unit / pixel). The relation is: physical unit = (pixel unit - offset) * scale
< Function to set the offset of the specified axis, return 1 if axis does not exist
int ito::DataObject::setAxisScale | ( | const unsigned int | axisNum, |
const double | scale ) |
set the unit of the axisNum-th axis as latin1 encoded string
< Function to set the scale of the specified axis, return 1 if axis does not exist or scale is 0.0.
int ito::DataObject::setAxisUnit | ( | const unsigned int | axisNum, |
const std::string & | unit ) |
set the description of the axisNum-th axis as latin1 encoded string
< Function to set the unit (string value) of the specified axis, return 1 if axis does not exist
RetVal ito::DataObject::setImag | ( | DataObject & | valuesObj | ) |
high-level value which calculates the real value of each element of the input source data object and returns the resulting data object
&dObj |
cv::Exception | if undefined data type (e.g. real data types) |
RetVal ito::DataObject::setReal | ( | DataObject & | valuesObj | ) |
high-level value which calculates the real value of each element of the input source data object and returns the resulting data object
&dObj |
cv::Exception | if undefined data type (e.g. real data types) |
int ito::DataObject::setTag | ( | const std::string & | key, |
const DataObjectTagType & | value ) |
< Function to set the string value of the specified tag, if the tag do not exist, it will be added automatically, return 1 if tagspace does not exist
RetVal ito::DataObject::setTo | ( | const complex128 & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const complex64 & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const float32 & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const float64 & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const int16 & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const int32 & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const int8 & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const ito::DateTime & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const ito::Rgba32 & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const ito::TimeDelta & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const uint16 & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const uint32 & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
RetVal ito::DataObject::setTo | ( | const uint8 & | value, |
const DataObject & | mask = DataObject() ) |
Sets all or some of the array elements to the specific value.
Sets all or some (if uint8 mask is given) of the array elements to the specified value.
assigned | scalar converted to the actual array type |
mask | Operation mask of the same size as *this and type uint8 or empty data object if no mask should be considered (default) |
int ito::DataObject::setValueDescription | ( | const std::string & | description | ) |
set the offset of the axisNum-th axis. Offset is in pixel. The relation is: physical unit = (pixel unit - offset) * scale
< Function to set the string-value of the value description, return 1 if values does not exist
int ito::DataObject::setValueUnit | ( | const std::string & | unit | ) |
Function to set the string-value of the value description, return 1 if values does not exist.
< Function to set the string-value of the value unit, return 1 if values does not exist
RetVal ito::DataObject::setXYRotationalMatrix | ( | double | r11, |
double | r12, | ||
double | r13, | ||
double | r21, | ||
double | r22, | ||
double | r23, | ||
double | r31, | ||
double | r32, | ||
double | r33 ) |
Function to access (set) the rotiational matrix by each element.
[in] | r11 | Upper left element |
[in] | r12 | Upper middle element |
[in] | r13 | Upper right element |
[in] | r21 | Middle left element |
[in] | r22 | Middle middle element |
[in] | r23 | Middle right element |
[in] | r31 | Lower left element |
[in] | r32 | Lower middle element |
[in] | r33 | Lower right element |
DataObject ito::DataObject::splitColor | ( | const char * | destinationColor, |
const int & | dtype ) const |
returns a color channel of a color image (rgba32)
cv::Exception | if cast failed, e.g. if cast not possible or types unknown |
|
static |
returns a stack of multiple dataObjects (number is equal to num) along the given axis (default: 0).
The axis is always mapped to the object with the largest number of dimensions ndim_max. All other dataObjects are considered to also have ndim_max dimensions, where additional dimensions are prepended having a size of 1.
high-level method which stacks the planes of the input dataObjects to a three dimensional dataObject together.
The result is stored in a result matrix of the same plane size and type. Only one of the (n-2) dimensions is allowed to have a size greter than one.
*mats | sequence of input DataObjects |
*num | number elements in mats |
axis | axis along which a stack is build (not yet implemented) |
DataObject ito::DataObject::toGray | ( | const int | destinationType = ito::tUInt8 | ) | const |
DataObject ito::DataObject::trans | ( | ) | const |
transposes this data object
simply toggles the transpose flag
RetVal ito::DataObject::zeros | ( | const int | size, |
const int | type ) |
RetVal ito::DataObject::zeros | ( | const int | sizeY, |
const int | sizeX, | ||
const int | type ) |
RetVal ito::DataObject::zeros | ( | const int | sizeZ, |
const int | sizeY, | ||
const int | sizeX, | ||
const int | type, | ||
const unsigned char | continuous = 0 ) |
allocates a zero-value, 3D- matrix of size sizeZ x sizeY x sizeX with the given type
sizeZ | are the number of matrix-planes |
sizeY | are the number of rows |
sizeX | are the number of columns |
type | is the desired type-number |
continuous | indicates whether the data should be in one continuous block (true) or not (false) |
RetVal ito::DataObject::zeros | ( | const int | type | ) |
RetVal ito::DataObject::zeros | ( | const unsigned char | dimensions, |
const int * | sizes, | ||
const int | type, | ||
const unsigned char | continuous = 0 ) |
high-level, non-templated base function for allocation of new matrix whose elements are all set to zero
dimensions | indicates the number of dimensions |
*sizes | is a vector with the same length than dimensions. Every element indicates the size of the specific dimension |
type | is the desired data-element-type |
continuous | indicates whether the data should be in one continuous block (true) or not (false) |
|
friend |
low-level, templated method for adjusting the ROI of a data object by the given incremental values
*dObj | is the data object, whose boundaries should be adjusted |
dtop | - The shift of the top submatrix boundary upwards (positive value means upwards) |
dbottom | - The shift of the bottom submatrix boundary downwards (positive value means downwards) |
dleft | - The shift of the left submatrix boundary to the left (positive value means to the left) |
dright | - The shift of the right submatrix boundary to the right (positive value means to the right) |
|
friend |
converts data in DataObject lhs to DataObject rhs with a given type
Every element of the source data object is copied to the destination data object by using this transformation
elem_destination = static_cast<newType>(elem_source * alpha + beta)
&lhs | is the left-hand sided data object, whose data should be converted |
&rhs | is the destination data object, whose memory is firstly deleted, then newly allocated |
dest_type | is the type-number of the destination element |
alpha | scaling factor (default: 1.0) |
beta | offset value (default: 0.0) |
cv::Exception(CV_StsAssert) | if conversion type is unknown |
|
friend |
low-level, templated method for deeply copying the data of one matrix to another given matrix
In case of 'regionOnly' == false, the destination dataObject 'rhs' is always newly allocated before copying data and the tags as well as the axis descriptions etc. are also copied from the source object. If the source object has a ROI set, the entire object with all data outside of the ROI is copied and the ROI is applied to the destination object, too.
If 'regionOnly' == true, only data within a current ROI is copied to the destination object. In this case, the destination is only newly allocated if its current dimension, size or type do not fit to the source object. Else, data is copied into the existing memory. Tags and axis descriptions etc. are always copied to the destination object.
&lhs | is the matrix whose data is copied |
&rhs | is the matrix where the data is copied to. The old data of rhs is deleted first |
regionOnly,if | true, only the data of the ROI in lhs is copied, hence, the org-size of rhs corresponds to the ROI-size of lhs, else the whole data block is copied and the ROI of rhs is set to the ROI of lhs |
|
friend |
templated method for create
creates or initializes matrix with given parameters
dObj | DataObject, whose matrix is created here |
dimensions | total number of dimensions (>=1), if dimensions == 1, dimensions will be set to two and a matrix with dimension [1 x original dimension] is created |
*sizes | vector with size of dimensions, each element gives the size of elements in each dimension |
continuous,indicates | whether the data stored in this data object is stored in one continuous data block or not. if dimension <= 2, matrix is always continuous be careful, continuous has not the same meaning than the continuous flag in opencv or numpy. |
continuousDataPtr | if this pointer is NULL, new data will be allocated. Else the given data indicates data which will be used by this data object. only possible if continuous is true. m_ownflag will be set to 0 if this pointer is set |
*steps | vector with size of dimensions, indicates how many bytes one has to move in order to get to the next element in the same dimension, the step-size for the last element must be equal to element-size (in byte) |
continuous
|
friend |
templated method for creation with given vector of cv::Mat-planes
[in] | dimensions | is the total number of dimensions |
[in] | *sizes | is a vector whose length is equal to dimensions. Each entry indicates the size of the specific dimension. Each matrix-plane is allocated with the size of the last two sizes |
[in] | type | is the desired element data type (see tDataType) |
[in] | *planes | is an array of cv::Mat-planes which will be used as matrices for every single 2D-plane. Every Mat must have the same size and type. The type must correspond to the param type, the size must fit to the last two given sizes. |
[in] | nrOfPlanes | is the length of the planes-array. This value must be the same than (sizes[0]*sizes[1]*...*sizes[dimensions-2]) |
|
friend |
low-level, templated method for freeing allocated data blocks
First, the header information of the corresponding data block is deleted. Then the reference counter of the data block is decremented. In the same way, the reference counter for every matrix-plane is incremented by calling the corresponding release-method. If the ref-counter is lower than zero no other instance needs this data block and it is deallocated if the m_owndata-flag is true.
*dObj | whose data block should be freed |
|
friend |
low-level, templated method for saving a shallow copy of a source cv::Mat_ to a destination cv::Mat_ with respect to given row- and col-ranges
*SrcMat | is the source matrix which is firstly cast to cv::Mat_<_Tp>* |
rowRange | is the desired row-range |
colRange | is the desired col-range |
**dstMat | is the pointer to a destination matrix which is also cast to cv::Mat_<_Tp>* |
|
friend |
low-level, templated method which copies an incontinuously organized data object to a continuously organized resulting data object
this templated helper function should only be called if dObj is non-continuous. This is already checked by the calling function makeContinuous The hidden data which is out of a possible roi will not be part of the new continuous matrix.
&dObj | is the source data object |
&resDObj | is the resulting data object |
|
private |
continuous flag
|
private |
vector with references to each matrix-plane. array of char pointers
|
private |
number of dimensions
|
private |
vector containing the original size of each dimension. The allocated data block corresponds to these sizes
|
private |
owndata flag (false if the data object is constructed with a given continuousDataPointer, else true)
|
private |
class containing the object metadata
|
private |
pointer to the reference counter, the integer variable will be allocated once the data block is allocated. If only one data object has access to the data, the reference counter is 0.
|
private |
vector containing the offset to the starting point of the ROI for each dimension, is used for detecting and adjusting the ROI
|
private |
vector containing the "virtual" size of each dimension considering the ROI
|
private |
element data type