MeVisLabToolboxReference
FMEwork/ITK/Sources/ITK/MLITK/ITKSupport/mlITKSupportMacrosP.h File Reference

File containing internal helper macros and functions to support the integration of ITK algorithms in ML modules. More...

#include "mlInitSystemITKSupport.h"
#include "mlModuleIncludes.h"
#include <itkImage.h>

Go to the source code of this file.

Defines

#define _ML_INSTANTIATE_2D_CODE(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, USER_CODE2, CLASS_NAME, DIM)
 Include dll-specific settings.
#define _ML_INSTANTIATE_3D_CODE(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, USER_CODE2, CLASS_NAME, DIM)
 Helper macro to instantiate some code for all ML data types and all ML dimensions.
#define _ML_INSTANTIATE_2D3D_CODE(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, USER_CODE2, CLASS_NAME, DIM)
 Helper macro to instantiate some code for all ML data types and all ML dimensions.
#define _ML_INSTANTIATE_6D_CODE(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, USER_CODE2, CLASS_NAME, DIM)
 Helper macro to instantiate some code for all ML data types and all ML dimensions.
#define _ML_IMPLEMENT_ALL_ITK_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, DIM_INST)
 This macro implements code for all ML voxel data types supported by ITK.
#define ML_IMPLEMENT_ALL_ITK_2D_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM)   _ML_IMPLEMENT_ALL_ITK_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, _ML_INSTANTIATE_2D_CODE)
 This macro implements 2D code for all ML voxel data types supported by ITK.
#define ML_IMPLEMENT_ALL_ITK_3D_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM)   _ML_IMPLEMENT_ALL_ITK_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, _ML_INSTANTIATE_3D_CODE)
 This macro implements 3D code for all ML voxel data types supported by ITK.
#define ML_IMPLEMENT_ALL_ITK_2D3D_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM)   _ML_IMPLEMENT_ALL_ITK_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, _ML_INSTANTIATE_2D3D_CODE)
 This macro implements 2+3D code for all ML voxel data types supported by ITK.
#define ML_IMPLEMENT_ALL_ITK_6D_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM)   _ML_IMPLEMENT_ALL_ITK_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, _ML_INSTANTIATE_6D_CODE)
 This macro implements 6D code for all ML voxel data types supported by ITK.
#define _WRAPPER_DETERMINE_IN_REGION1_CPP(CLASS_NAME)
 Helper functions to determine the input region needed to calculate a certain output region by an ITKImage of of any data type and any dimensions.
#define _ML_CALL_CALCOUTSUBIMAGE(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)
 Non public helper macro to support for X inputs.
#define _ML_CREATE_ITK_FILTER(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)   ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM>*)this)->_createITKFilterT();
 Internal helper macro, to be used only within this file to instantiate an itk object.
#define _ML_DESTROY_ITK_FILTER(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)   ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM>*)this)->_destroyITKFilterT();
 Internal helper macro, to be used only within this file.
#define _ML_DETERMINE_ITK_IN_REGION(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, _DIM, CLASS_NAME)   return ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, _DIM>*)this)->_determineInRegionT(inIndex, outBox, outIndex, numActiveInputs);
 Internal helper macro, to be used only within this file.
#define _ML_DETERMINE_ITK_OUT_IMAGE_REGION(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)   return ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM>*)this)->_getOutImageRegionT(numImageInputs);
 Internal helper macro, to be used only within this file.
#define _ML_SET_FILTER_PARAMETERS(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)   return ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM>*)this)->_setFilterParametersT();
 Internal helper macro, to be used only within this file.
#define _ML_GET_FILTER_PARAMETERS(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)   return ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM>*)this)->_getFilterParametersT();
 Internal helper macro, to be used only within this file.
#define _ML_ITK_DETERMINE_IN_REGION_0(CLASS_NAME, NAMESPACE)
 Calculates required input regions for filters with 0 inputs.
#define _ML_ITK_DETERMINE_IN_REGION_N(CLASS_NAME, NAMESPACE)
 Calculates required input regions for any number of filter inputs.
#define _ML_ITK_DETERMINE_OUT_REGION_0(CLASS_NAME, NAMESPACE)
 Calculates the maximum extent of the itk output image for 0 inputs and returns it as SubImageBox.
