MeVisLab Scripting Reference
MLABMLScriptWrapper Class Reference

#include <mlabMLScriptWrapper.h>

Inherits QObject.

Public Types

enum  DataTypes {
  MLuint8Type = ::MLuint8Type , MLint8Type = ::MLint8Type , MLuint16Type = ::MLuint16Type , MLint16Type = ::MLint16Type ,
  MLuint32Type = ::MLuint32Type , MLint32Type = ::MLint32Type , MLuint64Type = ::MLuint64Type , MLint64Type = ::MLint64Type ,
  MLfloatType = ::MLfloatType , MLdoubleType = ::MLdoubleType , MLcomplexfType = ::MLComplexfType , MLcomplexdType = ::MLComplexdType ,
  MLQuaternionfType = ::MLQuaternionfType , MLQuaterniondType = ::MLQuaterniondType , MLVector2fType = ::MLVector2fType , MLVector2dType = ::MLVector2dType ,
  MLVector3fType = ::MLVector3fType , MLVector3dType = ::MLVector3dType , MLVector4fType = ::MLVector4fType , MLVector4dType = ::MLVector4dType ,
  MLVector5fType = ::MLVector5fType , MLVector5dType = ::MLVector5dType , MLVector6fType = ::MLVector6fType , MLVector6dType = ::MLVector6dType ,
  MLVector7fType = ::MLVector7fType , MLVector7dType = ::MLVector7dType , MLVector8fType = ::MLVector8fType , MLVector8dType = ::MLVector8dType ,
  MLVector9fType = ::MLVector9fType , MLVector9dType = ::MLVector9dType , MLVector10fType = ::MLVector10fType , MLVector10dType = ::MLVector10dType ,
  MLVector16fType = ::MLVector16fType , MLVector16dType = ::MLVector16dType , MLVector32fType = ::MLVector32fType , MLVector32dType = ::MLVector32dType ,
  MLVector64fType = ::MLVector64fType , MLVector64dType = ::MLVector64dType , MLMatrix2fType = ::MLMatrix2fType , MLMatrix2dType = ::MLMatrix2dType ,
  MLMatrix3fType = ::MLMatrix3fType , MLMatrix3dType = ::MLMatrix3dType , MLMatrix4fType = ::MLMatrix4fType , MLMatrix4dType = ::MLMatrix4dType ,
  MLMatrix5fType = ::MLMatrix5fType , MLMatrix5dType = ::MLMatrix5dType , MLMatrix6fType = ::MLMatrix6fType , MLMatrix6dType = ::MLMatrix6dType ,
  MLNumStandardTypes = ML_NUM_STANDARD_TYPES
}
 

Public Slots

Querying (registered) voxel data types.


int MLGetNumRegisteredTypeInfos ()
 
QString MLNameFromDataType (int dataType)
 
int MLDataTypeFromName (const QString &name)
 
double MLDataTypeMax (int dataType)
 
double MLDataTypeMin (int dataType)
 
unsigned long MLSizeOf (int dataType)
 
unsigned long MLTypeGetNumComponents (int dataType)
 
QString MLTypeGetStructInfoString (int dataType)
 
bool MLIsValidType (int dataType)
 
bool MLIsSigned (int dataType)
 
bool MLIsIntType (int dataType)
 
bool MLIsFloatType (int dataType)
 
bool MLIsStandardType (int dataType)
 
bool MLIsDefaultExtendedType (int dataType)
 
int MLGetPromotedTypeWithRange (const QList< int > &inputTypes, double rangeMin, double rangeMax)
 
ML Version


QList< int > MLGetVersion ()
 
Type promotion


bool MLHolds (int datatype1, int datatype2)
 
int MLGetPromotedType (int datatype1, int datatype2)
 
int MLGetDataTypeForUncorrectedRange (double min, double max, bool preferUnsigned)
 
Access to ML run-time type system (used for Base objects and ML modules)


bool isRuntimeTypeDefined (const QString &className)
 
QStringList getRuntimeTypeAncestors (const QString &className)
 

Detailed Description

Access to some global functions of the ML.

An instance of this class is available as global "MLAB.ML" object in scripting. For a detailed description of these methods and values, have a look at the ML reference:

Member Enumeration Documentation

◆ DataTypes

Static data types via enum.

Enumerator
MLuint8Type 

MLuint8Type.

MLint8Type 

MLint8Type.

MLuint16Type 

