MeVisLab Toolbox Reference
MLTypeInfos Struct Reference

Structure containing all data type features and pointers to all functions needed to implement operations on any extended type. More...

#include <mlTypeDefs.h>

Inheritance diagram for MLTypeInfos:
ml::MLTStdTypeInfos< VTYP >

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 MLTypeDatatypeMinPtr
 Data type minimum specified by derived class. More...
 
const MLTypeDatatypeMaxPtr
 Data type maximum specified by derived class. More...
 
const MLTypeDatatypeDefaultPtr
 Data type default specified by derived class. More...
 
size_t numGoodCastTos
 Number of data types to which this type can be casted without information or functionality loss. More...
 
const char ** goodCastTos
 Data types names to which this type can be casted 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
 Converts string s to value and write result into r. More...
 
Function_SetTo setToMinimum
 Sets value to minimum value. Must be implemented. More...
 
Function_SetTo setToMaximum
 Sets value to minimum value. Must be implemented. More...
 
Function_SetTo setToDefault
 Sets value to default value. Must be implemented. More...
 
Function_GetComponent getComponent
 Get n-th component of the type as double. More...
 
Function_SetComponent setComponent
 Set n-th component of the type from double (applying rounding if needed) More...
 
Function_CopyValue copy
 Copies first parameter to second one. More...
 
Function_ArrayCopy arrayCopy
 Copies number of elements at first parameter to second one. More...
 
Function_ArrayCopyWithStrides arrayCopyWithStrides
 Same as above, but allows to specify stride values for source and destination. More...
 
Function_ArrayFill arrayFill
 Sets first parameter to array at 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 false. More...
 
Function_IsEqualToTypeWithEpsilon isEqualToTypeWithEpsilon
 Returns true if both parameters are equal within a static epsilon, otherwise false. More...
 
Function_CopyValue negate
 Negates the value. More...
 
Function_CopyValue normalize
 Normalizes the type value from parameter 1 and write it into parameter 2. More...
 
Function_ArrayRescale arrayRescale
 Scale the values from the first parameter with the second parameter and offset 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
 Check that 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
 Get the minimum and maximum component values from the array in the first argument, and return it in the third and fourth argument, the size of the array is in the second argument. More...
 
Function_Interpolate interpolate
 Interpolate 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 written into parameter three. More...
 
Function_ApplyDoubleOperation multWithDouble
 Implements multiplication with double. Result written into parameter three. More...
 
Function_ApplyOperation multWithType
 Implements multiplication with its own type. Result written into parameter three. More...
 
Function_MultWithOtherType multWithOtherType
 Implements multiplication with another type. Result written into parameter three. More...
 
Function_ApplyIntOperation plusInt
 Implements integer addition to parameter one. Result written into parameter three. More...
 
Function_ApplyDoubleOperation plusDouble
 Implements double addition to parameter one. Result written into parameter three. More...
 
Function_ApplyOperation plusType
 Implements parameter two addition to parameter one. Result written into parameter three. More...
 

Detailed Description

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 data types used by the ML see mlStdTypeInfos.h.

Definition at line 1466 of file mlTypeDefs.h.

Member Typedef Documentation

◆ Function_ApplyDoubleOperation

typedef void(* MLTypeInfos::Function_ApplyDoubleOperation) (const MLTypeData *source, MLdouble value, MLTypeData *result)

Definition at line 1563 of file mlTypeDefs.h.

◆ Function_ApplyIntOperation

typedef void(* MLTypeInfos::Function_ApplyIntOperation) (const MLTypeData *source, MLint value, MLTypeData *result)

Definition at line 1562 of file mlTypeDefs.h.

◆ Function_ApplyOperation

typedef void(* MLTypeInfos::Function_ApplyOperation) (const MLTypeData *source1, const MLTypeData *source2, MLTypeData *result)

Definition at line 1564 of file mlTypeDefs.h.

◆ Function_ArrayCopy

typedef void(* MLTypeInfos::Function_ArrayCopy) (const MLTypeData *source, MLTypeData *dest, size_t size)

Definition at line 1568 of file mlTypeDefs.h.

◆ Function_ArrayCopyWithStrides

typedef void(* MLTypeInfos::Function_ArrayCopyWithStrides) (const MLTypeData *source, MLssize_t sourceStride, MLTypeData *dest, MLssize_t destStride, size_t size)

Definition at line 1570 of file mlTypeDefs.h.

◆ Function_ArrayEqualsValue

typedef bool(* MLTypeInfos::Function_ArrayEqualsValue) (const MLTypeData *value, const MLTypeData *buffer, size_t size)