#define _ML_ITK_DETERMINE_OUT_REGION_N(CLASS_NAME, NAMESPACE)
 Calculates the maximum extent of the itk output image for N inputs and returns it as SubImageBox.
#define _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, DET_IN_REGION, WRAPPER_TYPEDEFS, CREATOR_SWITCH, DET_OUT_REGION)
 Implements a template class CLASS_NAME derived from BASE_CLASS with private constructor, destructor and assignment operator.
#define _TEMPLATE_INPUTS0   OutImageType
#define _TEMPLATE_INPUTS1   InImageType,OutImageType
#define _TEMPLATE_INPUTS2   InImageType,InImageType,OutImageType
#define _TEMPLATE_INPUTS3   InImageType,InImageType,InImageType,OutImageType
#define _TEMPLATE_INPUTS4   InImageType,InImageType,InImageType,InImageType,OutImageType
#define _TEMPLATE_INPUTS5   InImageType,InImageType,InImageType,InImageType,InImageType,OutImageType
#define ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0(CLASS_NAME, NAMESPACE)   typedef NAMESPACE::CLASS_NAME<_TEMPLATE_INPUTS0> FilterType; \
 Implement all support functionality for ITK filter calls and the call to the correct template version of of calcOutSubImageT.
#define ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_1(CLASS_NAME, NAMESPACE)   typedef NAMESPACE::CLASS_NAME<_TEMPLATE_INPUTS1> FilterType; \
 See ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0; this is for 1 input.
#define ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_2(CLASS_NAME, NAMESPACE)   typedef NAMESPACE::CLASS_NAME<_TEMPLATE_INPUTS2> FilterType; \
 See ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0; this is for 2 inputs.
#define ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_3(CLASS_NAME, NAMESPACE)   typedef NAMESPACE::CLASS_NAME<_TEMPLATE_INPUTS3> FilterType; \
 See ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0; this is for 3 inputs.

Detailed Description

File containing internal helper macros and functions to support the integration of ITK algorithms in ML modules.

Author:
Wolf Spindler
Date:
10/2004

Definition in file mlITKSupportMacrosP.h.


Define Documentation

#define _ML_CALL_CALCOUTSUBIMAGE (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)
Value:
{  \
    ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM>*)this)->calcOutSubImageT(*outSubImg, outIndex, inSubImgs); \
  }

Non public helper macro to support for X inputs.

Special version will pass the number of parameters as macro parameters

Definition at line 158 of file mlITKSupportMacrosP.h.

#define _ML_CREATE_ITK_FILTER (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)    ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM>*)this)->_createITKFilterT();

Internal helper macro, to be used only within this file to instantiate an itk object.

It expands to the code which calls functionality of the template wrapper of the ML module (for all ITK data types and dims) to create a typed ITK instance given by the untyped pointer itkFilterVoidPtr.

Parameters:
MLOUTDATATYPEis the ML voxel type of output image(s).
ITKOUTDATATYPEis the ITK voxel type of the output image(s) of the ITK class.
MLINDATATYPEis the ML voxel type of the input image(s).
ITKINDATATYPEis the ITK voxel type of the input image(s).
DIMis the dimension the ITK class is compiled with.
CLASS_NAMEis the class name of the ITK algorithm to be instantiated.

Definition at line 177 of file mlITKSupportMacrosP.h.

#define _ML_DESTROY_ITK_FILTER (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)    ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM>*)this)->_destroyITKFilterT();

Internal helper macro, to be used only within this file.

It expands to the code which calls functionality of the template wrapper of the ML module (for all ITK data types and dims) to destroy a typed ITK instance given by the untyped pointer itkFilterVoidPtr.

Parameters:
MLOUTDATATYPEis the ML voxel type of output image(s).
ITKOUTDATATYPEis the ITK voxel type of the output image(s) of the ITK class.
MLINDATATYPEis the ML voxel type of the input image(s).
ITKINDATATYPEis the ITK voxel type of the input image(s).
DIMis the dimension the ITK class is compiled with.
CLASS_NAMEis the class name of the ITK algorithm to be destroyed.

Definition at line 192 of file mlITKSupportMacrosP.h.

#define _ML_DETERMINE_ITK_IN_REGION (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  _DIM,
  CLASS_NAME 
)    return ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, _DIM>*)this)->_determineInRegionT(inIndex, outBox, outIndex, numActiveInputs);

