MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkEndoMacros.h File Reference

Go to the source code of this file.

Macros

#define endoAccessCvMat(function, T, arg1, arg2)
 
#define endoExec(macroAlgName, macroOutputType, macroOutputVarName, ...)
 
#define endoExec2(macroAlgName, macroOutputType1, macroOutputVarName1, macroOutputType2, macroOutputVarName2, ...)
 
#define endoSetInput(name, type)
 
#define endoSetOutput(name, type)
 

Macro Definition Documentation

◆ endoAccessCvMat

#define endoAccessCvMat ( function,
T,
arg1,
arg2 )
Value:
if( arg2.type() == cv::DataType<float>::type ) \
function<float, T>( arg1, arg2 ); \
else if( arg2.type() == cv::DataType<double>::type ) \
function<double, T>( arg1, arg2 ); \
else if( arg2.type() == cv::DataType<unsigned short>::type ) \
function<unsigned short, T>( arg1, arg2 ); \
else if( arg2.type() == cv::DataType<unsigned char>::type ) \
function<unsigned char, T>( arg1, arg2 ); \
else if( arg2.type() == cv::DataType<int>::type ) \
function<int, T>( arg1, arg2 ); \
else if( arg2.type() == cv::DataType<short>::type ) \
function<short, T>( arg1, arg2 ); \
else if( arg2.type() == cv::DataType<char>::type ) \
function<char, T>( arg1, arg2 ); \
else \
throw std::invalid_argument("Unknown type for cv::Mat");

COLLECTION OF MACROS FOR THE ENDOTRACKING MODULE multiplexing for cv mats

Definition at line 22 of file mitkEndoMacros.h.

◆ endoExec

#define endoExec ( macroAlgName,
macroOutputType,
macroOutputVarName,
... )
Value:
macroOutputType macroOutputVarName;\
{ \
macroAlgName _macroAlgName(__VA_ARGS__, &macroOutputVarName);\
_macroAlgName.Update();\
}

exec an algorithm with 1 output argument

Definition at line 43 of file mitkEndoMacros.h.

◆ endoExec2

#define endoExec2 ( macroAlgName,
macroOutputType1,
macroOutputVarName1,
macroOutputType2,
macroOutputVarName2,
... )
Value:
macroOutputType1 macroOutputVarName1;\
macroOutputType1 macroOutputVarName1;\
{ \
macroAlgName _macroAlgName(__VA_ARGS__, &macroOutputVarName1, &macroOutputVarName2);\
_macroAlgName.Update();\
}

exec an algorithm with 2 output argument

Definition at line 53 of file mitkEndoMacros.h.

◆ endoSetInput

#define endoSetInput ( name,
type )
Value:
public: \
virtual void Set##name (const type _arg) \
{ \
if ( this->m_##name != _arg ) \
{ \
this->m_##name = _arg; \
} \
} \
protected: \
const type m_##name;

Definition at line 70 of file mitkEndoMacros.h.

◆ endoSetOutput

#define endoSetOutput ( name,
type )
Value:
public: \
virtual void Set##name (type _arg) \
{ \
if ( this->m_##name != _arg ) \
{ \
this->m_##name = _arg; \
} \
} \
protected: \
type m_##name;

Definition at line 82 of file mitkEndoMacros.h.