MeVisLabToolboxReference
|
File containing some helper functions for adding special image inputs to ML modules. More...
#include "mlInitSystemITKSupport.h"
#include "mlModuleIncludes.h"
#include "mlITKNonScalarSupport.h"
Go to the source code of this file.
Namespaces | |
namespace | ml |
Define the namespace name like in the ML. Default is | |
Defines | |
#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). | |
#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). | |
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. |
File containing some helper functions for adding special image inputs to ML modules.
Definition in file mlITKSpecialInputsSupport.h.
#define ImplementAndSetSpecialInputBase | ( | ITK_SPECIAL_IN_IMAGE, | |
IN_IDX, | |||
FUNC_CALL, | |||
MEMBER_NAME, | |||
DIMENSION | |||
) |
\
/* 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).
ITK_SPECIAL_IN_IMAGE | is the itk pointer wrapping the buffer from input IN_IDX. |
IN_IDX | is the input image index from where the data shall come. |
FUNC_CALL | is called with the parameter ITK_SPECIAL_IN_IMAGE. |
MEMBER_NAME | is the wrapper instance member wrapping the pointer to the base object. |
DIMENSION | is the dimension of the wrapper type. |
Definition at line 116 of file mlITKSpecialInputsSupport.h.
#define ImplementAndSetSpecialInputImage | ( | ITK_SPECIAL_IN_IMAGE, | |
IN_IDX, | |||
FUNC_CALL, | |||
PRE_PARAMS, | |||
POST_PARAMS, | |||
ML_PIX_TYPE, | |||
ITK_PIX_TYPE, | |||
DIMENSION | |||
) |
\ /* 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); \ } \
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).
ITK_SPECIAL_IN_IMAGE | is the itk pointer wrapping the buffer from input IN_IDX. |
IN_IDX | is the input image index from where the data shall come. |
FUNC_CALL | is called with the parameter ITK_SPECIAL_IN_IMAGE. |
PRE_PARAMS | are 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_PARAMS | are 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_TYPE | is the ML voxel type from the input image. |
ITK_PIX_TYPE | is the itk voxel type used for ITK_SPECIAL_IN_IMAGE. |
DIMENSION | is the dimension of the wrapped image type. |
Definition at line 82 of file mlITKSpecialInputsSupport.h.