MeVisLab Toolbox Reference
|
Structure containing all data type features and pointers to all functions needed to implement operations on any extended type. More...
#include <mlTypeDefs.h>
Public Types | |
All function types needed to specify operations on MLDataTypes. | |
typedef void(* | Function_SetTo) (MLTypeData *dest) |
typedef bool(* | Function_CastToBool) (const MLTypeData *p) |
typedef MLint(* | Function_CastToInt) (const MLTypeData *p) |
typedef MLdouble(* | Function_CastToDouble) (const MLTypeData *p) |
typedef char *(* | Function_GetStringValue) (const MLTypeData *p) |
typedef void(* | Function_CastFromInt) (MLint value, MLTypeData *result) |
typedef void(* | Function_CastFromDouble) (MLdouble value, MLTypeData *result) |
typedef void(* | Function_SetStringValue) (const char *str, MLTypeData *result) |
typedef void(* | Function_CopyValue) (const MLTypeData *source, MLTypeData *dest) |
typedef bool(* | Function_IsEqualToType) (const MLTypeData *source1, const MLTypeData *source2) |
typedef bool(* | Function_IsEqualToTypeWithEpsilon) (const MLTypeData *source1, const MLTypeData *source2, MLdouble epsilon) |
typedef void(* | Function_ApplyIntOperation) (const MLTypeData *source, MLint value, MLTypeData *result) |
typedef void(* | Function_ApplyDoubleOperation) (const MLTypeData *source, MLdouble value, MLTypeData *result) |
typedef void(* | Function_ApplyOperation) (const MLTypeData *source1, const MLTypeData *source2, MLTypeData *result) |
typedef void(* | Function_CastToOtherType) (const MLTypeData *myData, const MLTypeInfos *otherInfos, MLTypeData *otherData) |
typedef void(* | Function_CastFromOtherType) (const MLTypeInfos *myInfos, const MLTypeData *myData, MLTypeData *otherData) |
typedef void(* | Function_MultWithOtherType) (const MLTypeInfos *myInfos, const MLTypeData *myData, const MLTypeData *otherData, MLTypeData *result) |
typedef void(* | Function_ArrayCopy) (const MLTypeData *source, MLTypeData *dest, size_t size) |
typedef void(* | Function_ArrayFill) (const MLTypeData *fillValue, MLTypeData *dest, size_t size) |
typedef void(* | Function_ArrayCopyWithStrides) (const MLTypeData *source, MLssize_t sourceStride, MLTypeData *dest, MLssize_t destStride, size_t size) |
typedef void(* | Function_Interpolate) (const MLTypeData *source1, const MLTypeData *source2, MLdouble alpha, MLTypeData *result) |
typedef void(* | Function_ArrayRescale) (const MLTypeData *source, MLdouble scaleFactor, const MLTypeData *offset, MLTypeData *dest, size_t size) |
typedef bool(* | Function_ArrayEqualsValue) (const MLTypeData *value, const MLTypeData *buffer, size_t size) |
typedef void(* | Function_ArrayGetMinMax) (const MLTypeData *source, size_t size, MLdouble &min, MLdouble &max) |
typedef MLdouble(* | Function_GetComponent) (const MLTypeData *source, size_t componentIndex) |
typedef void(* | Function_SetComponent) (MLTypeData *dest, size_t componentIndex, MLdouble value) |
Public Attributes | |
Fixed type features which can be initialized in the constructor. | |
size_t | numComponents |
Number of components of this data type. Equals number of characters in *structInfoString. More... | |
size_t | typeSize |
sizeof the data type in bytes. More... | |
const char * | name |
Pointer to the data type name. More... | |
MLDataType | rangeAndPrecisionEquivalent |
Standard data type which has a comparable range and precision behavior. More... | |
MLdouble | dblMin |
double minimum of data type if it exists. More... | |
MLdouble | dblMax |
double maximum of data type if it exists. More... | |
const MLTypeData * | typeMinPtr |
Data type minimum specified by derived class. More... | |
const MLTypeData * | typeMaxPtr |
Data type maximum specified by derived class. More... | |
const MLTypeData * | typeDefaultPtr |
Data type default specified by derived class. More... | |
size_t | numGoodCastTos |
Number of datatypes to which this type can be cast without information or functionality loss. More... | |
const char ** | goodCastTos |
Data types names to which this type can be cast without information or functionality loss. More... | |
size_t | componentOffsets [ML_MAX_COMPONENTS_EXTENDED_TYPE] |
Array of offsets from the first to other components to address any component directly. More... | |
const char * | structInfoString |
Pointer to a NULL-terminated string describing the type configuration. More... | |
MLint32 | dataTypeId |
Real MLDataType id of under which these operations are registered as data type. More... | |
MLTypeGroup | typeGroup |
Type group to which this type belongs. More... | |
MLTypePropertyBits | propertyBits |
Variable containing an enabled bit for each defined property. More... | |
Pointers to functions implementing type specific operations. | |
Function_GetStringValue | getStringValue |
Returns a value as a string. More... | |
Function_SetStringValue | setStringValue |
Try to convert string as far as possible. If string cannot be scanned at all, then use the data type default. More... | |
Function_SetTo | setToMinimum |
Sets the value to minimum value. Must be implemented. More... | |
Function_SetTo | setToMaximum |
Sets the value to minimum value. Must be implemented. More... | |
Function_SetTo | setToDefault |
Sets the value to default value. Must be implemented. More... | |
Function_GetComponent | getComponent |
Returns the n-th component of the type as double. More... | |
Function_SetComponent | setComponent |
Sets the n-th component of the type from double (applying rounding if needed). More... | |
Function_CopyValue | copy |
Copies the first parameter to the second one. More... | |
Function_ArrayCopy | arrayCopy |
Copies the number of elements of the first parameter to the second one. More... | |
Function_ArrayCopyWithStrides | arrayCopyWithStrides |
Same as arrayCopy, but allows to specify stride values for source and destination. More... | |
Function_ArrayFill | arrayFill |
Sets the first parameter to array at the second one. More... | |
Function_CastToBool | castToBool |
Returns a type value cast to bool. Usually an equality to 0 should return false , e.g., a null vector. More... | |
Function_CastToInt | castToInt |
Returns a type value cast to integer. More... | |
Function_CastToDouble | castToDouble |
Returns a type value cast to double. More... | |
Function_CastToOtherType | castToOtherType |
Casts data to another registered type. More... | |
Function_CastFromInt | castFromInt |
Casts the first (the integer) parameter to the data type and returns it into second parameter. More... | |
Function_CastFromDouble | castFromDouble |
Casts the first (the double) parameter to the data type and returns it into second parameter. More... | |
Function_CastFromOtherType | castFromOtherType |
Casts another registered type to data. More... | |
Function_IsEqualToType | isEqualToType |
Returns true if both parameters are equal; otherwise, it returns false . More... | |
Function_IsEqualToTypeWithEpsilon | isEqualToTypeWithEpsilon |
Returns true if both parameters are equal within a static epsilon; otherwise, it returns false . More... | |
Function_CopyValue | negate |
Negates the value. More... | |
Function_CopyValue | normalize |
Normalizes the type value from parameter 1 and writes it into parameter 2. More... | |
Function_ArrayRescale | arrayRescale |
Scales the values from the first parameter with the second parameter and offsets it with the value from the third parameter, writing it to the position of the fourth parameter, times the fifth parameter. More... | |
Function_ArrayEqualsValue | arrayEqualsValue |
Checks whether the first argument equals all the values given with the second argument (and the size in the third argument), returns true if all values are equal. More... | |
Function_ArrayGetMinMax | arrayGetMinMax |
Returns the minimum and maximum component values from the array in the first argument, and retursn it in the third and fourth argument, the size of the array is in the second argument. More... | |
Function_Interpolate | interpolate |
Interpolates linearly between the first and the second parameter, at the position given by the third parameter (between 0 and 1). More... | |
Function_ApplyIntOperation | multWithInt |
Implements multiplication with integer. Result is written into parameter three. More... | |
Function_ApplyDoubleOperation | multWithDouble |
Implements multiplication with double. Result is written into parameter three. More... | |
Function_ApplyOperation | multWithType |
Implements multiplication with its own type. Result is written into parameter three. More... | |
Function_MultWithOtherType | multWithOtherType |
Implements multiplication with another type. Result is written into parameter three. More... | |
Function_ApplyIntOperation | plusInt |
Implements integer addition to parameter one. Result is written into parameter three. More... | |
Function_ApplyDoubleOperation | plusDouble |
Implements double addition to parameter one. Result is written into parameter three. More... | |
Function_ApplyOperation | plusType |
Implements parameter two addition to parameter one. Result is written into parameter three. More... | |
Structure containing all data type features and pointers to all functions needed to implement operations on any extended type.
It also contains a bit mask describing implemented functions. It is a wrapper for any information and code needed to use any standard or user defined data type used by the ML. For the default datatypes used by the ML, see mlStdTypeInfos.h.
Definition at line 1330 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_ApplyDoubleOperation) (const MLTypeData *source, MLdouble value, MLTypeData *result) |
Definition at line 1413 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_ApplyIntOperation) (const MLTypeData *source, MLint value, MLTypeData *result) |
Definition at line 1412 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_ApplyOperation) (const MLTypeData *source1, const MLTypeData *source2, MLTypeData *result) |
Definition at line 1414 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_ArrayCopy) (const MLTypeData *source, MLTypeData *dest, size_t size) |
Definition at line 1418 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_ArrayCopyWithStrides) (const MLTypeData *source, MLssize_t sourceStride, MLTypeData *dest, MLssize_t destStride, size_t size) |
Definition at line 1420 of file mlTypeDefs.h.
typedef bool(* MLTypeInfos::Function_ArrayEqualsValue) (const MLTypeData *value, const MLTypeData *buffer, size_t size) |
Definition at line 1423 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_ArrayFill) (const MLTypeData *fillValue, MLTypeData *dest, size_t size) |
Definition at line 1419 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_ArrayGetMinMax) (const MLTypeData *source, size_t size, MLdouble &min, MLdouble &max) |
Definition at line 1424 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_ArrayRescale) (const MLTypeData *source, MLdouble scaleFactor, const MLTypeData *offset, MLTypeData *dest, size_t size) |
Definition at line 1422 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_CastFromDouble) (MLdouble value, MLTypeData *result) |
Definition at line 1407 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_CastFromInt) (MLint value, MLTypeData *result) |
Definition at line 1406 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_CastFromOtherType) (const MLTypeInfos *myInfos, const MLTypeData *myData, MLTypeData *otherData) |
Definition at line 1416 of file mlTypeDefs.h.
typedef bool(* MLTypeInfos::Function_CastToBool) (const MLTypeData *p) |
Definition at line 1402 of file mlTypeDefs.h.
typedef MLdouble(* MLTypeInfos::Function_CastToDouble) (const MLTypeData *p) |
Definition at line 1404 of file mlTypeDefs.h.
typedef MLint(* MLTypeInfos::Function_CastToInt) (const MLTypeData *p) |
Definition at line 1403 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_CastToOtherType) (const MLTypeData *myData, const MLTypeInfos *otherInfos, MLTypeData *otherData) |
Definition at line 1415 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_CopyValue) (const MLTypeData *source, MLTypeData *dest) |
Definition at line 1409 of file mlTypeDefs.h.
typedef MLdouble(* MLTypeInfos::Function_GetComponent) (const MLTypeData *source, size_t componentIndex) |
Definition at line 1425 of file mlTypeDefs.h.
typedef char*(* MLTypeInfos::Function_GetStringValue) (const MLTypeData *p) |
Definition at line 1405 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_Interpolate) (const MLTypeData *source1, const MLTypeData *source2, MLdouble alpha, MLTypeData *result) |
Definition at line 1421 of file mlTypeDefs.h.
typedef bool(* MLTypeInfos::Function_IsEqualToType) (const MLTypeData *source1, const MLTypeData *source2) |
Definition at line 1410 of file mlTypeDefs.h.
typedef bool(* MLTypeInfos::Function_IsEqualToTypeWithEpsilon) (const MLTypeData *source1, const MLTypeData *source2, MLdouble epsilon) |
Definition at line 1411 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_MultWithOtherType) (const MLTypeInfos *myInfos, const MLTypeData *myData, const MLTypeData *otherData, MLTypeData *result) |
Definition at line 1417 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_SetComponent) (MLTypeData *dest, size_t componentIndex, MLdouble value) |
Definition at line 1426 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_SetStringValue) (const char *str, MLTypeData *result) |
Definition at line 1408 of file mlTypeDefs.h.
typedef void(* MLTypeInfos::Function_SetTo) (MLTypeData *dest) |
Definition at line 1401 of file mlTypeDefs.h.
Function_ArrayCopy MLTypeInfos::arrayCopy |
Copies the number of elements of the first parameter to the second one.
Definition at line 1452 of file mlTypeDefs.h.
Function_ArrayCopyWithStrides MLTypeInfos::arrayCopyWithStrides |
Same as arrayCopy, but allows to specify stride values for source and destination.
Definition at line 1454 of file mlTypeDefs.h.
Function_ArrayEqualsValue MLTypeInfos::arrayEqualsValue |
Checks whether the first argument equals all the values given with the second argument (and the size in the third argument), returns true if all values are equal.
Definition at line 1493 of file mlTypeDefs.h.
Function_ArrayFill MLTypeInfos::arrayFill |
Sets the first parameter to array at the second one.
Definition at line 1456 of file mlTypeDefs.h.
Function_ArrayGetMinMax MLTypeInfos::arrayGetMinMax |
Returns the minimum and maximum component values from the array in the first argument, and retursn it in the third and fourth argument, the size of the array is in the second argument.
Definition at line 1498 of file mlTypeDefs.h.
Function_ArrayRescale MLTypeInfos::arrayRescale |
Scales the values from the first parameter with the second parameter and offsets it with the value from the third parameter, writing it to the position of the fourth parameter, times the fifth parameter.
Definition at line 1488 of file mlTypeDefs.h.
Function_CastFromDouble MLTypeInfos::castFromDouble |
Casts the first (the double) parameter to the data type and returns it into second parameter.
Definition at line 1470 of file mlTypeDefs.h.
Function_CastFromInt MLTypeInfos::castFromInt |
Casts the first (the integer) parameter to the data type and returns it into second parameter.
Definition at line 1468 of file mlTypeDefs.h.
Function_CastFromOtherType MLTypeInfos::castFromOtherType |
Casts another registered type to data.
Definition at line 1472 of file mlTypeDefs.h.
Function_CastToBool MLTypeInfos::castToBool |
Returns a type value cast to bool. Usually an equality to 0 should return false
, e.g., a null vector.
Definition at line 1459 of file mlTypeDefs.h.
Function_CastToDouble MLTypeInfos::castToDouble |
Returns a type value cast to double.
Definition at line 1463 of file mlTypeDefs.h.
Referenced by ml::PCLMLTools::appendSubImageVoxelsToPointCloud().
Function_CastToInt MLTypeInfos::castToInt |
Returns a type value cast to integer.
Definition at line 1461 of file mlTypeDefs.h.
Function_CastToOtherType MLTypeInfos::castToOtherType |
Casts data to another registered type.
Definition at line 1465 of file mlTypeDefs.h.
size_t MLTypeInfos::componentOffsets[ML_MAX_COMPONENTS_EXTENDED_TYPE] |
Array of offsets from the first to other components to address any component directly.
Definition at line 1369 of file mlTypeDefs.h.
Function_CopyValue MLTypeInfos::copy |
Copies the first parameter to the second one.
Definition at line 1450 of file mlTypeDefs.h.
MLint32 MLTypeInfos::dataTypeId |
Real MLDataType id of under which these operations are registered as data type.
Definition at line 1388 of file mlTypeDefs.h.
MLdouble MLTypeInfos::dblMax |
double maximum of data type if it exists.
Definition at line 1351 of file mlTypeDefs.h.
MLdouble MLTypeInfos::dblMin |
double minimum of data type if it exists.
Definition at line 1348 of file mlTypeDefs.h.
Function_GetComponent MLTypeInfos::getComponent |
Returns the n-th component of the type as double.
Definition at line 1446 of file mlTypeDefs.h.
Function_GetStringValue MLTypeInfos::getStringValue |
Returns a value as a string.
If possible, it should contain only numbers and spaces, no commas, colons, brackets, etc., to have better chances for conversions to MLFields. The returned string must be freed with MLFree() or ml::Memory::freeMemory().
Definition at line 1435 of file mlTypeDefs.h.
const char** MLTypeInfos::goodCastTos |
Data types names to which this type can be cast without information or functionality loss.
Definition at line 1366 of file mlTypeDefs.h.
Function_Interpolate MLTypeInfos::interpolate |
Interpolates linearly between the first and the second parameter, at the position given by the third parameter (between 0 and 1).
Result written into parameter three.
Definition at line 1503 of file mlTypeDefs.h.
Function_IsEqualToType MLTypeInfos::isEqualToType |
Returns true
if both parameters are equal; otherwise, it returns false
.
Definition at line 1475 of file mlTypeDefs.h.
Function_IsEqualToTypeWithEpsilon MLTypeInfos::isEqualToTypeWithEpsilon |
Returns true
if both parameters are equal within a static epsilon; otherwise, it returns false
.
Definition at line 1478 of file mlTypeDefs.h.
Function_ApplyDoubleOperation MLTypeInfos::multWithDouble |
Implements multiplication with double. Result is written into parameter three.
Definition at line 1508 of file mlTypeDefs.h.
Function_ApplyIntOperation MLTypeInfos::multWithInt |
Implements multiplication with integer. Result is written into parameter three.
Definition at line 1506 of file mlTypeDefs.h.
Function_MultWithOtherType MLTypeInfos::multWithOtherType |
Implements multiplication with another type. Result is written into parameter three.
Definition at line 1512 of file mlTypeDefs.h.
Function_ApplyOperation MLTypeInfos::multWithType |
Implements multiplication with its own type. Result is written into parameter three.
Definition at line 1510 of file mlTypeDefs.h.
const char* MLTypeInfos::name |
Pointer to the data type name.
Definition at line 1342 of file mlTypeDefs.h.
Referenced by ml::MLTStdTypeInfos< VTYP >::typeName().
Function_CopyValue MLTypeInfos::negate |
Negates the value.
Definition at line 1481 of file mlTypeDefs.h.
Function_CopyValue MLTypeInfos::normalize |
Normalizes the type value from parameter 1 and writes it into parameter 2.
Definition at line 1483 of file mlTypeDefs.h.
size_t MLTypeInfos::numComponents |
Number of components of this data type. Equals number of characters in *structInfoString.
Definition at line 1336 of file mlTypeDefs.h.
size_t MLTypeInfos::numGoodCastTos |
Number of datatypes to which this type can be cast without information or functionality loss.
Definition at line 1363 of file mlTypeDefs.h.
Function_ApplyDoubleOperation MLTypeInfos::plusDouble |
Implements double addition to parameter one. Result is written into parameter three.
Definition at line 1517 of file mlTypeDefs.h.
Function_ApplyIntOperation MLTypeInfos::plusInt |
Implements integer addition to parameter one. Result is written into parameter three.
Definition at line 1515 of file mlTypeDefs.h.
Function_ApplyOperation MLTypeInfos::plusType |
Implements parameter two addition to parameter one. Result is written into parameter three.
Definition at line 1519 of file mlTypeDefs.h.
MLTypePropertyBits MLTypeInfos::propertyBits |
Variable containing an enabled bit for each defined property.
Definition at line 1394 of file mlTypeDefs.h.
MLDataType MLTypeInfos::rangeAndPrecisionEquivalent |
Standard data type which has a comparable range and precision behavior.
Definition at line 1345 of file mlTypeDefs.h.
Function_SetComponent MLTypeInfos::setComponent |
Sets the n-th component of the type from double (applying rounding if needed).
Definition at line 1448 of file mlTypeDefs.h.
Function_SetStringValue MLTypeInfos::setStringValue |
Try to convert string as far as possible. If string cannot be scanned at all, then use the data type default.
Definition at line 1437 of file mlTypeDefs.h.
Function_SetTo MLTypeInfos::setToDefault |
Sets the value to default value. Must be implemented.
Definition at line 1444 of file mlTypeDefs.h.
Function_SetTo MLTypeInfos::setToMaximum |
Sets the value to minimum value. Must be implemented.
Definition at line 1442 of file mlTypeDefs.h.
Function_SetTo MLTypeInfos::setToMinimum |
Sets the value to minimum value. Must be implemented.
Definition at line 1440 of file mlTypeDefs.h.
const char* MLTypeInfos::structInfoString |
Pointer to a NULL-terminated string describing the type configuration.
"b" for a boolean. "c" for an unsigned character. "C" for a (signed) character. "s" for an unsigned short. "S" for a signed short. "i" for an unsigned int. "I" for a signed int. "l" for an unsigned long. "L" for a signed long. "f" for a float. "d" for a double. "D" for a long double. This way, a data type consisting of a float[3], a bool, and two signed integers would lead to "fffbII".
Definition at line 1385 of file mlTypeDefs.h.
const MLTypeData* MLTypeInfos::typeDefaultPtr |
Data type default specified by derived class.
Definition at line 1360 of file mlTypeDefs.h.
MLTypeGroup MLTypeInfos::typeGroup |
Type group to which this type belongs.
Definition at line 1391 of file mlTypeDefs.h.
const MLTypeData* MLTypeInfos::typeMaxPtr |
Data type maximum specified by derived class.
Definition at line 1357 of file mlTypeDefs.h.
const MLTypeData* MLTypeInfos::typeMinPtr |
Data type minimum specified by derived class.
Definition at line 1354 of file mlTypeDefs.h.
size_t MLTypeInfos::typeSize |
sizeof the data type in bytes.
Definition at line 1339 of file mlTypeDefs.h.