24 #include <ThirdPartyWarningsDisable.h>
26 #include <ThirdPartyWarningsRestore.h>
32 #ifndef ML_DISABLE_CPP
33 #define ML_DISABLE_CPP
714 const char* imagePropertyTypeClassName,
715 void** imagePropertyExtension);
MLint32 MLDataType
MLDataType.
MLint32 MLErrorCode
Type of an ML Error code.
MLEXPORT size_t MLFieldGetValueSize(mlField *field)
Returns the string length of field value coded as string of field field.
MLEXPORT MLErrorCode MLGetPageMemorySize(mlField *outField, size_t *numBytes)
Returns the currently used cache size for pages of the image in OutputConnectorField outField in byte...
MLEXPORT void MLImageFreeTile(void *data)
Frees the memory created/allocated by any of the functions MLImageGetTile*() or MLImageGetScaledTile*...
MLEXPORT MLErrorCode MLLoadLibraryWOErrorExt(const char *name, MLLibraryHandle *libHandle)
Loads the given shared library.
#define mlModule
A macro name for a void pointer to an ml::Module in the ML to make the pointer more readable.
MLEXPORT void MLDeleteModule(mlModule *module)
Destroys/deletes a module instance module created by MLCreateModuleFromName.
MLEXPORT MLErrorCode MLImageGetVoxelToWorldMatrix(mlField *outField, MLfloat[16])
Returns the VoxelToWorldMatrix of the image represented by output field outField.
MLEXPORT MLint64 MLFieldGetIntValue64(mlField *field)
Returns the value of the IntegerField field.
MLEXPORT void MLFieldSetIntValue(mlField *field, MLint32 value)
Sets the value of IntegerField field to the integer value value.
MLEXPORT MLint32 MLFieldGetIntValue(mlField *field)
Returns the value of the IntegerField field.
MLEXPORT void MLFieldSetValue(mlField *field, const char *value)
Sets the value of field field to value.
MLEXPORT MLErrorCode MLImageGetSize(mlField *outField, int *x, int *y, int *z, int *c)
Like MLImageGetSize6D, only for 4D. The last two extents are ignored.
MLEXPORT void MLHostUpdateProgress(const char *info1, const char *info2)
Calls the callback set MLHostSetProgressCB manually.
MLEXPORT MLfloat MLFieldGetFloatValue(mlField *field)
Returns the value of the FloatField field.
MLEXPORT void MLSoNodeFieldSetPtr(mlField *field, const void *value)
Sets the pointer value of the SoNode field field to value.
MLEXPORT MLuint64 MLCacheGetCurrentSizeKB()
Returns the number of kilobytes currently allocated within the ML cache.
MLEXPORT void MLSendMessagesToCout(MLint32 on)
If 0 is passed as on, message sending to std::cout is disabled.
MLEXPORT mlType * MLBaseGetTypeObject(mlBase *base)
Returns the object type as type object.
MLEXPORT MLint32 MLAreMessagesSentToCerr()
Returns 1 (=true) if the ML messages are sent to std::cerr, otherwise 0 (=false).
MLEXPORT void MLBeginLoadFields(mlModule *module)
Notifies the begin of the loading process in which the fields of the module are set/initialized.
MLEXPORT mlType * MLTypeGetParentType(mlType *type)
Returns a pointer to the RuntimeType instance representing the type of the parent class of that repre...
MLEXPORT void * MLSoNodeFieldGetPtr(mlField *field)
Returns the value of the SoNode field field.
MLEXPORT void MLDeleteFieldSensor(mlSensor *sensor)
Destroys the sensor sensor.
MLEXPORT void MLFieldSetEnumValue(mlField *field, int val)
Sets the index of selected element in the EnumField field.
MLEXPORT void MLPointerFieldSetPtr(mlField *field, const void *value)
Sets the value of the pointer field field to value.
MLEXPORT void MLHostSetBreakCheckCB(void *userData, MLHostBreakCheckCB *callback)
Sets a callback to provide break checking of current calculation.
MLEXPORT MLuint32 MLGetMaxNumThreads()
Returns the currently set number of parallel threads that the ML might use.
HMODULE MLLibraryHandle
Defines the platform-specific handle for a dynamically linked library.
MLEXPORT void MLEndLoadFields(mlModule *module)
Notifies the end of the loading process in which the fields of the module are set/initialized.
MLEXPORT MLErrorCode MLGetMemoryImgSize(mlField *outField, size_t *numBytes)
Returns the currently used size of memory image of OutputConnectorField outField in bytes.
MLEXPORT const char * MLBaseFieldGetPersistentState(mlField *baseField)
Returns a character string that contains the object state of the base object represented by the base ...
MLEXPORT void MLBaseFieldSetPtr(mlField *baseField, const void *value)
Sets the pointer value of the base field baseField to value.
MLEXPORT void MLHostSetProgressCB(void *userData, MLHostProgressCB *callback)
Sets a callback to provide feedback of the host calculation progress.
MLEXPORT MLErrorCode MLUnLoadLibrary(const char *name, MLLibraryHandle libHandle, char **errStr)
Unloads the given shared library.
MLEXPORT mlField * MLModuleGetIndexedField(mlModule *module, MLint32 n)
Returns the field with an index n from [0..getNumFields-1] of module if field exists; otherwise,...
MLEXPORT MLErrorCode MLClearPagesAndMemoryImg(mlField *outField)
Removes all pages of the page image from the memory at OutputConnectorField outField.
MLEXPORT MLErrorCode MLImageGetVoxelSizeInDoubles(mlField *outField, MLdouble *x, MLdouble *y, MLdouble *z)
Determines the voxel size x / y / z of the image represented by the output field outField.
MLEXPORT const char * MLGetImageStateString(mlField *outField)
Requests the state string from an output field outField.
MLEXPORT void MLBeginSaveFields(mlModule *module)
Notifies the begin of the saving process in which the fields of the module are read/saved.
MLEXPORT MLuint64 MLCacheGetMaxSizeKB()
Returns the maximum number of kilobytes used by the ML cache.
MLEXPORT void MLModuleSetFieldValue(mlModule *module, char *fieldName, char *value)
Sets the field with name fieldName of module to value value.
MLEXPORT void MLEndSaveFields(mlModule *module)
Notifies the end of the saving process in which the fields of the module are read/saved.
MLEXPORT MLErrorCode MLImageGetType(mlField *outField, MLDataType *dtype, size_t *dsize)
Determines the data type dtype and its size dsize in bytes of the image represented by the output fie...
#define mlBase
A macro name for a void pointer to a base object in the ML to make the pointer more readable.
MLEXPORT void MLFieldSensorAttach(mlSensor *sensor, mlField *field)
Attach the sensor sensor to the field field; any value change will be notified by the call of the cal...
MLEXPORT MLErrorCode MLImageGetTile6D(mlField *outField, void **memory, MLint x, MLint y, MLint z, MLint c, MLint t, MLint u, MLint nx, MLint ny, MLint nz, MLint nc, MLint nt, MLint nu, MLDataType datatype)
Calculates a 6D rectangular region of the input image given by output field outField and returns a po...
MLEXPORT void MLFieldSensorDetach(mlSensor *sensor)
Disconnects the connection between sensor sensor and its observed field.
MLEXPORT MLErrorCode MLLoadLibraryWOError(const char *name)
Same as MLLoadLibraryWOErrorExt with libHandle=NULL.
MLEXPORT MLint32 MLLoadLibrary(const char *name)
Loads the given shared library.
MLEXPORT MLdouble MLFieldGetDoubleValue(mlField *field)
Returns the value of the DoubleField field field.
MLEXPORT int MLFieldGetEnumValue(mlField *field)
Returns the index of selected element in the EnumField field.
MLEXPORT const char * MLTypeGetName(mlType *type)
Returns a pointer to a NULL-terminated string containing the name of the class represented by type.
#define mlType
A macro name for a void pointer to a runtime type in the ML to make the pointer more readable.
MLEXPORT void MLSendMessagesToCerr(MLint32 on)
If 0 is passed as on, message sending to std::cerr is disabled.
MLEXPORT void MLBaseFieldSetPersistentState(mlField *baseField, const char *state)
Restores the state of the base object represented by the base field baseField using a state generated...
MLEXPORT MLint32 MLTypeIsDerivedFrom(mlType *type, const char *parent)
Returns true (=1) if runtime type type is derived from the parent class with the name given by parent...
MLEXPORT MLErrorCode MLImageGetMaxValue(mlField *outField, MLdouble *maxValue)
Returns the maximum voxel value maxValue of the image represented by output field outField.
MLEXPORT void * MLPointerFieldGetPtr(mlField *field)
Returns the value of the pointer field field.
MLEXPORT MLErrorCode MLImageGetScaledTile4D(mlField *outField, void **memory, MLint x, MLint y, MLint z, MLint c, MLint nx, MLint ny, MLint nz, MLint nc, MLDataType datatype, MLdouble srcMin, MLdouble srcMax, MLdouble dstMin, MLdouble dstMax)
Like MLImageGetScaledTile6D(), only for four dimensional regions (i.e., t=u=0 and nt=nt=1).
MLEXPORT const char * MLBaseGetType(mlBase *base)
Returns the object type as string.
MLEXPORT MLint32 MLTypeIsAbstract(mlType *type)
Returns true (=1) if type is abstract, otherwise 0 (=false).
MLEXPORT MLErrorCode MLClearMemoryImg(mlField *outField)
Clears the memory image in OutputConnectorField outField if it is handled by the ML.
MLEXPORT mlField * MLModuleGetField(mlModule *module, const char *name)
Returns the field with name name of module.
MLEXPORT mlModule * MLCreateModuleFromType(mlType *type)
Creates a new instance of a module of type given by type.
MLEXPORT const char * MLFieldGetName(mlField *field)
Returns the name of field field.
MLEXPORT MLint32 MLBaseIsDerivedFrom(mlBase *base, const char *superClassName)
Returns 1 (=true) if base is derived from class with name superClassName and 0 (=false) if not.
MLEXPORT MLErrorCode MLImageGetMinValue(mlField *outField, MLdouble *minValue)
Returns the minimum voxel value minValue of the image represented by output field outField.
MLEXPORT void MLBaseFieldClearPersistentState(mlField *baseField, char *state)
Frees the memory allocated for the character string state that was allocated by the function call MLB...
MLEXPORT MLErrorCode MLImageMapVoxelToWorldInDoubles(mlField *outField, MLdouble srcX, MLdouble srcY, MLdouble srcZ, MLdouble *dstX, MLdouble *dstY, MLdouble *dstZ)
Transforms the given position (srcX, srcY, scrZ) from voxel to world coordinates (dstX,...
MLEXPORT const char * MLFieldGetEnumName(mlField *field, MLint32 i, int *value)
Return the name of the i th element of enum field field and set value to i if field type is an enum t...
MLEXPORT void MLFieldSetDoubleValue(mlField *field, MLdouble value)
Sets the value of DoubleField field to the double value value.
#define mlField
A macro name for a void pointer to a field in the ML to make the pointer more readable.
MLEXPORT MLErrorCode MLImageGetScaledTile6D(mlField *outField, void **memory, MLint x, MLint y, MLint z, MLint c, MLint t, MLint u, MLint nx, MLint ny, MLint nz, MLint nc, MLint nt, MLint nu, MLDataType datatype, MLdouble srcMin, MLdouble srcMax, MLdouble dstMin, MLdouble dstMax)
Like MLImageGetTile6D().
MLEXPORT mlSensor * MLCreateFieldSensor(void *userData, MLSensorCB *callback)
Returns a field sensor.
MLEXPORT MLint32 MLAreMessagesSentToCout()
Returns 1 (=true) if the ML messages are sent to std::cout, otherwise 0 (=false).
MLEXPORT MLErrorCode MLImageGetScaledTile(mlField *outField, void **memory, MLint x, MLint y, MLint z, MLint nx, MLint ny, MLint nz, MLDataType datatype, MLdouble srcMin, MLdouble srcMax, MLdouble dstMin, MLdouble dstMax)
Exactly like MLImageGetScaledTile3D().
MLEXPORT MLErrorCode MLImageGetWorldToVoxelMatrix(mlField *outField, MLfloat[16])
Returns the WorldToVoxelMatrix of the image represented by output field outField.
MLEXPORT MLErrorCode MLClearPages(mlField *outField)
Removes all pages of the page image from the memory at output image field outField.
MLEXPORT void MLClearCache()
Removes all cached pages from all module outputs.
MLEXPORT void MLFieldSetFloatValue(mlField *field, MLfloat value)
Sets the value of FloatField field to the float value value.
MLEXPORT mlField * MLFieldSensorGetField(mlSensor *sensor)
Returns the field that is observed by sensor sensor.
MLEXPORT mlModule * MLCreateModuleFromName(const char *className)
Creates a new instance of a module of type given by className.
MLEXPORT MLint32 MLFieldConnectFrom(mlField *inField, mlField *outField)
If inField is an input connector field and outField is an output connector field, the field inField i...
MLEXPORT MLErrorCode MLImageGetPageSize6D(mlField *outField, int *x, int *y, int *z, int *c, int *t, int *u)
Determines the page size of the image represented by output field outField.
MLEXPORT MLErrorCode MLImageGetTile(mlField *outField, void **memory, MLint x, MLint y, MLint z, MLint nx, MLint ny, MLint nz, MLDataType datatype)
Exactly like MLImageGetTile3D().
MLEXPORT void MLFieldDisconnect(mlField *inField)
If inField is an input field: Removes connection to input field inField.
MLEXPORT size_t MLFieldGetNumEnums(mlField *field)
Returns the number of elements in the EnumField field.
MLEXPORT MLint32 MLImageFieldConnectFromNoNotify(mlField *inField, mlField *outField)
Connects connectors of input connector field inField with the connector of the output connector field...
MLEXPORT MLint32 MLDestroy()
Destroys the ML, frees memory allocated in MLInit() and in all other ML operations.
MLEXPORT MLErrorCode MLImageGetVoxelSize(mlField *outField, MLfloat *x, MLfloat *y, MLfloat *z)
Determines the voxel size x / y / z of the image represented by the output field outField.
MLEXPORT MLuint32 MLSetIsCurrentlyUnloadingLibrary(MLuint32 enable)
This function allows to set the MLIsCurrentlyUnloadingLibrary state and returns the previously set un...
MLEXPORT const char * MLTypeGetDllName(mlType *type)
Returns a pointer to a NULL-terminated string containing the string name of the DLL probably containi...
MLEXPORT const char * MLFieldGetType(mlField *field)
Returns the runtime data type of field field as string.
MLEXPORT MLErrorCode MLGetImageState(mlField *outField)
Attempts to update and then it checks an image represented by output field outField.
MLEXPORT MLint32 MLInit(MLint32 majorVersion, MLint32 majorCAPIVersion, MLint32 revCAPI)
Calls the C++ initialization of the ML.
MLEXPORT void MLFieldSetIntValue64(mlField *field, MLint64 value)
Sets the value of IntegerField field to the integer value value.
MLEXPORT MLErrorCode MLSetMaxNumThreads(MLuint32 numThreads)
Sets the number of parallel threads that the ML might use.
MLEXPORT const char * MLTypeGetParentName(mlType *type)
Returns a pointer to a NULL-terminated string containing the name of the parent class of that represe...
MLEXPORT MLErrorCode MLImageGetWorldToVoxelMatrixInDoubles(mlField *outField, MLdouble[16])
Returns the WorldToVoxelMatrix of the image represented by output field outField.
MLEXPORT MLErrorCode MLImageMapWorldToVoxel(mlField *outField, MLfloat srcX, MLfloat srcY, MLfloat srcZ, MLfloat *dstX, MLfloat *dstY, MLfloat *dstZ)
Transforms the given position (srcX, srcY, scrZ) from world to voxel coordinates (dstX,...
MLEXPORT void MLFieldTouch(mlField *field)
Touches the field field to notify all connected fields.
MLEXPORT MLErrorCode MLImageGetTile4D(mlField *outField, void **memory, MLint x, MLint y, MLint z, MLint c, MLint nx, MLint ny, MLint nz, MLint nc, MLDataType datatype)
Like MLImageGetTile6D(), only for four dimensional regions (i.e., t=u=0 and nt=nt=1).
MLEXPORT MLErrorCode MLImageMapVoxelToWorld(mlField *outField, MLfloat srcX, MLfloat srcY, MLfloat srcZ, MLfloat *dstX, MLfloat *dstY, MLfloat *dstZ)
Transforms the given position (srcX, srcY, scrZ) from voxel to world coordinates (dstX,...
MLEXPORT MLErrorCode MLImageGetFirstImagePropertyExtensionByType(mlField *outField, const char *imagePropertyTypeClassName, void **imagePropertyExtension)
Returns the first image property extension imagePropertyExtension (as void-pointer) of type imageProp...
MLEXPORT void MLCacheSetMaxSizeKB(MLuint64 size)
Sets the maximum number of kilobytes used by the ML cache.
MLEXPORT void * MLBaseFieldGetPtr(mlField *field)
Returns the value of the base field field.
MLEXPORT MLErrorCode MLImageGetScaledTile3D(mlField *outField, void **memory, MLint x, MLint y, MLint z, MLint nx, MLint ny, MLint nz, MLDataType datatype, MLdouble srcMin, MLdouble srcMax, MLdouble dstMin, MLdouble dstMax)
Like MLImageGetScaledTile6D(), only for three dimensional regions (i.e., t=u=0 and nt=nt=1).
MLEXPORT MLErrorCode MLImageMapWorldToVoxelInDoubles(mlField *outField, MLdouble srcX, MLdouble srcY, MLdouble srcZ, MLdouble *dstX, MLdouble *dstY, MLdouble *dstZ)
Transforms the given position (srcX, srcY, scrZ) from world to voxel coordinates (dstX,...
#define mlSensor
A macro name for a void pointer to a sensor in the ML to make the pointer more readable.
MLEXPORT size_t MLFieldGetValue(mlField *field, char *value, size_t bufferSize)
Copies the value of field field as string into the character string value.
MLEXPORT MLErrorCode MLImageGetSize6D(mlField *outField, int *x, int *y, int *z, int *c, int *t, int *u)
Determines the size of the image represented by output field outField.
MLEXPORT MLuint32 MLIsCurrentlyUnloadingLibrary()
This function returns true (=1) if an ML library is currently unloaded, otherwise false (=0).
MLEXPORT MLErrorCode MLImageGetTile3D(mlField *outField, void **memory, MLint x, MLint y, MLint z, MLint nx, MLint ny, MLint nz, MLDataType datatype)
Like MLImageGetTile6D(), only for three dimensional regions (i.e., c=t=u=0 and nc=nt=nu=1).
MLEXPORT mlType * MLTypeFromName(const char *name)
Returns the type object for given name. 0 will be returned if the type described by name is unknown.
MLEXPORT const char * MLBaseGetParentType(mlBase *base)
Returns the object type of parent class as string.
MLEXPORT size_t MLModuleGetNumFields(mlModule *module)
Returns the number of fields contained in module.
MLEXPORT MLErrorCode MLImageGetVoxelToWorldMatrixInDoubles(mlField *outField, MLdouble[16])
Returns the VoxelToWorldMatrix of the image represented by output field outField.
#define MLEXPORT
To export symbols from a DLL/shared object, we need to mark them with the MLEXPORT symbol.
UINT64 MLuint64
Introduce platform-independent 64-bit unsigned integer type.
MLint32 MLHostBreakCheckCB(void *usrData, void **hitField)
void MLSensorCB(void *usrData, void *sensor)
INT64 MLint64
Include 64-bit integer support for Windows or Unix.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
void MLHostProgressCB(void *usrData, const char *info1, const char *info2)