MeVisLab Toolbox Reference
mlITKSupportMacrosP.h File Reference
#include "mlInitSystemITKSupport.h"
#include "mlModuleIncludes.h"
#include <itkImage.h>

Go to the source code of this file.

Macros

#define _ML_INSTANTIATE_2D_CODE(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, USER_CODE2, CLASS_NAME, DIM)
 Include dll-specific settings. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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 _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. More...
 
#define _ML_CALL_CALCOUTSUBIMAGE(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)
 Non public helper macro to support for X inputs. More...
 
#define _ML_CREATE_ITK_FILTER(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)
 Internal helper macro, to be used only within this file to instantiate an itk object. More...
 
#define _ML_DESTROY_ITK_FILTER(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)
 Internal helper macro, to be used only within this file. More...
 
#define _ML_DETERMINE_ITK_IN_REGION(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, _DIM, CLASS_NAME)
 Internal helper macro, to be used only within this file. More...
 
#define _ML_DETERMINE_ITK_OUT_IMAGE_REGION(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)
 Internal helper macro, to be used only within this file. More...
 
#define _ML_SET_FILTER_PARAMETERS(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)
 Internal helper macro, to be used only within this file. More...
 
#define _ML_GET_FILTER_PARAMETERS(MLOUTDATATYPE, ITKOUTDATATYPE, MLINDATATYPE, ITKINDATATYPE, DIM, CLASS_NAME)
 Internal helper macro, to be used only within this file. More...
 
#define _ML_ITK_DETERMINE_IN_REGION_0(CLASS_NAME, NAMESPACE)
 Calculates required input regions for filters with 0 inputs. More...
 
#define _ML_ITK_DETERMINE_IN_REGION_N(CLASS_NAME, NAMESPACE)
 Calculates required input regions for any number of filter inputs. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 

Macro Definition Documentation

◆ _ML_CALL_CALCOUTSUBIMAGE

#define _ML_CALL_CALCOUTSUBIMAGE (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)
Value:
{ \
reinterpret_cast<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 157 of file mlITKSupportMacrosP.h.

◆ _ML_CREATE_ITK_FILTER

#define _ML_CREATE_ITK_FILTER (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)
Value:
reinterpret_cast<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.

◆ _ML_DESTROY_ITK_FILTER

#define _ML_DESTROY_ITK_FILTER (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)
Value:
reinterpret_cast<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 193 of file mlITKSupportMacrosP.h.

◆ _ML_DETERMINE_ITK_IN_REGION

#define _ML_DETERMINE_ITK_IN_REGION (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  _DIM,
  CLASS_NAME 
)
Value:
return reinterpret_cast<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 209 of file mlITKSupportMacrosP.h.

◆ _ML_DETERMINE_ITK_OUT_IMAGE_REGION

#define _ML_DETERMINE_ITK_OUT_IMAGE_REGION (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)
Value:
return reinterpret_cast<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 226 of file mlITKSupportMacrosP.h.

◆ _ML_GET_FILTER_PARAMETERS

#define _ML_GET_FILTER_PARAMETERS (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)
Value:
return reinterpret_cast<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 258 of file mlITKSupportMacrosP.h.

◆ _ML_IMPLEMENT_ALL_ITK_CASES

#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; \
} \
} \
@ MLuint8Type
Enumerator for the unsigned 8 bit ML integer type.
Definition: mlTypeDefs.h:723
@ MLuint32Type
Enumerator for the unsigned 32 bit ML integer type.
Definition: mlTypeDefs.h:727
@ MLfloatType
Enumerator for the signed 32 bit ML floating point type.
Definition: mlTypeDefs.h:728
@ MLuint16Type
Enumerator for the unsigned 16 bit ML integer type.
Definition: mlTypeDefs.h:725
@ MLint16Type
Enumerator for the signed 16 bit ML integer type.
Definition: mlTypeDefs.h:724
@ MLint32Type
Enumerator for the signed 32 bit ML integer type.
Definition: mlTypeDefs.h:726
@ MLdoubleType
Enumerator for the signed 64 bit ML floating point type.
Definition: mlTypeDefs.h:729
@ MLint8Type
Enumerator for the signed 8 bit ML integer type.
Definition: mlTypeDefs.h:722
#define ML_BAD_DATA_TYPE
A wrong or unexpected data type has been passed to an algorithm which often is a programming error; t...
Definition: mlTypeDefs.h:884
unsigned int MLuint32
Definition: mlTypeDefs.h:191
unsigned char MLuint8
Definition: mlTypeDefs.h:115
double MLdouble
Definition: mlTypeDefs.h:223
unsigned short MLuint16
Definition: mlTypeDefs.h:148
signed short MLint16
Definition: mlTypeDefs.h:131
char MLint8
Definition: mlTypeDefs.h:103
signed int MLint32
Definition: mlTypeDefs.h:167
float MLfloat
Definition: mlTypeDefs.h:207

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

Definition at line 85 of file mlITKSupportMacrosP.h.