Definition at line 1573 of file mlTypeDefs.h.

◆ Function_ArrayFill

typedef void(* MLTypeInfos::Function_ArrayFill) (const MLTypeData *fillValue, MLTypeData *dest, size_t size)

Definition at line 1569 of file mlTypeDefs.h.

◆ Function_ArrayGetMinMax

typedef void(* MLTypeInfos::Function_ArrayGetMinMax) (const MLTypeData *source, size_t size, MLdouble &min, MLdouble &max)

Definition at line 1574 of file mlTypeDefs.h.

◆ Function_ArrayRescale

typedef void(* MLTypeInfos::Function_ArrayRescale) (const MLTypeData *source, MLdouble scaleFactor, const MLTypeData *offset, MLTypeData *dest, size_t size)

Definition at line 1572 of file mlTypeDefs.h.

◆ Function_CastFromDouble

typedef void(* MLTypeInfos::Function_CastFromDouble) (MLdouble value, MLTypeData *result)

Definition at line 1557 of file mlTypeDefs.h.

◆ Function_CastFromInt

typedef void(* MLTypeInfos::Function_CastFromInt) (MLint value, MLTypeData *result)

Definition at line 1556 of file mlTypeDefs.h.

◆ Function_CastFromOtherType

typedef void(* MLTypeInfos::Function_CastFromOtherType) (const MLTypeInfos *myInfos, const MLTypeData *myData, MLTypeData *otherData)

Definition at line 1566 of file mlTypeDefs.h.

◆ Function_CastToBool

typedef bool(* MLTypeInfos::Function_CastToBool) (const MLTypeData *p)

Definition at line 1552 of file mlTypeDefs.h.

◆ Function_CastToDouble

typedef MLdouble(* MLTypeInfos::Function_CastToDouble) (const MLTypeData *p)

Definition at line 1554 of file mlTypeDefs.h.

◆ Function_CastToInt

typedef MLint(* MLTypeInfos::Function_CastToInt) (const MLTypeData *p)

Definition at line 1553 of file mlTypeDefs.h.

◆ Function_CastToOtherType

typedef void(* MLTypeInfos::Function_CastToOtherType) (const MLTypeData *myData, const MLTypeInfos *otherInfos, MLTypeData *otherData)

Definition at line 1565 of file mlTypeDefs.h.

◆ Function_CopyValue

typedef void(* MLTypeInfos::Function_CopyValue) (const MLTypeData *source, MLTypeData *dest)

Definition at line 1559 of file mlTypeDefs.h.

◆ Function_GetComponent

typedef MLdouble(* MLTypeInfos::Function_GetComponent) (const MLTypeData *source, size_t componentIndex)

Definition at line 1575 of file mlTypeDefs.h.

◆ Function_GetStringValue

typedef char*(* MLTypeInfos::Function_GetStringValue) (const MLTypeData *p)

Definition at line 1555 of file mlTypeDefs.h.

◆ Function_Interpolate

typedef void(* MLTypeInfos::Function_Interpolate) (const MLTypeData *source1, const MLTypeData *source2, MLdouble alpha, MLTypeData *result)

Definition at line 1571 of file mlTypeDefs.h.

◆ Function_IsEqualToType

typedef bool(* MLTypeInfos::Function_IsEqualToType) (const MLTypeData *source1, const MLTypeData *source2)

Definition at line 1560 of file mlTypeDefs.h.

◆ Function_IsEqualToTypeWithEpsilon

typedef bool(* MLTypeInfos::Function_IsEqualToTypeWithEpsilon) (const MLTypeData *source1, const MLTypeData *source2, MLdouble epsilon)

Definition at line 1561 of file mlTypeDefs.h.

◆ Function_MultWithOtherType

typedef void(* MLTypeInfos::Function_MultWithOtherType) (const MLTypeInfos *myInfos, const MLTypeData *myData, const MLTypeData *otherData, MLTypeData *result)

Definition at line 1567 of file mlTypeDefs.h.

◆ Function_SetComponent

typedef void(* MLTypeInfos::Function_SetComponent) (MLTypeData *dest, size_t componentIndex, MLdouble value)

Definition at line 1576 of file mlTypeDefs.h.

◆ Function_SetStringValue

typedef void(* MLTypeInfos::Function_SetStringValue) (const char *str, MLTypeData *result)

Definition at line 1558 of file mlTypeDefs.h.

◆ Function_SetTo

typedef void(* MLTypeInfos::Function_SetTo) (MLTypeData *dest)

Definition at line 1551 of file mlTypeDefs.h.

Member Data Documentation

◆ arrayCopy

