![]() |
Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
Go to the source code of this file.
Macros | |
#define | elxClassNameMacro(_name) |
#define | elxInstallComponentFunctionCallMacro(_classname) ret |= _classname##InstallComponent( _cdb ) |
#define | elxInstallComponentFunctionDeclarationMacro(_classname) |
#define | elxInstallMacro(_classname) |
#define | elxout ::xl::xout["standard"] |
#define | elxPrepareImageTypeSupportMacro() |
#define | elxSupportedImageTypeMacro(_fPixelType, _fDim, _mPixelType, _mDim, _VIndex) |
#define elxClassNameMacro | ( | _name | ) |
Example of usage:
class MyMetric { public: elxClassNameMacro("MyFirstMetric"); }
This macro defines two functions.
static const char * elxGetClassNameStatic(void){return _name;} virtual const char * elxGetClassName(void){return _name;}
Use this macro in every component that will be installed in the ComponentDatabase, using "elxInstallMacro".
Definition at line 254 of file elxMacro.h.
#define elxInstallComponentFunctionCallMacro | ( | _classname | ) | ret |= _classname##InstallComponent( _cdb ) |
elxInstallComponentFunctionCallMacro
Usage example: elxInstallComponentFunctionCallMacro( BSplineTransform );
This macro calls the function implemented by the elxInstallMacro. This macro is used by the CMake generated file elxInstallComponentFunctionCalls.h only.
Details: the InstallComponent function defined by elxInstallMacro is called.
See also elxInstallAllComponents.h.
Definition at line 151 of file elxMacro.h.
#define elxInstallComponentFunctionDeclarationMacro | ( | _classname | ) |
elxInstallComponentFunctionDeclarationMacro
Usage example: elxInstallComponentFunctionDeclarationMacro( BSplineTransform );
This macro declares the function implemented by the elxInstallMacro. This macro is used by the CMake generated file elxInstallComponentFunctionDeclarations.h only.
Details: the declaration of InstallComponent function defined by elxInstallMacro is simply repeated.
See also elxInstallAllComponents.h.
Definition at line 129 of file elxMacro.h.
#define elxInstallMacro | ( | _classname | ) |
Macro for installing support new components (like a new metric, interpolator, or transform). Must be invoked in the .cxx file of the component, after declaration of the class.
Example of usage:
The class to be installed should inherit from the appropriate base class. (elx::MetricBase, elx::TransformBase etc,) and from a specific itk object.
IMPORTANT: only one template argument <class telastix>=""> is allowed. Not more, not less.
Details: a function "int _classname##InstallComponent( _cdb )" is defined. In this function a template is defined, _classname##_install<VIndex>. It contains the ElastixTypedef<VIndex>, and recursive function DO(cdb). DO installs the component for all defined ElastixTypedefs (so for all supported image types).
Definition at line 80 of file elxMacro.h.
#define elxout ::xl::xout["standard"] |
elxout
This macro replaces 'elxout' by 'xl::xout["standard"]'. This simplifies writing messages to screen and logfile.
NB: for error and warning messages, for writing to the transformparameterfile etc. do not use elxout, but xout["{error, warning, etc}"].
Definition at line 270 of file elxMacro.h.
#define elxPrepareImageTypeSupportMacro | ( | ) |
elxPrepareImageTypeSupportMacro To be called once, before the elxSupportImageTypeMacro()
IMPORTANT: the macro must be invoked in namespace elastix!
Definition at line 162 of file elxMacro.h.
#define elxSupportedImageTypeMacro | ( | _fPixelType, | |
_fDim, | |||
_mPixelType, | |||
_mDim, | |||
_VIndex | |||
) |
Macro for installing support for new ImageTypes. Used in elxSupportedImageTypes.cxx .
Example of usage:
namespace elastix { elxSupportedImageTypeMacro(unsigned short, 2, float, 3, 1); elxSupportedImageTypeMacro(unsigned short, 3, float, 3, 2); etc. } //end namespace elastix
The first line adds support for the following combination of ImageTypes: fixedImage: 2D unsigned short movingImage 3D float The Index (last argument) of this combination of ImageTypes is 1.
The Index should not be 0. This value is reserved for errormessages. Besides, duplicate indices are not allowed.
IMPORTANT: the macro must be invoked in namespace elastix!
Details: the macro adds a class template specialization for the class ElastixTypedef<VIndex>.
Definition at line 213 of file elxMacro.h.
Generated on 04-01-2014 for elastix by ![]() |
![]() |