MeVisLab Toolbox Reference
ml::VariableType Class Reference

Base class for all variable types, mainly for doxygen documentation purpose. More...

#include <mlTypedHandlers.h>

Inheritance diagram for ml::VariableType:
ComplexTypes DefaultExtendedTypes DefaultTypes FloatTypes IntegerTypes ScalarAndComplexTypes ScalarTypes

Detailed Description

Base class for all variable types, mainly for doxygen documentation purpose.

A variable type provides the dynamic mapping of a physical ML datatype to the correct template datatype.

Since it often does not make sense to support all possible datatypes for a given sub image, a variable type offers a mapping for the types that it supports and produces an error for the unsupported types.

The ML comes with the following variable types:

  • DefaultTypes - default datatypes, including all standard types and selected extended types
  • StandardTypes - all standard types (which are ML[u]int[8|16|32|64]/MLfloat and MLdouble)
  • IntegerTypes - all integer types (which are ML[u]int[8|16|32|64])
  • FloatTypes - all floating-point types (which are MLfloat and MLdouble)

It is very easy to implement your own variable types, have a look at the ML_IMPLEMENT_VARIABLE_TYPE_BEGIN macro. A typical case of an own variable type would be for example a type that supports only MLuint16 and MLdouble, but not the rest of the standard types to reduce template complexity.

Rationale for having variable types: Since the ML supports many different datatypes, it makes sense to have different variable types which support a subset of the datatypes that the ML supports. This is done mainly because a ML module that would support all possible type combinations of output image type and input image types for all available types would lead to thousands of templated versions of calculateOutputSubImage, which quickly generates very large libraries or overflows the compiler's stack.

Definition at line 91 of file mlTypedHandlers.h.


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