Function_ArrayCopy MLTypeInfos::arrayCopy

Copies number of elements at first parameter to second one.

Definition at line 1603 of file mlTypeDefs.h.

◆ arrayCopyWithStrides

Function_ArrayCopyWithStrides MLTypeInfos::arrayCopyWithStrides

Same as above, but allows to specify stride values for source and destination.

Definition at line 1605 of file mlTypeDefs.h.

◆ arrayEqualsValue

Function_ArrayEqualsValue MLTypeInfos::arrayEqualsValue

Check that 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 1644 of file mlTypeDefs.h.

◆ arrayFill

Function_ArrayFill MLTypeInfos::arrayFill

Sets first parameter to array at second one.

Definition at line 1607 of file mlTypeDefs.h.

◆ arrayGetMinMax

Function_ArrayGetMinMax MLTypeInfos::arrayGetMinMax

Get the minimum and maximum component values from the array in the first argument, and return it in the third and fourth argument, the size of the array is in the second argument.

Definition at line 1649 of file mlTypeDefs.h.

◆ arrayRescale

Function_ArrayRescale MLTypeInfos::arrayRescale

Scale the values from the first parameter with the second parameter and offset it with the value from the third parameter, writing it to the position of the fourth parameter, times the fifth parameter.

Definition at line 1639 of file mlTypeDefs.h.

◆ castFromDouble

Function_CastFromDouble MLTypeInfos::castFromDouble

Casts the first (the double) parameter to the data type and returns it into second parameter.

Definition at line 1621 of file mlTypeDefs.h.

◆ castFromInt

Function_CastFromInt MLTypeInfos::castFromInt

Casts the first (the integer) parameter to the data type and returns it into second parameter.

Definition at line 1619 of file mlTypeDefs.h.

◆ castFromOtherType

Function_CastFromOtherType MLTypeInfos::castFromOtherType

Casts another registered type to data.

Definition at line 1623 of file mlTypeDefs.h.

◆ castToBool

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 1610 of file mlTypeDefs.h.

◆ castToDouble

Function_CastToDouble MLTypeInfos::castToDouble

Returns a type value cast to double.

Definition at line 1614 of file mlTypeDefs.h.

Referenced by ml::PCLMLTools::appendSubImageVoxelsToPointCloud().

◆ castToInt

Function_CastToInt MLTypeInfos::castToInt

Returns a type value cast to integer.

Definition at line 1612 of file mlTypeDefs.h.

◆ castToOtherType

Function_CastToOtherType MLTypeInfos::castToOtherType

Casts data to another registered type.

Definition at line 1616 of file mlTypeDefs.h.

◆ componentOffsets

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 1518 of file mlTypeDefs.h.

◆ copy

Function_CopyValue MLTypeInfos::copy

Copies first parameter to second one.

Definition at line 1601 of file mlTypeDefs.h.

◆ dataTypeId

MLint32 MLTypeInfos::dataTypeId

Real MLDataType id of under which these operations are registered as data type.

Definition at line 1538 of file mlTypeDefs.h.

◆ dblMax

MLdouble MLTypeInfos::dblMax

double maximum of data type if it exists.

Definition at line 1494 of file mlTypeDefs.h.

◆ dblMin

MLdouble MLTypeInfos::dblMin

double minimum of data type if it exists.

Definition at line 1491 of file mlTypeDefs.h.

◆ getComponent

Function_GetComponent MLTypeInfos::getComponent

Get n-th component of the type as double.

Definition at line 1597 of file mlTypeDefs.h.

◆ getStringValue

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 1585 of file mlTypeDefs.h.

◆ goodCastTos

const char** MLTypeInfos::goodCastTos

Data types names to which this type can be casted without information or functionality loss.

Definition at line 1509 of file mlTypeDefs.h.

◆ interpolate

Function_Interpolate MLTypeInfos::interpolate

Interpolate 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 1654 of file mlTypeDefs.h.

◆ isEqualToType

Function_IsEqualToType MLTypeInfos::isEqualToType

Returns true if both parameters are equal, otherwise false.

Definition at line 1626 of file mlTypeDefs.h.

◆ isEqualToTypeWithEpsilon

Function_IsEqualToTypeWithEpsilon MLTypeInfos::isEqualToTypeWithEpsilon

Returns true if both parameters are equal within a static epsilon, otherwise false.

Definition at line 1629 of file mlTypeDefs.h.

◆ multWithDouble

Function_ApplyDoubleOperation MLTypeInfos::multWithDouble

Implements multiplication with double. Result written into parameter three.

Definition at line 1659 of file mlTypeDefs.h.

