MeVisLab Toolbox Reference
mlITKSpecialInputsSupport.h File Reference

Go to the source code of this file.

Namespaces

 ml
 Main documentation file for ML users and developers.
 

Macros

#define ImplementAndSetSpecialInputImage(ITK_SPECIAL_IN_IMAGE, IN_IDX, FUNC_CALL, PRE_PARAMS, POST_PARAMS, ML_PIX_TYPE, ITK_PIX_TYPE, DIMENSION)
 This macro creates an itk image ITK_SPECIAL_IN_IMAGE wrapping a region of the input subimage from index IN_IDX, and sets it as parameters with FUNC_CALL(ITK_SPECIAL_IN_IMAGE). More...
 
#define ImplementAndSetSpecialInputBase(ITK_SPECIAL_IN_IMAGE, IN_IDX, FUNC_CALL, MEMBER_NAME, DIMENSION)
 This macro creates an itk image ITK_SPECIAL_IN_IMAGE wrapping a region of the input subimage from index IN_IDX, and sets it as parameters with FUNC_CALL(ITK_SPECIAL_IN_IMAGE). More...
 

Functions

template<typename ITK_INDATATYPE , unsigned int DIM>
itk::ImportImageFilter< ITK_INDATATYPE, DIM >::Pointer ml::getITKSpecialInImg (const SubImage &inSubImg, const PagedImage &inImg)
 Takes a SubImage and returns the ImportImageFilter managing the inSubImg as ITK object. More...
 

Macro Definition Documentation

◆ ImplementAndSetSpecialInputBase

#define ImplementAndSetSpecialInputBase (   ITK_SPECIAL_IN_IMAGE,
  IN_IDX,
  FUNC_CALL,
  MEMBER_NAME,
  DIMENSION 
)
Value:
\
/* Call the set function of the itk object with the pointer from the base object wrapper. */ \
FUNC_CALL(MEMBER_NAME.getWrappedInputObject(MEMBER_NAME.getTypeId())); \
\

This macro creates an itk image ITK_SPECIAL_IN_IMAGE wrapping a region of the input subimage from index IN_IDX, and sets it as parameters with FUNC_CALL(ITK_SPECIAL_IN_IMAGE).

Parameters
ITK_SPECIAL_IN_IMAGEis the itk pointer wrapping the buffer from input IN_IDX.
IN_IDXis the input image index from where the data shall come.
FUNC_CALLis called with the parameter ITK_SPECIAL_IN_IMAGE.
MEMBER_NAMEis the wrapper instance member wrapping the pointer to the base object.
DIMENSIONis the dimension of the wrapper type.

Definition at line 109 of file mlITKSpecialInputsSupport.h.

◆ ImplementAndSetSpecialInputImage

#define ImplementAndSetSpecialInputImage (   ITK_SPECIAL_IN_IMAGE,
  IN_IDX,
  FUNC_CALL,
  PRE_PARAMS,
  POST_PARAMS,
  ML_PIX_TYPE,
  ITK_PIX_TYPE,
  DIMENSION 
)
Value:
\
/* Get an ImportImageFilter from special input subimage. */ \
typename itk::ImportImageFilter<ITK_PIX_TYPE, DIMENSION>::Pointer \
ITK_SPECIAL_IN_IMAGE##Importer = \
getITKSpecialInImg<ITK_PIX_TYPE, DIMENSION>(inSubImgs[IN_IDX], *getInputImage(IN_IDX)); \
\
/* Get output image from the created importer. */ \
typedef typename itk::Image<ITK_PIX_TYPE, DIMENSION> ITK_SPECIAL_IN_IMAGE##Type; \
typename ITK_SPECIAL_IN_IMAGE##Type::Pointer ITK_SPECIAL_IN_IMAGE = \
ITK_SPECIAL_IN_IMAGE##Importer ? ITK_SPECIAL_IN_IMAGE##Importer->GetOutput() : NULL; \
\
/* If the output image is valid the call Set function; otherwise print error. */ \
if (ITK_SPECIAL_IN_IMAGE){ \
FUNC_CALL( PRE_PARAMS ITK_SPECIAL_IN_IMAGE POST_PARAMS ); \
} \
else { \
MLPrintAndNotify(ML_ERROR, "ML_","", \
"Could not create special itk input image","","Not setting special image", \
__FILE__, __LINE__, ML_BAD_PARAMETER); \
} \
#define ML_BAD_PARAMETER
A bad/invalid parameter (or even an inappropriate image) has been passed to a module or an algorithm;...
Definition: mlTypeDefs.h:925
@ ML_ERROR
Definition: mlTypeDefs.h:799

This macro creates an itk image ITK_SPECIAL_IN_IMAGE wrapping a region of the input subimage from index IN_IDX, and sets it as parameters with FUNC_CALL(ITK_SPECIAL_IN_IMAGE).

Parameters
ITK_SPECIAL_IN_IMAGEis the itk pointer wrapping the buffer from input IN_IDX.
IN_IDXis the input image index from where the data shall come.
FUNC_CALLis called with the parameter ITK_SPECIAL_IN_IMAGE.
PRE_PARAMSare optional parameters which can be passed before ITK_SPECIAL_IN_IMAGE to FUNC_CALL. They should terminate with "," Default should be ML_EMPTY_PARAM. to separate themselves from following ITK_SPECIAL_IN_IMAGE argument.
POST_PARAMSare optional parameters which can be passed after ITK_SPECIAL_IN_IMAGE to FUNC_CALL. They should start with "," to separate themselves from previous ITK_SPECIAL_IN_IMAGE argument. Default should be ML_EMPTY_PARAM.
ML_PIX_TYPEis the ML voxel type from the input image.
ITK_PIX_TYPEis the itk voxel type used for ITK_SPECIAL_IN_IMAGE.
DIMENSIONis the dimension of the wrapped image type.

Definition at line 75 of file mlITKSpecialInputsSupport.h.