Internal helper macro, to be used only within this file.

It expands to the code which calls functionality of the template wrapper of the ML module (for all ITK data types and dims) to calculate the input image region needed to calculate a certain output region.

Parameters:
MLOUTDATATYPEis the ML voxel type of output image(s).
ITKOUTDATATYPEis the ITK voxel type of the output image(s) of the ITK class.
MLINDATATYPEis the ML voxel type of the input image(s).
ITKINDATATYPEis the ITK voxel type of the input image(s).
_DIMis the dimension the ITK class is compiled with.
CLASS_NAMEis the class name of the ITK algorithm whose method shall be called.

Definition at line 207 of file mlITKSupportMacrosP.h.

#define _ML_DETERMINE_ITK_OUT_IMAGE_REGION (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)    return ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM>*)this)->_getOutImageRegionT(numImageInputs);

Internal helper macro, to be used only within this file.

It expands to the code which calls functionality of the template wrapper of the ML module (for all ITK data types and dims) to calculate the largest possible output image region and returns it as SubImgBox.

Parameters:
MLOUTDATATYPEis the ML voxel type of output image(s).
ITKOUTDATATYPEis the ITK voxel type of the output image(s) of the ITK class.
MLINDATATYPEis the ML voxel type of the input image(s).
ITKINDATATYPEis the ITK voxel type of the input image(s).
DIMis the dimension the ITK class is compiled with.
CLASS_NAMEis the class name of the ITK algorithm whose method shall be called.

Definition at line 223 of file mlITKSupportMacrosP.h.

#define _ML_GET_FILTER_PARAMETERS (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)    return ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM>*)this)->_getFilterParametersT();

Internal helper macro, to be used only within this file.

It expands to the code which calls functionality of the template wrapper of the ML module (for all ITK data types and dims) to get all filter parameters and to set field values with the read parameters.

Parameters:
MLOUTDATATYPEis the ML voxel type of output image(s).
ITKOUTDATATYPEis the ITK voxel type of the output image(s) of the ITK class.
MLINDATATYPEis the ML voxel type of the input image(s).
ITKINDATATYPEis the ITK voxel type of the input image(s).
DIMis the dimension the ITK class is compiled with.
CLASS_NAMEis the class name of the ITK algorithm whose method shall be called.

Definition at line 253 of file mlITKSupportMacrosP.h.

#define _ML_IMPLEMENT_ALL_ITK_CASES (   INFO_STRING,
  USER_CODE,
  CLASS_NAME,
  DATATYPE_ENUM,
  DIM,
  DIM_INST 
)
Value:
switch(DATATYPE_ENUM){                                                                            \
    case MLint8Type:       DIM_INST(MLint8      , MLint8      , MLint8      , MLint8   , USER_CODE, CLASS_NAME, DIM); break;    \
    case MLuint8Type:      DIM_INST(MLuint8     , MLuint8     , MLuint8     , MLuint8  , USER_CODE, CLASS_NAME, DIM); break;    \
    case MLint16Type:      DIM_INST(MLint16     , MLint16     , MLint16     , MLint16  , USER_CODE, CLASS_NAME, DIM); break;    \
    case MLuint16Type:     DIM_INST(MLuint16    , MLuint16    , MLuint16    , MLuint16 , USER_CODE, CLASS_NAME, DIM); break;    \
    case MLint32Type:      DIM_INST(MLint32     , MLint32     , MLint32     , MLint32  , USER_CODE, CLASS_NAME, DIM); break;    \
    case MLuint32Type:     DIM_INST(MLuint32    , MLuint32    , MLuint32    , MLuint32 , USER_CODE, CLASS_NAME, DIM); break;    \
    case MLfloatType:      DIM_INST(MLfloat     , MLfloat     , MLfloat     , MLfloat  , USER_CODE, CLASS_NAME, DIM); break;    \
    case MLdoubleType:     DIM_INST(MLdouble    , MLdouble    , MLdouble    , MLdouble , USER_CODE, CLASS_NAME, DIM); break;    \
 /* case MLldoubleType:    DIM_INST(MLldouble   , MLldouble   , MLldouble   , MLldouble, USER_CODE, CLASS_NAME, DIM); break; */ \
 /* case MLint64Type:      DIM_INST(MLint64     , MLint64     , MLint64     , MLint64  , USER_CODE, CLASS_NAME, DIM); break; */ \
 /* case MLuint64Type:     DIM_INST(MLuint64    , MLuint64    , MLuint64    , MLuint64 , USER_CODE, CLASS_NAME, DIM); break; */ \
    default: { \
      ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DATA_TYPE, \
                            "Type case not executed(_ML_IMPLEMENT_ALL_ITK_CASES).", \
                            "DATATYPE_ENUM=", DATATYPE_ENUM, \
                            "DIM=", DIM); \
      break; \
    } \
  } \

