In the ML, there are some important voxel and data types used in different contexts.
The following voxel types and enumerators are available in the ML:
MLint8 and
              MLint8Type
MLuint8 and
              MLuint8Type
MLint16 and
              MLint16Type
MLuint16 and
              MLuint16Type
MLint32 and
              MLint32Type
MLuint32 and
              MLuint32Type
MLint64 and
              MLint64Type
std::complex<float> and
              MLComplexfType
std::complex<double> and
              MLComplexdType
ml::Vector*f and
              MLVector*fType
ml::Vector*d and
              MLVector*dType
ml::Matrix*f and
              MLMatrix*fType
ml::Matrix*d and
              MLMatrix*dType
ml::Vector*i8 and
              MLVector*i8Type
ml::Vector*i16 and
              MLVector*i16Type
ml::Vector*i32 and
              MLVector*i32Type
ml::Vector*i64 and
              MLVector*i64Type
The following index and offset types are available in the ML:
A signed ML integer type with at least 64 bits used for all index calculations on very large images even on 32 bit systems (typically used for positions and coordinates in images). It is widely used in the ML for 64 bit index, size and range specifications which support signed arithmetic.
Examples of usage are classes
              ImageVector and
              SubImageBox which use
              MLint as members.
An unsigned ML integer type with at least 64 bits used for
              index calculations on very large images even on 32 bit systems.
              Its is sometimes needed for image positions and coordinates
              where a sign is not desired. Note that the signed
              MLint should normally be used for safe
              signed arithmetics, so MLuint is rarely
              used in ML contexts. It is typically used for index, size and
              range specifications without sign.
An example of usage is the specification of file sizes
              which can be larger than 4 GB even on 32 bit systems and where
              negative sizes make no sense. Further examples are some function
              arguments in 
                  mlFileSystem.h
                .
This signed ML offset type is a 32 bit signed integer on
              32 bit platforms and a 64 bit signed integer on 64 bit
              platforms. This type is typically used for expressions in
              pointer offsets where 64 bit integers could cause warnings on 32
              bit systems (because their range exceeds 32 bit pointer
              offsets). Such a type is necessary, because normal integers are
              not large enough on 64 bit systems; they remain 32 bit on most
              64 bit platforms. In most ML sources, the
              MLsoffset type is used instead of the
              MLuoffset, because signed arithmetic is
              often required in image processing operations.
An example of usage are index tables for kernel elements
              which are added to pointers (see project
              MLKernel and classes
              KernelBaseModule and
              KernelModule). These indexes must be able to
              describe negative and positive offsets on pointers which remain
              in the address space of the system.
This unsigned ML offset type is a 32 bit unsigned integer on 32 bit platforms and an unsigned 64 bit one on 64 bit platforms. Such a type is necessary, because a normal unsigned integer is not large enough on 64 bit systems; it remains 32 bit even on many 64 bit platforms. Be careful when using this type in ML image processing, because in most contexts signed arithmetic is required when offsetting image pointers. Thus it is rarely used in ML contexts.
The signed ML size type is a signed 32 bit
              size_t on 32 bit platforms and 64 bit
              size_t on 64 bit platforms. It
              corresponds to the normal ssize_t type on
              Unix platforms and to the SSIZE_T type on
              windows platforms. It is used for index, size and range
              specifications which do not exceed the signed range of the
              address space of a system. It is rarely used in ML
              contexts.
The unsigned ML size type is an unsigned 32 bit
              size_t on 32 bit platforms and 64 bit
              size_t on 64 bit platforms. It
              corresponds to the normal size_t type
              available on most systems. It is typically used for index, size
              and range specifications which do not exceed the range of the
              address space of a system. The original
              size_t type is used in most ML code,
              because it is platform-independent.
![]()  | Note | 
|---|---|
Internally (on 32 bit platforms), a
             
 Of course, the same applies for the types
              | 
          © 2025 MeVis Medical Solutions AG