◆ multWithInt

Function_ApplyIntOperation MLTypeInfos::multWithInt

Implements multiplication with integer. Result written into parameter three.

Definition at line 1657 of file mlTypeDefs.h.

◆ multWithOtherType

Function_MultWithOtherType MLTypeInfos::multWithOtherType

Implements multiplication with another type. Result written into parameter three.

Definition at line 1663 of file mlTypeDefs.h.

◆ multWithType

Function_ApplyOperation MLTypeInfos::multWithType

Implements multiplication with its own type. Result written into parameter three.

Definition at line 1661 of file mlTypeDefs.h.

◆ name

const char* MLTypeInfos::name

Pointer to the data type name.

Definition at line 1485 of file mlTypeDefs.h.

Referenced by ml::MLTStdTypeInfos< VTYP >::typeName().

◆ negate

Function_CopyValue MLTypeInfos::negate

Negates the value.

Definition at line 1632 of file mlTypeDefs.h.

◆ normalize

Function_CopyValue MLTypeInfos::normalize

Normalizes the type value from parameter 1 and write it into parameter 2.

Definition at line 1634 of file mlTypeDefs.h.

◆ numComponents

size_t MLTypeInfos::numComponents

Number of components of this data type. Equals number of characters in *structInfoString.

Definition at line 1478 of file mlTypeDefs.h.

◆ numGoodCastTos

size_t MLTypeInfos::numGoodCastTos

Number of data types to which this type can be casted without information or functionality loss.

Definition at line 1506 of file mlTypeDefs.h.

◆ plusDouble

Function_ApplyDoubleOperation MLTypeInfos::plusDouble

Implements double addition to parameter one. Result written into parameter three.

Definition at line 1668 of file mlTypeDefs.h.

◆ plusInt

Function_ApplyIntOperation MLTypeInfos::plusInt

Implements integer addition to parameter one. Result written into parameter three.

Definition at line 1666 of file mlTypeDefs.h.

◆ plusType

Function_ApplyOperation MLTypeInfos::plusType

Implements parameter two addition to parameter one. Result written into parameter three.

Definition at line 1670 of file mlTypeDefs.h.

◆ propertyBits

MLTypePropertyBits MLTypeInfos::propertyBits

Variable containing an enabled bit for each defined property.

Definition at line 1544 of file mlTypeDefs.h.

◆ rangeAndPrecisionEquivalent

MLDataType MLTypeInfos::rangeAndPrecisionEquivalent

Standard data type which has a comparable range and precision behavior.

Definition at line 1488 of file mlTypeDefs.h.

◆ setComponent

Function_SetComponent MLTypeInfos::setComponent

Set n-th component of the type from double (applying rounding if needed)

Definition at line 1599 of file mlTypeDefs.h.

◆ setStringValue

Function_SetStringValue MLTypeInfos::setStringValue

Converts string s to value and write result into r.

Try to convert string as far as possible. If string cannot be scanned at all then use the data type default.

Definition at line 1588 of file mlTypeDefs.h.

◆ setToDefault

Function_SetTo MLTypeInfos::setToDefault

Sets value to default value. Must be implemented.

Definition at line 1595 of file mlTypeDefs.h.

◆ setToMaximum

Function_SetTo MLTypeInfos::setToMaximum

Sets value to minimum value. Must be implemented.

Definition at line 1593 of file mlTypeDefs.h.

◆ setToMinimum

Function_SetTo MLTypeInfos::setToMinimum

Sets value to minimum value. Must be implemented.

Definition at line 1591 of file mlTypeDefs.h.

◆ structInfoString

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. So a data type consisting of a float[3], a bool, and two signed integers would lead to "fffbII".

Definition at line 1535 of file mlTypeDefs.h.

◆ typeDefaultPtr

const MLTypeData* MLTypeInfos::typeDefaultPtr

Data type default specified by derived class.

Definition at line 1503 of file mlTypeDefs.h.

◆ typeGroup

MLTypeGroup MLTypeInfos::typeGroup

Type group to which this type belongs.

Definition at line 1541 of file mlTypeDefs.h.

◆ typeMaxPtr

const MLTypeData* MLTypeInfos::typeMaxPtr

Data type maximum specified by derived class.

Definition at line 1500 of file mlTypeDefs.h.

◆ typeMinPtr

const MLTypeData* MLTypeInfos::typeMinPtr

Data type minimum specified by derived class.

Definition at line 1497 of file mlTypeDefs.h.

◆ typeSize

size_t MLTypeInfos::typeSize

sizeof the data type in bytes.

Definition at line 1482 of file mlTypeDefs.h.


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