This macro implements code for all ML voxel data types supported by ITK.

Definition at line 86 of file mlITKSupportMacrosP.h.

#define _ML_INSTANTIATE_2D3D_CODE (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  USER_CODE2,
  CLASS_NAME,
  DIM 
)
Value:
{                                                                      \
    switch (DIM){                                                        \
      case 2: USER_CODE2(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, 2, CLASS_NAME); break;         \
      case 3: USER_CODE2(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, 3, CLASS_NAME); break;         \
      default:                                                           \
        ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Ignoring case(_ML_INSTANTIATE_3D_CODE).", "DIM=", DIM); \
    }                                                                    \
  }

Helper macro to instantiate some code for all ML data types and all ML dimensions.

Definition at line 55 of file mlITKSupportMacrosP.h.

#define _ML_INSTANTIATE_2D_CODE (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  USER_CODE2,
  CLASS_NAME,
  DIM 
)
Value:
{                                                                      \
    switch (DIM){                                                        \
      case 2: USER_CODE2(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, 2, CLASS_NAME); break;         \
      default:                                                           \
        ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Ignoring case(_ML_INSTANTIATE_2D_CODE).", "DIM=", DIM); \
    }                                                                    \
  }

Include dll-specific settings.

Include most ml specific things. Include required ITK stuff needed by many macros. Helper macro to instantiate some code for all ML data types and all ML dimensions.

Definition at line 29 of file mlITKSupportMacrosP.h.

#define _ML_INSTANTIATE_3D_CODE (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  USER_CODE2,
  CLASS_NAME,
  DIM 
)
Value:
{                                                                      \
    switch (DIM){                                                        \
      case 3: USER_CODE2(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, 3, CLASS_NAME); break;         \
      default:                                                           \
        ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Ignoring case(_ML_INSTANTIATE_3D_CODE).", "DIM=", DIM); \
    }                                                                    \
  }

Helper macro to instantiate some code for all ML data types and all ML dimensions.

Definition at line 42 of file mlITKSupportMacrosP.h.

#define _ML_INSTANTIATE_6D_CODE (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  USER_CODE2,
  CLASS_NAME,
  DIM 
)
Value:
{                                                                      \
    switch (DIM){                                                        \
  /*  case 1: USER_CODE2(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, 1, CLASS_NAME); break;*/       \
      case 2: USER_CODE2(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, 2, CLASS_NAME); break;         \
      case 3: USER_CODE2(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, 3, CLASS_NAME); break;         \
  /*  case 4: USER_CODE2(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, 4, CLASS_NAME); break; */      \
  /*  case 5: USER_CODE2(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, 5, CLASS_NAME); break; */      \
      case 6: USER_CODE2(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, 6, CLASS_NAME); break;         \
      default:                                                           \
        ML_ITK_ML_PRINT_ERROR(#CLASS_NAME, ML_BAD_DIMENSION, "Ignoring case(_ML_INSTANTIATE_6D_CODE).", "DIM=", DIM); \
    }                                                                    \
  }

Helper macro to instantiate some code for all ML data types and all ML dimensions.

Definition at line 69 of file mlITKSupportMacrosP.h.

#define _ML_ITK_DETERMINE_IN_REGION_0 (   CLASS_NAME,
  NAMESPACE 
)
Value:
SubImageBox _determineInRegionT(MLint /*inIndex*/, const SubImageBox &/*outBox*/, MLint /*outIndex*/, MLint /*numActiveInputs*/) \
  {                                                                                                 \
    ML_TRACE_IN("template CLASS_NAME##Wrapper::_determineInRegionT(4 args, default version)");      \
    return SubImageBox();                                                                           \
  }

Calculates required input regions for filters with 0 inputs.

Always returns empty box on any passed parameters.

Definition at line 261 of file mlITKSupportMacrosP.h.

#define _ML_ITK_DETERMINE_IN_REGION_N (   CLASS_NAME,
  NAMESPACE 
)
Value:
SubImageBox _determineInRegionT(MLint inIndex, const SubImageBox &outBox, MLint outIndex, MLint numActiveInputs) \
  {                                                                                     \
    ML_TRACE_IN("template CLASS_NAME##Wrapper::_determineInRegionT(4 args)");           \
                                                                                        \
    typename FilterType::Pointer filter = static_cast<FilterType*>(_itkObj->voidFilterPtr()); \
    return determineImageFilterInRegionTN<FilterType, InImageType>                      \
             (filter, *this, inIndex, outBox, outIndex, numActiveInputs);               \
  }                                                                                     \

Calculates required input regions for any number of filter inputs.

inIndex specifies the input region to be calculated. outBox specifies the output region which shall be calculated by the filter.

Definition at line 274 of file mlITKSupportMacrosP.h.

#define _ML_ITK_DETERMINE_OUT_REGION_0 (   CLASS_NAME,
  NAMESPACE 
)
Value:
SubImageBox _getOutImageRegionT(int /*numImageInputs*/)                              \
  {                                                                                    \
    ML_TRACE_IN("template CLASS_NAME##Wrapper::getOutImageRegionT() for 0 inps");      \
                                                                                       \
    typename FilterType::Pointer filter = static_cast<FilterType*>(_itkObj->voidFilterPtr());\
    return determineImageFilterOutImageRegionT0<FilterType, OutImageType>              \
             (filter, *this);                                                          \
  }                                                                                    \

Calculates the maximum extent of the itk output image for 0 inputs and returns it as SubImageBox.

Definition at line 290 of file mlITKSupportMacrosP.h.

#define _ML_ITK_DETERMINE_OUT_REGION_N (   CLASS_NAME,
  NAMESPACE 
)
Value:
SubImageBox _getOutImageRegionT(int numImageInputs)                                  \
  {                                                                                    \
    ML_TRACE_IN("template CLASS_NAME##Wrapper::getOutImageRegionT() for N inps");      \
                                                                                       \
    typename FilterType::Pointer filter = static_cast<FilterType*>(_itkObj->voidFilterPtr());\
    return determineImageFilterOutImageRegionTN<FilterType, OutImageType, InImageType> \
             (filter, *this, numImageInputs);                                          \
  }                                                                                    \