MLuint16Type.

MLint16Type 

MLint16Type.

MLuint32Type 

MLuint32Type.

MLint32Type 

MLint32Type.

MLuint64Type 

MLuint64Type.

MLint64Type 

MLint64Type.

MLfloatType 

MLfloatType.

MLdoubleType 

MLdoubleType.

MLcomplexdType 

‍MLcomplexfType

MLQuaternionfType 

‍MLcomplexdType

Member Function Documentation

◆ getRuntimeTypeAncestors

QStringList MLABMLScriptWrapper::getRuntimeTypeAncestors ( const QString & className)
slot

Return a list of ancestor classes of the given className (starting with the immediate parent class).

If the class is not derived from anything, or if the class is not registered, the list is empty.

◆ isRuntimeTypeDefined

bool MLABMLScriptWrapper::isRuntimeTypeDefined ( const QString & className)
slot

Returns whether the given className is registered with the ML run-time type system.

This can, e.g., be used to check if a module's DLL has already been loaded

◆ MLDataTypeFromName

int MLABMLScriptWrapper::MLDataTypeFromName ( const QString & name)
slot

Returns the type number for a type name.

◆ MLDataTypeMax

double MLABMLScriptWrapper::MLDataTypeMax ( int dataType)
slot

Returns the maximum component value of a voxel type.

◆ MLDataTypeMin

double MLABMLScriptWrapper::MLDataTypeMin ( int dataType)
slot

Returns the minimum component value of a voxel type.

◆ MLGetDataTypeForUncorrectedRange

int MLABMLScriptWrapper::MLGetDataTypeForUncorrectedRange ( double min,
double max,
bool preferUnsigned )
slot

Returns a type that can hold the given value range.

◆ MLGetNumRegisteredTypeInfos

int MLABMLScriptWrapper::MLGetNumRegisteredTypeInfos ( )
slot

Returns the number of registered voxel types.

◆ MLGetPromotedType

int MLABMLScriptWrapper::MLGetPromotedType ( int datatype1,
int datatype2 )
slot

Returns the type id of a type that can hold values of both datatype1 and datatype2.

◆ MLGetPromotedTypeWithRange

int MLABMLScriptWrapper::MLGetPromotedTypeWithRange ( const QList< int > & inputTypes,
double rangeMin,
double rangeMax )
slot

Applies a type promotion with the input types and the target value range.

◆ MLGetVersion

QList< int > MLABMLScriptWrapper::MLGetVersion ( )
slot

Returns the ML version number (major version, C-Api version, Cpp-Api version)

◆ MLHolds

bool MLABMLScriptWrapper::MLHolds ( int datatype1,
int datatype2 )
slot

Returns whether datatype1 can hold values of datatype2.

◆ MLIsDefaultExtendedType

bool MLABMLScriptWrapper::MLIsDefaultExtendedType ( int dataType)
slot

Returns whether the given type ID is for one of the default extended types.

◆ MLIsFloatType

bool MLABMLScriptWrapper::MLIsFloatType ( int dataType)
slot

Returns whether the given type ID is for a float scalar type.

◆ MLIsIntType

bool MLABMLScriptWrapper::MLIsIntType ( int dataType)
slot

Returns whether the given type ID is for an integer scalar type.

◆ MLIsSigned

bool MLABMLScriptWrapper::MLIsSigned ( int dataType)
slot

Returns whether the given type ID is for a signed scalar type.

◆ MLIsStandardType

bool MLABMLScriptWrapper::MLIsStandardType ( int dataType)
slot

Returns whether the given type ID is for a standard scalar type.

◆ MLIsValidType

bool MLABMLScriptWrapper::MLIsValidType ( int dataType)
slot

Returns whether the given type ID is of a valid (registered) type.

◆ MLNameFromDataType

QString MLABMLScriptWrapper::MLNameFromDataType ( int dataType)
slot

Returns the name of the voxel type.

◆ MLSizeOf

unsigned long MLABMLScriptWrapper::MLSizeOf ( int dataType)
slot

Returns the byte size of a voxel type.

◆ MLTypeGetNumComponents

unsigned long MLABMLScriptWrapper::MLTypeGetNumComponents ( int dataType)
slot

Returns the number of components of a voxel type.

◆ MLTypeGetStructInfoString

QString MLABMLScriptWrapper::MLTypeGetStructInfoString ( int dataType)
slot

Returns the char code representation of components of a voxel type.