#include "itkWin32Header.h"
#include "itkMacro.h"
Go to the source code of this file.
Macros | |
#define | ELASTIXLIB_API |
#define | elxClassNameMacro(_name) |
#define | elxDeclarePureVirtualGetSelfMacro(type) |
#define | elxInstallMacro(_classname) |
#define | elxout ::xl::xout["standard"] |
#define | elxOverrideGetSelfMacro |
#define ELASTIXLIB_API |
Definition at line 169 of file elxMacro.h.
#define elxClassNameMacro | ( | _name | ) |
Example of usage:
class MyMetric { public: elxClassNameMacro("MyFirstMetric"); }
This macro defines two functions.
static const char * elxGetClassNameStatic(){return _name;} const char * elxGetClassName() const override { return _name; }
Use this macro in every component that will be installed in the ComponentDatabase, using "elxInstallMacro".
Definition at line 123 of file elxMacro.h.
#define elxDeclarePureVirtualGetSelfMacro | ( | type | ) |
Declares a pair of pure virtual member functions (overloaded for const and non-const) to get a reference to itself, of the specified type.
Definition at line 130 of file elxMacro.h.
#define elxInstallMacro | ( | _classname | ) |
This include is only used to get rid of a MSVS compiler warning when using std::copy. The warning is like: 'conversion' conversion from 'type1' to 'type2', possible loss of data To solve it ITK recommends to include itkMacro.h before <algorithm> or any other stl header. In elastix we try to make sure that elxIncludes.h is included before anything else, which includes elxMacro.h, which now includes itkWin32Header.h. 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 ComponentInstaller template is instantiated. 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 97 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 xl::xout["{error, warning, etc}"].
Definition at line 155 of file elxMacro.h.
#define elxOverrideGetSelfMacro |
Defines a pair of overrides of GetSelf() (overloaded for const and non-const), which return a reference to itself. Declares a deleted static member function overload, just to allow macro calls to end with a semicolon.
Definition at line 138 of file elxMacro.h.
Generated on 2024-07-17 for elastix by 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) |