Calculates the maximum extent of the itk output image for N inputs and returns it as SubImageBox.

Definition at line 304 of file mlITKSupportMacrosP.h.

#define _ML_ITK_WRAPPER (   PROJECT_PREFIX,
  CLASS_NAME,
  NAMESPACE,
  DET_IN_REGION,
  WRAPPER_TYPEDEFS,
  CREATOR_SWITCH,
  DET_OUT_REGION 
)

Implements a template class CLASS_NAME derived from BASE_CLASS with private constructor, destructor and assignment operator.

The template class depends on

   <typename DATATYPE, unsigned int DIM> 

it implements the prototype of the function

    TSubImage<DATATYPE> *outSubImg, int outIndex SUB_IMGS)

Definition at line 353 of file mlITKSupportMacrosP.h.

#define _ML_SET_FILTER_PARAMETERS (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)    return ((CLASS_NAME##Wrapper<MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM>*)this)->_setFilterParametersT();

Internal helper macro, to be used only within this file.

It expands to the code which calls functionality of the template wrapper of the ML module (for all ITK data types and dims) to set all filter parameters.

Parameters:
MLOUTDATATYPEis the ML voxel type of output image(s).
ITKOUTDATATYPEis the ITK voxel type of the output image(s) of the ITK class.
MLINDATATYPEis the ML voxel type of the input image(s).
ITKINDATATYPEis the ITK voxel type of the input image(s).
DIMis the dimension the ITK class is compiled with.
CLASS_NAMEis the class name of the ITK algorithm whose method shall be called.

Definition at line 238 of file mlITKSupportMacrosP.h.

#define _TEMPLATE_INPUTS0   OutImageType

Definition at line 136 of file mlITKSupportMacrosP.h.

#define _TEMPLATE_INPUTS1   InImageType,OutImageType

