13 #ifndef ML_TYPE_DEFS_H
14 #define ML_TYPE_DEFS_H
18 #include "MeVisLabVersion.h"
26 #include <ThirdPartyWarningsDisable.h>
33 #include <sys/types.h>
36 #include <ThirdPartyWarningsRestore.h>
39 #if ML_DEPRECATED_SINCE(3,5,0)
40 #define ML_IS_64_BIT_SYSTEM
60 #define ML_NAMESPACE ml
63 #ifndef ML_START_NAMESPACE
67 #define ML_START_NAMESPACE namespace ML_NAMESPACE {
70 #ifndef ML_END_NAMESPACE
73 #define ML_END_NAMESPACE }
86 #define ML_PREFIX "ML"
92 #define ML_CONSTANT_PREFIX "ML_"
105 #define ML_INT8_MIN -128
106 #define ML_INT8_MAX 0x7F
109 #define _ML_INT8 MLint8
117 #define ML_UINT8_MIN 0x00
118 #define ML_UINT8_MAX 0xFF
121 #define _ML_UINT8 MLuint8
134 #define ML_INT16_MIN -32768
135 #define ML_INT16_MAX 0x7FFF
138 #define _ML_INT16 MLint16
151 #define ML_UINT16_MIN 0x0000
152 #define ML_UINT16_MAX 0xFFFF
155 #define _ML_UINT16 MLuint16
176 #define ML_INT32_MIN (static_cast<MLint32>(0x80000000L))
177 #define ML_INT32_MAX (static_cast<MLint32>(0x7FFFFFFFL))
180 #define _ML_INT32 MLint32
196 #define ML_UINT32_MIN (static_cast<MLuint32>(0x00000000L))
197 #define ML_UINT32_MAX (static_cast<MLuint32>(0xFFFFFFFFL))
200 #define _ML_UINT32 MLuint32
209 #define ML_FLOAT_MIN FLT_MIN
210 #define ML_FLOAT_MAX FLT_MAX
211 #define ML_FLOAT_EPSILON FLT_EPSILON
213 #define ML_FLOAT_DIG (FLT_DIG+2)
216 #define _ML_FLOAT MLfloat
225 #define ML_DOUBLE_MIN DBL_MIN
226 #define ML_DOUBLE_MAX DBL_MAX
227 #define ML_DOUBLE_EPSILON DBL_EPSILON
228 #define ML_DOUBLE_DIG DBL_DIG
231 #define _ML_DOUBLE MLdouble
240 #define ML_LDOUBLE_MIN LDBL_MIN
241 #define ML_LDOUBLE_MAX LDBL_MAX
242 #define ML_LDOUBLE_EPSILON LDBL_EPSILON
243 #define ML_LDOUBLE_DIG LDBL_DIG
246 #define _ML_LDOUBLE MLldouble
253 #define ML_NUM_STANDARD_TYPES 10
259 #define ML_MAX_COMPONENTS_EXTENDED_TYPE 512
266 #define ML_LUMINANCE "LUMINANCE"
268 #define ML_NEGATIVE "NEGATIVE"
270 #define ML_PALETTE "PALETTE"
277 #define ML_GREEN "GREEN"
279 #define ML_BLUE "BLUE"
281 #define ML_ALPHA "ALPHA"
284 #define ML_CYAN "CYAN"
286 #define ML_MAGENTA "MAGENTA"
288 #define ML_YELLOW "YELLOW"
290 #define ML_BLACK "BLACK"
295 #define ML_SATURATION "SATURATION"
297 #define ML_VALUE "VALUE"
299 #define ML_LIGHTNESS "LIGHTNESS"
302 #define ML_YIQ_Y "YIQ_Y"
304 #define ML_YIQ_I "YIQ_I"
306 #define ML_YIQ_Q "YIQ_Q"
311 #define ML_CIE_X "CIE_X"
313 #define ML_CIE_Y "CIE_Y"
315 #define ML_CIE_Z "CIE_Z"
317 #define ML_LUV_L "LUV_L"
319 #define ML_LUV_U "LUV_U"
321 #define ML_LUV_V "LUV_V"
324 #define ML_UNKNOWN "UNKNOWN"
334 #define ML_REAL "REAL_PART"
336 #define ML_IMAG "IMAG_PART"
352 #define ML_MAGNITUDE "MAGNITUDE"
354 #define ML_ANGLE "ANGLE"
369 #define ML_QUOTE_INTERNAL(A) #A
370 #define ML_QUOTE(A) ML_QUOTE_INTERNAL(A)
377 #ifdef ML_DISABLE_CPP
378 #define ML_MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
380 #if ML_DEPRECATED_SINCE(3,5,0)
382 #ifndef ML_NO_DEPRECATED_WARNINGS
383 [[deprecated(
"ML_MIN is deprecated since MeVisLab 3.5.0. Please use std::min() instead")]]
385 constexpr
const T& ml_deprecated_since_350_min(
const T& a,
const T& b) {
return (b < a) ? b : a; }
386 #define ML_MIN(A, B) ml_deprecated_since_350_min((A), (B))
395 #ifdef ML_DISABLE_CPP
396 #define ML_MAX(X, Y) (((X) > (Y)) ? (X) : (Y))
398 #if ML_DEPRECATED_SINCE(3,5,0)
400 #ifndef ML_NO_DEPRECATED_WARNINGS
401 [[deprecated(
"ML_MAX is deprecated since MeVisLab 3.5.0. Please use std::max() instead")]]
403 constexpr
const T& ml_deprecated_since_350_max(
const T& a,
const T& b) {
return (a < b) ? b : a; }
404 #define ML_MAX(A, B) ml_deprecated_since_350_max((A), (B))
413 #ifdef ML_DISABLE_CPP
414 #define ML_ABS(X) (((X) < (0)) ? ((X) * (-1)) : (X))
416 #if ML_DEPRECATED_SINCE(3,5,0)
418 #ifndef ML_NO_DEPRECATED_WARNINGS
419 [[deprecated(
"ML_ABS is deprecated since MeVisLab 3.5.0. Please use std::abs() instead")]]
421 auto ml_deprecated_since_350_abs(T x) {
return x < 0? (static_cast<T>(-1) * x) : x; }
422 #define ML_ABS(X) ml_deprecated_since_350_abs((X))
431 #ifdef ML_DISABLE_CPP
432 #define ML_CLAMP(v,l,h) ((v)<(l) ? (l) : (v) > (h) ? (h) : (v))
434 #if ML_DEPRECATED_SINCE(3,5,0)
436 #ifndef ML_NO_DEPRECATED_WARNINGS
437 [[deprecated(
"ML_CLAMP is deprecated since MeVisLab 3.5.0. Please use std::clamp() instead")]]
439 constexpr
const T& ml_deprecated_since_350_clamp(
const T& v,
const T& lo,
const T& hi) {
return v < lo? lo : (hi < v? hi : v); }
440 #define ML_CLAMP(V, L, H) ml_deprecated_since_350_clamp((V), (L), (H));
448 #define ML_LERP(a,l,h) ((l)+(((h)-(l))*(a)))
455 # define ML_M_PI 3.14159265358979323846
459 # define ML_M_PI_2 1.57079632679489661923
474 #ifndef ML_SYSTEM_HAS_NO_64
478 #include <ThirdPartyWarningsDisable.h>
480 #include <ThirdPartyWarningsRestore.h>
483 #ifndef __STDC_LIMIT_MACROS
484 #define __STDC_LIMIT_MACROS
489 #if !defined(INT64_MIN)
490 #error "mlTypeDefs.h must be included first or the macro __STDC_LIMIT_MACROS must be defined!"
506 #define INT64_MIN 0x8000000000000000I64
509 #define INT64_MAX 0x7FFFFFFFFFFFFFFFI64
519 #define UINT64_MIN static_cast<MLuint64>(0)
522 #define UINT64_MAX 0xFFFFFFFFFFFFFFFFUI64
532 typedef unsigned long long MLuint64;
542 typedef unsigned char MLint64[8];
554 #define ML_INT64_MIN INT64_MIN
555 #define ML_INT64_MAX INT64_MAX
558 #define _ML_INT64 MLint64
564 #define ML_UINT64_MIN static_cast<MLuint64>(0)
565 #define ML_UINT64_MAX UINT64_MAX
568 #define _ML_UINT64 MLuint64
584 #define ML_INT_MIN ML_INT64_MIN
587 #define ML_INT_MAX ML_INT64_MAX
600 #define ML_UINT_MIN UINT64_MIN
603 #define ML_UINT_MAX UINT64_MAX
631 #define ML_USIZE_T_MIN ( static_cast<size_t>(0))
634 #define ML_USIZE_T_MAX (~static_cast<size_t>(0))
637 #define ML_SIZE_T_MIN ML_USIZE_T_MIN
640 #define ML_SIZE_T_MAX ML_USIZE_T_MAX
661 #define ML_SSIZE_T_MIN (static_cast<MLssize_t>(1) << (sizeof(MLssize_t)*8-1))
665 #define ML_SSIZE_T_MAX (static_cast<MLssize_t>(ML_USIZE_T_MAX ^ ML_SSIZE_T_MIN))
687 #if ML_DEPRECATED_SINCE(3,5,0)
692 typedef MLint32 MLPhysicalDataType;
694 #if defined(WIN32) && !defined(ML_NO_DEPRECATED_WARNINGS)
695 #pragma deprecated("MLPhysicalDataType")
703 #define ML_UNDEFINED_THREADID 0
715 #define ML_INVALID_DATA_TYPE -1
823 #define ML_INVALID_ERROR_CODE static_cast<MLErrorCode>(-1)
826 #define ML_RESULT_OK static_cast<MLErrorCode>( 0)
832 #define ML_UNKNOWN_EXCEPTION static_cast<MLErrorCode>( 1)
837 #define ML_NO_MEMORY static_cast<MLErrorCode>( 2)
840 #define ML_DISCONNECTED_GRAPH static_cast<MLErrorCode>( 3)
844 #define ML_CYCLIC_GRAPH static_cast<MLErrorCode>( 4)
847 #define ML_BAD_OPERATOR_POINTER static_cast<MLErrorCode>( 5)
850 #define ML_BAD_OPERATOR_OUTPUT_INDEX static_cast<MLErrorCode>( 6)
853 #define ML_BAD_FIELD static_cast<MLErrorCode>( 7)
859 #define ML_IMAGE_DATA_CALCULATION_FAILED static_cast<MLErrorCode>( 8)
862 #define ML_NO_IMAGE_INPUT_EXTENSION static_cast<MLErrorCode>( 9)
870 #define ML_NO_IMAGE_PROPS static_cast<MLErrorCode>(10)
873 #define ML_BAD_OPERATOR_INPUT_INDEX static_cast<MLErrorCode>(11)
878 #define ML_BAD_INPUT_IMAGE_POINTER static_cast<MLErrorCode>(12)
884 #define ML_BAD_DATA_TYPE static_cast<MLErrorCode>(13)
890 #define ML_PROGRAMMING_ERROR static_cast<MLErrorCode>(14)
897 #define ML_EMPTY_MESSAGE static_cast<MLErrorCode>(15)
905 #define ML_PAGE_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(16)
911 #define ML_PROPERTY_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(17)
918 #define ML_INBOX_CALCULATION_ERROR_IN_MODULE static_cast<MLErrorCode>(18)
925 #define ML_BAD_PARAMETER static_cast<MLErrorCode>(19)
934 #define ML_CALCULATION_ERROR static_cast<MLErrorCode>(20)
937 #define ML_BAD_DIMENSION static_cast<MLErrorCode>(21)
951 #define ML_RECURSION_ERROR static_cast<MLErrorCode>(22)
958 #define ML_LIBRARY_LOAD_ERROR static_cast<MLErrorCode>(23)
962 #define ML_FILE_IO_ERROR static_cast<MLErrorCode>(24)
966 #define ML_AFTER_EFFECT static_cast<MLErrorCode>(25)
970 #define ML_BAD_INDEX static_cast<MLErrorCode>(26)
974 #define ML_OUT_OF_RANGE static_cast<MLErrorCode>(27)
979 #define ML_MISSING_VOXEL_TYPE_OPERATIONS static_cast<MLErrorCode>(28)
983 #define ML_BAD_FIELD_TYPE static_cast<MLErrorCode>(29)
986 #define ML_BAD_FIELD_POINTER_OR_NO_MEMORY static_cast<MLErrorCode>(30)
991 #define ML_FIELD_CREATION_ERROR_OR_NO_MEMORY static_cast<MLErrorCode>(31)
994 #define ML_TYPE_INITIALIZATION_ERROR static_cast<MLErrorCode>(32)
997 #define ML_CONSTRUCTOR_EXCEPTION static_cast<MLErrorCode>(33)
1001 #define ML_DESTRUCTOR_EXCEPTION static_cast<MLErrorCode>(34)
1004 #define ML_TABLE_FULL static_cast<MLErrorCode>(35)
1008 #define ML_EXTERNAL_ERROR static_cast<MLErrorCode>(36)
1012 #define ML_BAD_BASE_FIELD static_cast<MLErrorCode>(37)
1016 #define ML_BAD_BASE_FIELD_CONTENT static_cast<MLErrorCode>(38)
1023 #define ML_TYPE_NOT_REGISTERED static_cast<MLErrorCode>(39)
1030 #define ML_LIBRARY_INIT_ERROR static_cast<MLErrorCode>(40)
1035 #define ML_BAD_POINTER_OR_0 static_cast<MLErrorCode>(41)
1040 #define ML_BAD_STATE static_cast<MLErrorCode>(42)
1043 #define ML_TOO_MANY_PUSHES_OR_ADDS static_cast<MLErrorCode>(43)
1046 #define ML_TOO_MANY_POPS_OR_REMOVES static_cast<MLErrorCode>(44)
1049 #define ML_STACK_TABLE_OR_BUFFER_EMPTY static_cast<MLErrorCode>(45)
1052 #define ML_STACK_TABLE_OR_BUFFER_NOT_EMPTY static_cast<MLErrorCode>(46)
1055 #define ML_ELEMENT_NOT_FOUND static_cast<MLErrorCode>(47)
1059 #define ML_INVALID_FILE_NAME static_cast<MLErrorCode>(48)
1062 #define ML_INVALID_FILE_DESCRIPTOR static_cast<MLErrorCode>(49)
1065 #define ML_FILE_NOT_OPEN static_cast<MLErrorCode>(50)
1070 #define ML_NO_OR_INVALID_PERMISSIONS static_cast<MLErrorCode>(51)
1074 #define ML_DISK_OR_RESSOURCE_FULL static_cast<MLErrorCode>(52)
1081 #define ML_FILE_OR_DATA_STRUCTURE_CORRUPTED static_cast<MLErrorCode>(53)
1085 #define ML_INVALID_VERSION static_cast<MLErrorCode>(54)
1092 #define ML_UNKNOWN_OR_INVALID_COMPRESSION_SCHEME static_cast<MLErrorCode>(55)
1099 #define ML_TYPE_ALREADY_REGISTERED static_cast<MLErrorCode>(56)
1103 #define ML_TYPE_IS_ABSTRACT static_cast<MLErrorCode>(57)
1107 #define ML_TYPE_NOT_DERIVED_FROM_EXPECTED_PARENT_CLASS static_cast<MLErrorCode>(58)
1110 #define ML_OPERATION_INTERRUPTED static_cast<MLErrorCode>(59)
1114 #define ML_BAD_PAGE_ID static_cast<MLErrorCode>(60)
1119 #define ML_OUT_OF_RESSOURCES static_cast<MLErrorCode>(61)
1122 #define ML_OBJECT_OR_FILE_EXISTS static_cast<MLErrorCode>(62)
1125 #define ML_OBJECT_OR_FILE_DOES_NOT_EXIST static_cast<MLErrorCode>(63)
1128 #define ML_DEADLOCK_WOULD_OCCURR static_cast<MLErrorCode>(64)
1133 #define ML_COULD_NOT_OPEN_FILE static_cast<MLErrorCode>(65)
1137 #define ML_COULD_NOT_CREATE_OPEN_OR_MODIFY_FILE ML_COULD_NOT_OPEN_FILE
1140 #define ML_LIBRARY_UNLOAD_ERROR static_cast<MLErrorCode>(66)
1143 #define ML_LIBRARY_UNLOAD_EXCEPTION static_cast<MLErrorCode>(67)
1146 #define ML_NOT_SUPPORTED_ON_THIS_SYSTEM static_cast<MLErrorCode>(68)
1149 #define ML_OBJECT_STILL_REFERENCED static_cast<MLErrorCode>(69)
1152 #define ML_REQUEST_OUTSIDE_OF_IMAGE static_cast<MLErrorCode>(70)
1155 #define MLNumDefaultErrorCodes static_cast<MLErrorCode>(71)
1184 #if ML_DEPRECATED_SINCE(3,5,0)
1229 #if ML_DEPRECATED_SINCE(3,5,0)
1292 const char* messStr,
1294 const char** infos);
1309 void* objectData1,
void* objData2);
1413 #if ML_DEPRECATED_SINCE(3,5,0)
1423 ML_DEPRECATED
typedef bool MLCTBool;
1426 ML_DEPRECATED
typedef MLint MLCTInt;
1429 ML_DEPRECATED
typedef MLuint64 MLCTUInt;
1472 #if ML_DEPRECATED_SINCE(3,5,0)
1512 #if ML_DEPRECATED_SINCE(3,5,0)
1686 #define ML_CALC_FTYPE MLdouble
1693 #define ML_CALC_ITYPE MLint
1700 #define ML_TYPE_ASSIGN_FUNCTION_POINTERS() \
1701 getStringValue = MLTYPE_getStringValue; \
1702 setStringValue = MLTYPE_setStringValue; \
1703 setToMinimum = MLTYPE_setToMinimum; \
1704 setToMaximum = MLTYPE_setToMaximum; \
1705 setToDefault = MLTYPE_setToDefault; \
1706 getComponent = MLTYPE_getComponent; \
1707 setComponent = MLTYPE_setComponent; \
1708 copy = MLTYPE_copy; \
1709 arrayCopy = MLTYPE_arrayCopy; \
1710 arrayCopyWithStrides = MLTYPE_arrayCopyWithStrides; \
1711 arrayFill = MLTYPE_arrayFill; \
1713 castToBool = MLTYPE_castToBool; \
1714 castToInt = MLTYPE_castToInt; \
1715 castToDouble = MLTYPE_castToDouble; \
1716 castToOtherType = MLTYPE_castToOtherType; \
1717 castFromInt = MLTYPE_castFromInt; \
1718 castFromDouble = MLTYPE_castFromDouble; \
1719 castFromOtherType = MLTYPE_castFromOtherType; \
1721 isEqualToType = MLTYPE_isEqualToType; \
1722 isEqualToTypeWithEpsilon= MLTYPE_isEqualToTypeWithEpsilon;\
1724 negate = MLTYPE_negate; \
1725 normalize = MLTYPE_normalize; \
1727 arrayRescale = MLTYPE_arrayRescale; \
1728 interpolate = MLTYPE_interpolate; \
1729 arrayEqualsValue = MLTYPE_arrayEqualsValue; \
1730 arrayGetMinMax = MLTYPE_arrayGetMinMax; \
1732 multWithInt = MLTYPE_multWithInt; \
1733 multWithDouble = MLTYPE_multWithDouble; \
1734 multWithType = MLTYPE_multWithType; \
1735 multWithOtherType = MLTYPE_multWithOtherType; \
1737 plusInt = MLTYPE_plusInt; \
1738 plusDouble = MLTYPE_plusDouble; \
1739 plusType = MLTYPE_plusType;
MLint32 MLDataType
MLDataType.
MLDataTypeIds
MLDataType identifiers.
#define ML_MAX_COMPONENTS_EXTENDED_TYPE
Maximum number of components for extended types.
@ MLuint8Type
Enumerator for the unsigned 8 bit ML integer type.
@ MLuint32Type
Enumerator for the unsigned 32 bit ML integer type.
@ MLfloatType
Enumerator for the signed 32 bit ML floating point type.
@ MLuint16Type
Enumerator for the unsigned 16 bit ML integer type.
@ MLint64Type
Enumerator for the signed 64 bit ML integer type.
@ MLint16Type
Enumerator for the signed 16 bit ML integer type.
@ MLint32Type
Enumerator for the signed 32 bit ML integer type.
@ MLdoubleType
Enumerator for the signed 64 bit ML floating point type.
@ MLint8Type
Enumerator for the signed 8 bit ML integer type.
@ MLuint64Type
Enumerator for the unsigned 64 bit ML integer type.
MLint32 MLErrorCode
Type of an ML Error code.
MLCheckBits
Enumerator describing runtime and final checks in the ML.
@ ML_FINAL_RUNTIME_CHECK_BIT
Final checks in the RuntimeType system are activated.
@ ML_ALL_CHECKS_BITS
All available checks are activated.
@ ML_NO_CHECKS_BITS
All checks are deactivated.
MLNotifyChangedObjectType
Objects of the ML which call the registered functions when changed.
@ ML_NOTIFY_NO_OBJECT_TYPE
@ ML_NOTIFY_ERROR_OUTPUT_OTHER_CHANGES
@ ML_NOTIFY_ERROR_OUTPUT_TERMINATION_TYPE
@ ML_NOTIFY_HOST_MAX_NUM_THREADS
@ ML_NOTIFY_CACHE_MONITORING_LEVEL
@ ML_NOTIFY_ERROR_OUTPUT_MESSAGE_FILTER
@ ML_NOTIFY_ERROR_OUTPUT_FULL_DEBUGGING
@ ML_NOTIFY_MODULE_INSTANTIATED
@ ML_NOTIFY_API_EXCEPTIONS
@ ML_NOTIFY_HOST_USE_CLASSIC_HOST
@ ML_NOTIFY_ERROR_OUTPUT_ERROR_OUTPUT_CB
@ ML_NOTIFY_CACHE_MEM_OPT_LEVEL
@ ML_NOTIFY_RUNTIME_TYPE_ADDED
@ ML_NOTIFY_HOST_BREAK_CHECK_CB
@ ML_NOTIFY_API_CHECKS_BITS
@ ML_NOTIFY_MODULE_DELETED
@ ML_NOTIFY_CACHE_MAX_SIZE
@ ML_NOTIFY_RUNTIME_TYPE_REMOVED
@ ML_NOTIFY_FIELD_HANDLED
@ ML_NOTIFY_ERROR_OUTPUT_DEBUG_ENV_NAMES
@ ML_NOTIFY_HOST_PROGRESS_CB
MLuint64 MLTypePropertyBits
Structure to define a bit mask which identifies all implemented functions for a data type.
signed short * MLint16Ptr
MLTerminator
Termination types for error handling.
@ ML_EXITCODE
Terminates the application with exit(ErrorCode), not recommended for use in normal code.
@ ML_EXIT0
Terminates the application with exit(0), not recommended for use in normal code.
@ ML_ABORT
Uses abort() to terminate the application which supports easily to start the debugger.
@ ML_CONTINUE
Tries to ignore the message and to continue.
double(* MLDblFuncPtr)(double)
A function pointer type to a function which returns a double and takes a double as argument.
MLint32 MLApplicationGetInt32PropertyCB(void *applicationUsrData, const char *propertyName, MLint16 *found)
Callback to the hosting application that is used to get an int value property with the propertyName f...
UINT64 MLuint64
Introduce platform independent 64 bit unsigned integer type.
MLMemoryErrorHandling
Enumerator to specify memory error handling.
@ ML_FATAL_MEMORY_ERROR
On allocation failure a fatal error print is done and NULL is returned.
@ ML_THROW_NO_MEMORY
On allocation failure a throw(ML_NO_MEMORY) is executed.
@ ML_RETURN_NULL
On allocation failure NULL is returned without error handling.
@ ML_FATAL_MEMORY_ERROR_AND_THROW_NO_MEMORY
On allocation failure a fatal error is posted and ML_NO_MEMORY is thrown.
MLNotifyChangedClassType
Codes for ML classes which may change:
@ ML_NOTIFY_MODULE
0x0020 = Module
@ ML_NOTIFY_API
0x0002 = API
@ ML_NOTIFY_CACHE
0x0008 = Cache
@ ML_NOTIFY_NO_OBJECT
0x0000 = No object
@ ML_NOTIFY_HOST
0x0010 = Host
@ ML_NOTIFY_RUNTIME
0x0004 = Runtime
@ ML_NOTIFY_ERROR_OUTPUT
0x0001 = ErrorOutput
long double * MLldoublePtr
MLint MLsoffset
Signed ML offset type which is a 32 bit signed integer on 32 bit platforms and a 64 bit integer on 64...
MLint64 * MLintPtr
A pointer to the signed ML integer type MLint.
UINT64 * MLuint64Ptr
Introduce platform independent 64 bit unsigned integer pointer type.
MLint32 MLHostBreakCheckCB(void *usrData, void **hitField)
MLArrayIndex
Indexes for axes, arrays and vectors.
@ ML_VT
Array index for t (time) components (entry 4)
@ ML_VC
Array index for c (color) components (entry 3)
@ ML_VY
Array index for y components (entry 1)
@ ML_VU
Array index for u (unit/user dimension) components (entry 5)
@ ML_VZ
Array index for z components (entry 2)
@ ML_VW
Array index for w (forth components of homogeneous vectors, entry 3)
@ ML_VX
Array index for x components (entry 0)
void MLRequestProgressCB(void *usrData, double progress)
MLuint64 MLuint
An unsigned ML integer type with at least 64 bits used for index calculations on very large images ev...
unsigned char * MLuint8Ptr
MLEventFilterApplicationMessage
Enum to describe the significance of the call, e.g., whether an 'add' or a 'remove' of a function is ...
@ ML_EVENTFILTER_REMOVE_CB
unsigned int * MLuint32Ptr
void MLEventFilterApplicationHookCB(void *applicationUsrData, MLEventFilterApplicationMessage type, MLEventFilterCB *cb, void *usrData, MLuint32 fromMessageId, MLuint32 toMessageId)
Internal application event filter callback type.
unsigned char MLTypeData
This is the pointer type used to point to the data of MLType data instances.
MLTypeGroupIds
Some predefined type groups.
void MLSensorCB(void *usrData, void *sensor)
INT64 MLint64
Include 64 bit integer support for Windows or Unix.
const char * MLApplicationGetStringPropertyCB(void *applicationUsrData, const char *propertyName, MLint16 *found)
Callback to the hosting application that is used to get a string value property with the propertyName...
unsigned short * MLuint16Ptr
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
double MLApplicationGetDoublePropertyCB(void *applicationUsrData, const char *propertyName, MLint16 *found)
Callback to the hosting application that is used to get a double value property with the propertyName...
void MLMessageCB(void *usrData, MLErrorCode errCode, MLMessageType messageType, const char *messStr, int line, const char **infos)
Handling/setting/getting of ML messages callbacks.
MLint32 MLApplicationGetBoolPropertyCB(void *applicationUsrData, const char *propertyName, MLint16 *found)
Callback to the hosting application that is used to get a bool value property with the propertyName f...
MLuint64 MLuoffset
Unsigned ML offset type which is a 32 bit unsigned integer on 32 bit platforms and 64 bit one on 64 b...
void MLNotifyCB(MLuint32 objType, void *usrData, void *objectData1, void *objData2)
Function type which is registered by the Notify object; it receives a code objType of type MLNotifyCh...
MLint32 MLEventFilterCB(void *usrData, void *event)
Callback function type for events that are passed to the user.
SSIZE_T MLssize_t
The signed ML size type which is a signed 32 bit size_t on 32 bit platforms and 64 bit one on 64 bit ...
INT64 * MLint64Ptr
Introduce platform independent 64 bit signed integer pointer type.
size_t MLusize_t
The unsigned ML size type which is an unsigned 32 bit size_t on 32 bit platforms and 64 bit one on 64...
void MLHostProgressCB(void *usrData, const char *info1, const char *info2)
MLuint64 * MLuintPtr
A pointer to the unsigned ML integer type MLuint.
MLint32 MLTypeGroup
This is an identifier to differentiate types like matrices, vectors and complex/quaternion types,...
MLMessageType
Message types handled by the ErrorOutput class.
MLSign
Definition of possible signs as enumerator.
@ ML_NEGATIVE_SIGN
Negative sign enumerator.
@ ML_ZERO_SIGN
Enumerator for no negative and no positive sign (=0).
@ ML_POSITIVE_SIGN
Positive sign enumerator.
#define ML_UTILS_EXPORT
Defines platform dependent DLL export macro for mlUtils.
void ML_UTILS_EXPORT logTypeComponentsFromStringError(const char *function)
Defines all callbacks that an application has to support for property access.
MLApplicationGetDoublePropertyCB * _getDoubleCB
Callback to be set by an application to return a double property.
MLApplicationGetBoolPropertyCB * _getBoolCB
Callback to be set by an application to return a Boolean property.
MLApplicationGetStringPropertyCB * _getStringCB
Callback to be set by an application to return a string property.
MLApplicationGetInt32PropertyCB * _getInt32CB
Callback to be set by an application to return a int32 property.
void * _applicationUsrData
Defines the user data that is supplied with all callbacks.
Structure containing all data type features and pointers to all functions needed to implement operati...
void(* Function_CastToOtherType)(const MLTypeData *myData, const MLTypeInfos *otherInfos, MLTypeData *otherData)
Function_CastFromDouble castFromDouble
Casts the first (the double) parameter to the data type and returns it into second parameter.
Function_GetStringValue getStringValue
Returns a value as a string.
bool(* Function_CastToBool)(const MLTypeData *p)
void(* Function_ArrayCopyWithStrides)(const MLTypeData *source, MLssize_t sourceStride, MLTypeData *dest, MLssize_t destStride, size_t size)
Function_IsEqualToType isEqualToType
Returns true if both parameters are equal, otherwise false.
Function_ArrayFill arrayFill
Sets first parameter to array at second one.
const MLTypeData * typeDefaultPtr
Data type default specified by derived class.
Function_ArrayCopyWithStrides arrayCopyWithStrides
Same as above, but allows to specify stride values for source and destination.
MLint(* Function_CastToInt)(const MLTypeData *p)
void(* Function_CastFromInt)(MLint value, MLTypeData *result)
Function_SetStringValue setStringValue
Converts string s to value and write result into r.
Function_CopyValue normalize
Normalizes the type value from parameter 1 and write it into parameter 2.
void(* Function_SetStringValue)(const char *str, MLTypeData *result)
bool(* Function_IsEqualToTypeWithEpsilon)(const MLTypeData *source1, const MLTypeData *source2, MLdouble epsilon)
MLTypeGroup typeGroup
Type group to which this type belongs.
void(* Function_ArrayCopy)(const MLTypeData *source, MLTypeData *dest, size_t size)
Function_ApplyIntOperation multWithInt
Implements multiplication with integer. Result written into parameter three.
size_t componentOffsets[ML_MAX_COMPONENTS_EXTENDED_TYPE]
Array of offsets from the first to other components to address any component directly.
void(* Function_ArrayFill)(const MLTypeData *fillValue, MLTypeData *dest, size_t size)
Function_SetTo setToMaximum
Sets value to minimum value. Must be implemented.
Function_ArrayCopy arrayCopy
Copies number of elements at first parameter to second one.
Function_SetTo setToDefault
Sets value to default value. Must be implemented.
Function_GetComponent getComponent
Get n-th component of the type as double.
Function_CopyValue copy
Copies first parameter to second one.
const MLTypeData * typeMinPtr
Data type minimum specified by derived class.
Function_ApplyIntOperation plusInt
Implements integer addition to parameter one. Result written into parameter three.
void(* Function_SetComponent)(MLTypeData *dest, size_t componentIndex, MLdouble value)
void(* Function_CastFromDouble)(MLdouble value, MLTypeData *result)
void(* Function_SetTo)(MLTypeData *dest)
void(* Function_Interpolate)(const MLTypeData *source1, const MLTypeData *source2, MLdouble alpha, MLTypeData *result)
void(* Function_ApplyDoubleOperation)(const MLTypeData *source, MLdouble value, MLTypeData *result)
const MLTypeData * typeMaxPtr
Data type maximum specified by derived class.
void(* Function_ApplyIntOperation)(const MLTypeData *source, MLint value, MLTypeData *result)
const char * structInfoString
Pointer to a null-terminated string describing the type configuration.
Function_ArrayEqualsValue arrayEqualsValue
Check that the first argument equals all the values given with the second argument (and the size in t...
bool(* Function_IsEqualToType)(const MLTypeData *source1, const MLTypeData *source2)
MLdouble(* Function_GetComponent)(const MLTypeData *source, size_t componentIndex)
Function_CastToDouble castToDouble
Returns a type value cast to double.
void(* Function_MultWithOtherType)(const MLTypeInfos *myInfos, const MLTypeData *myData, const MLTypeData *otherData, MLTypeData *result)
Function_CopyValue negate
Negates the value.
MLint32 dataTypeId
Real MLDataType id of under which these operations are registered as data type.
void(* Function_CopyValue)(const MLTypeData *source, MLTypeData *dest)
void(* Function_CastFromOtherType)(const MLTypeInfos *myInfos, const MLTypeData *myData, MLTypeData *otherData)
Function_ApplyOperation plusType
Implements parameter two addition to parameter one. Result written into parameter three.
Function_ApplyOperation multWithType
Implements multiplication with its own type. Result written into parameter three.
size_t numGoodCastTos
Number of data types to which this type can be casted without information or functionality loss.
MLDataType rangeAndPrecisionEquivalent
Standard data type which has a comparable range and precision behavior.
Function_ApplyDoubleOperation plusDouble
Implements double addition to parameter one. Result written into parameter three.
size_t typeSize
sizeof the data type in bytes.
Function_CastToOtherType castToOtherType
Casts data to another registered type.
Function_ArrayRescale arrayRescale
Scale the values from the first parameter with the second parameter and offset it with the value from...
char *(* Function_GetStringValue)(const MLTypeData *p)
MLdouble dblMin
double minimum of data type if it exists.
Function_IsEqualToTypeWithEpsilon isEqualToTypeWithEpsilon
Returns true if both parameters are equal within a static epsilon, otherwise false.
void(* Function_ApplyOperation)(const MLTypeData *source1, const MLTypeData *source2, MLTypeData *result)
void(* Function_ArrayRescale)(const MLTypeData *source, MLdouble scaleFactor, const MLTypeData *offset, MLTypeData *dest, size_t size)
const char * name
Pointer to the data type name.
Function_ApplyDoubleOperation multWithDouble
Implements multiplication with double. Result written into parameter three.
Function_ArrayGetMinMax arrayGetMinMax
Get the minimum and maximum component values from the array in the first argument,...
bool(* Function_ArrayEqualsValue)(const MLTypeData *value, const MLTypeData *buffer, size_t size)
Function_CastFromOtherType castFromOtherType
Casts another registered type to data.
Function_CastToBool castToBool
Returns a type value cast to bool. Usually an equality to 0 should return false, e....
MLdouble dblMax
double maximum of data type if it exists.
Function_SetTo setToMinimum
Sets value to minimum value. Must be implemented.
Function_CastToInt castToInt
Returns a type value cast to integer.
Function_SetComponent setComponent
Set n-th component of the type from double (applying rounding if needed)
void(* Function_ArrayGetMinMax)(const MLTypeData *source, size_t size, MLdouble &min, MLdouble &max)
const char ** goodCastTos
Data types names to which this type can be casted without information or functionality loss.
Function_CastFromInt castFromInt
Casts the first (the integer) parameter to the data type and returns it into second parameter.
MLdouble(* Function_CastToDouble)(const MLTypeData *p)
size_t numComponents
Number of components of this data type. Equals number of characters in *structInfoString.
Function_Interpolate interpolate
Interpolate linearly between the first and the second parameter, at the position given by the third p...
MLTypePropertyBits propertyBits
Variable containing an enabled bit for each defined property.
Function_MultWithOtherType multWithOtherType
Implements multiplication with another type. Result written into parameter three.