24 #include <ThirdPartyWarningsDisable.h>
26 #include <ThirdPartyWarningsRestore.h>
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 string length of field value coded as string of field field.
MLEXPORT MLErrorCode MLGetPageMemorySize(mlField *outField, size_t *numBytes)
Returns currently used cache size for pages of the image in OutputConnectorField outField in bytes.
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 a ml::Module in the ML to make pointer more readable.
MLEXPORT void MLDeleteModule(mlModule *module)
Destroys/deletes a module instance module created by MLCreateModuleFromName.
MLEXPORT void * MLPointerFieldGetPtr(mlField *field)
Returns the value of the pointer field field.
MLEXPORT MLErrorCode MLImageGetVoxelToWorldMatrix(mlField *outField, MLfloat[16])
Returns the VoxelToWorldMatrix of the image represented by output field outField.
MLEXPORT MLint64 MLFieldGetIntValue64(mlField *field)
Return the value of the IntegerField field.
MLEXPORT void MLFieldSetIntValue(mlField *field, MLint32 value)
Set value of IntegerField field to the integer value value.
MLEXPORT MLint32 MLFieldGetIntValue(mlField *field)
Return the value of the IntegerField field.
MLEXPORT void MLFieldSetValue(mlField *field, const char *value)
Set 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 mlType * MLTypeGetParentType(mlType *type)
Returns pointer to the RuntimeType instance representing the type of the parent class of that represe...
MLEXPORT void MLHostUpdateProgress(const char *info1, const char *info2)
Calls the callback set MLHostSetProgressCB manually (this is used by the InventorWrapper module).
MLEXPORT MLfloat MLFieldGetFloatValue(mlField *field)
Return the value of the FloatField field.
MLEXPORT const char * MLBaseGetType(mlBase *base)
Returns object type as string.
MLEXPORT mlField * MLFieldSensorGetField(mlSensor *sensor)
Returns the field which is observed by sensor sensor.
MLEXPORT void MLSoNodeFieldSetPtr(mlField *field, const void *value)
Sets the pointer value of the SoNode field field to value.
MLEXPORT MLuint64 MLCacheGetCurrentSizeKB()
Returns number of kilobytes currently allocated within ML cache.
MLEXPORT void MLSendMessagesToCout(MLint32 on)
If 0 is passed as on, message sending to std::cout is disabled.
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 void MLDeleteFieldSensor(mlSensor *sensor)
Destroys the sensor sensor.
MLEXPORT mlModule * MLCreateModuleFromType(mlType *type)
Creates a new instance of a module of type given by type.
MLEXPORT void MLFieldSetEnumValue(mlField *field, int val)
Sets 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 which 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 currently used size of memory image of OutputConnectorField outField in bytes.
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 MLErrorCode MLClearPagesAndMemoryImg(mlField *outField)
Removes all pages of the page image from the memory at OutputConnectorField outField.
MLEXPORT const char * MLBaseGetParentType(mlBase *base)
Returns object type of parent class as string.
MLEXPORT mlField * MLModuleGetField(mlModule *module, const char *name)
Return field with name name of module.
MLEXPORT mlModule * MLCreateModuleFromName(const char *className)
Creates a new instance of a module of type given by className.
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 * MLBaseFieldGetPersistentState(mlField *baseField)
Returns a character string which contains the object state of the base object represented by the base...
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 maximum number of kilobytes used by the ML cache.
MLEXPORT void MLModuleSetFieldValue(mlModule *module, char *fieldName, char *value)
Sets 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 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 mlSensor * MLCreateFieldSensor(void *userData, MLSensorCB *callback)
Returns a field sensor.
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)
Return the value of the DoubleField field field.
MLEXPORT const char * MLTypeGetName(mlType *type)
Returns pointer to a null terminated string containing the name of the class represented by type.
MLEXPORT const char * MLGetImageStateString(mlField *outField)
Requests the state string from an output field outField.
MLEXPORT int MLFieldGetEnumValue(mlField *field)
Returns index of selected element in the EnumField field.
MLEXPORT const char * MLTypeGetDllName(mlType *type)
Returns pointer to a null terminated string containing the string name of the dll probably containing...
#define mlType
A macro name for a void pointer to a runtime type in the ML to make 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 pare...
MLEXPORT MLErrorCode MLImageGetMaxValue(mlField *outField, MLdouble *maxValue)
Returns the maximum voxel value maxValue of the image represented by output field outField.
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 4 dimensional regions, (i.e., t=u=0 and nt=nt=1)
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 * MLModuleGetIndexedField(mlModule *module, MLint32 n)
Return field with index from [0..getNumFields-1] of module if field exists; otherwise 0 (NULL) is ret...
MLEXPORT void * MLSoNodeFieldGetPtr(mlField *field)
Returns the value of the SoNode field field.
MLEXPORT mlType * MLBaseGetTypeObject(mlBase *base)
Returns object type as type object.
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 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 which was allocated by the function call ML...
MLEXPORT void * MLBaseFieldGetPtr(mlField *field)
Returns the value of the base field field.
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 void MLFieldSetDoubleValue(mlField *field, MLdouble value)
Set 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 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 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 const char * MLTypeGetParentName(mlType *type)
Returns pointer to a null terminated string containing the name of the parent class of that represent...
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)
Set value of FloatField field to the float value value.
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 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 MLErrorCode MLGetImageState(mlField *outField)
Tries 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)
Set value of IntegerField field to the integer value value.
MLEXPORT const char * MLFieldGetEnumName(mlField *field, MLint32 i, int *value)
Return name of the i th element of enum field field and set value to i if field type is an enum type.
MLEXPORT MLErrorCode MLSetMaxNumThreads(MLuint32 numThreads)
Sets the number of parallel threads which the ML might use.
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 4 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 maximum number of kilobytes used by the ML cache.
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 3 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 pointer more readable.
MLEXPORT const char * MLFieldGetType(mlField *field)
Return runtime data type of field field as string.
MLEXPORT mlType * MLTypeFromName(const char *name)
Returns type object for given name. 0 will be returned if the type described by name is unknown.
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 const char * MLFieldGetName(mlField *field)
Returns name of field field.
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 3 dimensional regions, (i.e., c=t=u=0 and nc=nt=nu=1)
MLEXPORT size_t MLModuleGetNumFields(mlModule *module)
Return 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)