Definition at line 137 of file mlITKSupportMacrosP.h.

#define _TEMPLATE_INPUTS2   InImageType,InImageType,OutImageType

Definition at line 138 of file mlITKSupportMacrosP.h.

#define _TEMPLATE_INPUTS3   InImageType,InImageType,InImageType,OutImageType

Definition at line 139 of file mlITKSupportMacrosP.h.

#define _TEMPLATE_INPUTS4   InImageType,InImageType,InImageType,InImageType,OutImageType

Definition at line 140 of file mlITKSupportMacrosP.h.

#define _TEMPLATE_INPUTS5   InImageType,InImageType,InImageType,InImageType,InImageType,OutImageType

Definition at line 141 of file mlITKSupportMacrosP.h.

#define _WRAPPER_DETERMINE_IN_REGION1_CPP (   CLASS_NAME)

Helper functions to determine the input region needed to calculate a certain output region by an ITKImage of of any data type and any dimensions.

Definition at line 150 of file mlITKSupportMacrosP.h.

#define ML_IMPLEMENT_ALL_ITK_2D3D_CASES (   INFO_STRING,
  USER_CODE,
  CLASS_NAME,
  DATATYPE_ENUM,
  DIM 
)    _ML_IMPLEMENT_ALL_ITK_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, _ML_INSTANTIATE_2D3D_CODE)

This macro implements 2+3D code for all ML voxel data types supported by ITK.

Definition at line 123 of file mlITKSupportMacrosP.h.

#define ML_IMPLEMENT_ALL_ITK_2D_CASES (   INFO_STRING,
  USER_CODE,
  CLASS_NAME,
  DATATYPE_ENUM,
  DIM 
)    _ML_IMPLEMENT_ALL_ITK_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, _ML_INSTANTIATE_2D_CODE)

This macro implements 2D code for all ML voxel data types supported by ITK.

Definition at line 111 of file mlITKSupportMacrosP.h.

#define ML_IMPLEMENT_ALL_ITK_3D_CASES (   INFO_STRING,
  USER_CODE,
  CLASS_NAME,
  DATATYPE_ENUM,
  DIM 
)    _ML_IMPLEMENT_ALL_ITK_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, _ML_INSTANTIATE_3D_CODE)

This macro implements 3D code for all ML voxel data types supported by ITK.

Definition at line 117 of file mlITKSupportMacrosP.h.

#define ML_IMPLEMENT_ALL_ITK_6D_CASES (   INFO_STRING,
  USER_CODE,
  CLASS_NAME,
  DATATYPE_ENUM,
  DIM 
)    _ML_IMPLEMENT_ALL_ITK_CASES(INFO_STRING, USER_CODE, CLASS_NAME, DATATYPE_ENUM, DIM, _ML_INSTANTIATE_6D_CODE)

This macro implements 6D code for all ML voxel data types supported by ITK.

Definition at line 129 of file mlITKSupportMacrosP.h.

#define ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0 (   CLASS_NAME,
  NAMESPACE 
)    typedef NAMESPACE::CLASS_NAME<_TEMPLATE_INPUTS0> FilterType; \

Implement all support functionality for ITK filter calls and the call to the correct template version of of calcOutSubImageT.

Parameters:
CLASS_NAMEspecifies the class name of the ITK algorithm.
NAMESPACEspecifies the namespace in which CLASS_NAME resides.

Definition at line 323 of file mlITKSupportMacrosP.h.

#define ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_1 (   CLASS_NAME,
  NAMESPACE 
)    typedef NAMESPACE::CLASS_NAME<_TEMPLATE_INPUTS1> FilterType; \

See ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0; this is for 1 input.

Definition at line 327 of file mlITKSupportMacrosP.h.

#define ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_2 (   CLASS_NAME,
  NAMESPACE 
)    typedef NAMESPACE::CLASS_NAME<_TEMPLATE_INPUTS2> FilterType; \

See ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0; this is for 2 inputs.

Definition at line 331 of file mlITKSupportMacrosP.h.

#define ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_3 (   CLASS_NAME,
  NAMESPACE 
)    typedef NAMESPACE::CLASS_NAME<_TEMPLATE_INPUTS3> FilterType; \

See ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0; this is for 3 inputs.

Definition at line 335 of file mlITKSupportMacrosP.h.