◆ _ML_INSTANTIATE_2D3D_CODE

#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); \
} \
}
#define ML_BAD_DIMENSION
he image or data structure has wrong extent or dimensions.
Definition: mlTypeDefs.h:937

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

Definition at line 54 of file mlITKSupportMacrosP.h.

◆ _ML_INSTANTIATE_2D_CODE

#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 28 of file mlITKSupportMacrosP.h.

◆ _ML_INSTANTIATE_3D_CODE

#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 41 of file mlITKSupportMacrosP.h.

◆ _ML_INSTANTIATE_6D_CODE

#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 68 of file mlITKSupportMacrosP.h.

◆ _ML_ITK_DETERMINE_IN_REGION_0

#define _ML_ITK_DETERMINE_IN_REGION_0 (   CLASS_NAME,
  NAMESPACE 
)
Value:
SubImageBox _determineInRegionT(MLint /*inIndex*/, const SubImageBox &/*outBox*/, MLint /*outIndex*/, MLint /*numActiveInputs*/) \
{ \
return SubImageBox(); \
}
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition: mlTypeDefs.h:578
TSubImageBox< MLint > SubImageBox
Define the standard SubImageBox type used in the ML. Its size varies with the size of the MLint type.

Calculates required input regions for filters with 0 inputs.

Always returns empty box on any passed parameters.

Definition at line 267 of file mlITKSupportMacrosP.h.

◆ _ML_ITK_DETERMINE_IN_REGION_N

#define _ML_ITK_DETERMINE_IN_REGION_N (   CLASS_NAME,
  NAMESPACE 
)
Value:
SubImageBox _determineInRegionT(MLint inIndex, const SubImageBox &outBox, MLint outIndex, MLint numActiveInputs) \
{ \
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 279 of file mlITKSupportMacrosP.h.

◆ _ML_ITK_DETERMINE_OUT_REGION_0

#define _ML_ITK_DETERMINE_OUT_REGION_0 (   CLASS_NAME,
  NAMESPACE 
)
Value:
SubImageBox _getOutImageRegionT(int /*numImageInputs*/) \
{ \
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 293 of file mlITKSupportMacrosP.h.

◆ _ML_ITK_DETERMINE_OUT_REGION_N

#define _ML_ITK_DETERMINE_OUT_REGION_N (   CLASS_NAME,
  NAMESPACE 
)
Value:
SubImageBox _getOutImageRegionT(int numImageInputs) \
{ \
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 305 of file mlITKSupportMacrosP.h.

◆ _ML_ITK_WRAPPER

#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 352 of file mlITKSupportMacrosP.h.

◆ _ML_SET_FILTER_PARAMETERS

#define _ML_SET_FILTER_PARAMETERS (   MLOUTDATATYPE,
  ITKOUTDATATYPE,
  MLINDATATYPE,
  ITKINDATATYPE,
  DIM,
  CLASS_NAME 
)
Value:
return reinterpret_cast<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 242 of file mlITKSupportMacrosP.h.

◆ _TEMPLATE_INPUTS0

#define _TEMPLATE_INPUTS0   OutImageType

Definition at line 135 of file mlITKSupportMacrosP.h.

◆ _TEMPLATE_INPUTS1

#define _TEMPLATE_INPUTS1   InImageType,OutImageType

Definition at line 136 of file mlITKSupportMacrosP.h.

◆ _TEMPLATE_INPUTS2

#define _TEMPLATE_INPUTS2   InImageType,InImageType,OutImageType

Definition at line 137 of file mlITKSupportMacrosP.h.

◆ _TEMPLATE_INPUTS3

#define _TEMPLATE_INPUTS3   InImageType,InImageType,InImageType,OutImageType

Definition at line 138 of file mlITKSupportMacrosP.h.

◆ _TEMPLATE_INPUTS4

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

Definition at line 139 of file mlITKSupportMacrosP.h.

◆ _TEMPLATE_INPUTS5

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

Definition at line 140 of file mlITKSupportMacrosP.h.

◆ _WRAPPER_DETERMINE_IN_REGION1_CPP

#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 149 of file mlITKSupportMacrosP.h.

◆ ML_IMPLEMENT_ALL_ITK_2D3D_CASES

#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 122 of file mlITKSupportMacrosP.h.

◆ ML_IMPLEMENT_ALL_ITK_2D_CASES

#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 110 of file mlITKSupportMacrosP.h.

◆ ML_IMPLEMENT_ALL_ITK_3D_CASES

#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 116 of file mlITKSupportMacrosP.h.

◆ ML_IMPLEMENT_ALL_ITK_6D_CASES

#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 128 of file mlITKSupportMacrosP.h.

◆ ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0

#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 322 of file mlITKSupportMacrosP.h.

◆ ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_1

#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 326 of file mlITKSupportMacrosP.h.

◆ ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_2

#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 330 of file mlITKSupportMacrosP.h.

◆ ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_3

#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 334 of file mlITKSupportMacrosP.h.