ModuleLoaderBackendsControl

MLModule

author

Wolf Spindler

package

FMEstable/ReleaseMeVis

dll

MLModuleLoaderBackends

definition

MLModuleLoaderBackendsControl.def

keywords

control, testing, MLModuleLoaderBackends

Purpose

This hidden and global module is used on python programming level only, do not use it in networks directly! A python function such as

def allowBackend(isOn):
  module = ctx.addModule("ModuleLoaderBackendsControl")
  module.object().allow(isOn)
  module.remove()

allows the (de)activation of ModuleLoaderBackends which are used by DirectDicomImport and MultFileVolume-based loaders. Currently the backends implement loaders for ImageLoad, MLImageFormatLoad, itkImageFileReader, and HistoLoad (not available in some installations).

Instead of using module.object().allow(onOff) function enabling/disabling all backends, also module.object().setAllowed(mask) can be used which describes a combination of allowed and/or disabled backends.

The implementation of ModuleLoaderBackendsControl provides the following bit masks which can be used for and/or combined to mask:

enum {
  ML_MODULE_LOADER_NO_BACKENDS = 0u,                     //!< No backends.
  ML_MODULE_LOADER_ALL_BACKENDS = 0X7FFFFFFFFFFFFFFFu,   //!< All backends, bit 63 is reserved.

  ML_MODULE_LOADER_ML_IMAGE_FORMAT_BACKEND = 1u,         //!< MLImageFormat backend.
  ML_MODULE_LOADER_IMAGE_LOAD_BACKEND = 2u,              //!< ImageLoader backend.
  ML_MODULE_LOADER_ITK_IMAGE_FILE_READER_BACKEND = 4u,   //!< itkImageFileReader backend.
  ML_MODULE_LOADER_HISTO_LOAD_BACKEND = 8u               //!< HistoLoad backend.
};

Therefore module.object().setAllowed(0x3) will allow ImageLoad and MLImageFormatLoad backends, for example.