7.4. Traps and Pitfalls When Using Registered Voxel Types

You might experience some problems when using or implementing modules with registered voxel types. The following hints might help you to solve these problems:

  1. There are no extended voxel types available, even modules like ConstantImage or ImagePropertyConvert do not offer them in their data type selection.

    • Check whether the loading of extended voxel types has been suppressed.

    • Check whether the library MLTypeExtensions is available in the search paths of MeVisLab. It contains the code for the registered voxel types generally used.

    • Check whether the application or MeVisLab loads MLTypeExtensions before the types are used. In the case of MeVisLab, the corresponding .def file must specify the tag PreloadDLL to force loading at application startup.

  2. The compiler fails "complaining" that the generated code is too large or too complex.

    • Template functions must often be instantiated for all types or even for all combinations of two template types. This can lead to a significant amount of code which exceeds the predefined limits of the compiler. Check the following options:

      1. Simplify the generated code or template function. This can either be done by simplifying the code itself, or by moving code into non-templated functions, if possible, or by reducing compilation to the really needed types. See Section 7.5.3, “Reducing Generated Code and Compile Times” for more information.

      2. Increase the compiler limits. This can be done in MeVisLab projects, for example, by setting MSVC_COMPILERSTACK = 800 or higher before the file includes in the .pro file.