29#include "itkWin32Header.h"
92#define elxInstallMacro( _classname ) \
93 template< ::elx::ComponentDatabase::IndexType VIndex > \
94 class _classname##_install \
97 typedef typename::elx::ElastixTypedef< VIndex >::ElastixType ElastixType; \
98 typedef::elx::ComponentDatabase::ComponentDescriptionType ComponentDescriptionType; \
99 static int DO( ::elx::ComponentDatabase * cdb ) \
101 ComponentDescriptionType name = ::elx::_classname< ElastixType >::elxGetClassNameStatic(); \
102 int dummy = ::elx::InstallFunctions< ::elx::_classname< ElastixType > >::InstallComponent( name, VIndex, cdb ); \
103 if( ::elx::ElastixTypedef< VIndex + 1 >::Defined() ) \
104 { return _classname##_install< VIndex + 1 >::DO( cdb ); } \
109 class _classname##_install< ::elx::NrOfSupportedImageTypes + 1 > \
112 typedef::elx::ComponentDatabase::ComponentDescriptionType ComponentDescriptionType; \
113 static int DO( ::elx::ComponentDatabase * ) \
116 extern "C" int _classname##InstallComponent( \
117 ::elx::ComponentDatabase * _cdb ) \
119 int _InstallDummy##_classname = _classname##_install< 1 >::DO( _cdb ); \
120 return _InstallDummy##_classname; \
140#define elxInstallComponentFunctionDeclarationMacro( _classname ) \
141 extern "C" int _classname##InstallComponent( \
142 ::elx::ComponentDatabase * _cdb )
161#define elxInstallComponentFunctionCallMacro( _classname ) \
162 ret |= _classname##InstallComponent( _cdb )
171#define elxPrepareImageTypeSupportMacro() \
172 template< ::elx::ComponentDatabase::IndexType VIndex > \
174 class ElastixTypedef \
179 typedef::itk::Object ElastixType; \
180 typedef::elx::ComponentDatabase::PixelTypeDescriptionType PixelTypeString; \
181 static PixelTypeString fPixelTypeAsString( void ) \
182 { return PixelTypeString( "" ); } \
183 static PixelTypeString mPixelTypeAsString( void ) \
184 { return PixelTypeString( "" ); } \
185 static unsigned int fDim( void ) \
187 static unsigned int mDim( void ) \
191 static bool Defined( void ) \
222#define elxSupportedImageTypeMacro( _fPixelType, _fDim, _mPixelType, _mDim, _VIndex ) \
224 class ElastixTypedef< _VIndex > \
227 typedef::itk::Image< _fPixelType, _fDim > FixedImageType; \
228 typedef::itk::Image< _mPixelType, _mDim > MovingImageType; \
229 typedef::elx::ElastixTemplate< FixedImageType, MovingImageType > ElastixType; \
230 typedef::elx::ComponentDatabase::PixelTypeDescriptionType PixelTypeString; \
231 static PixelTypeString fPixelTypeAsString( void ) \
232 { return PixelTypeString( #_fPixelType ); } \
233 static PixelTypeString mPixelTypeAsString( void ) \
234 { return PixelTypeString( #_mPixelType ); } \
235 static unsigned int fDim( void ) \
237 static unsigned int mDim( void ) \
239 static bool Defined( void ) \
262#define elxClassNameMacro( _name ) \
263 static const char * elxGetClassNameStatic( void ) { return _name; } \
264 const char * elxGetClassName( void ) const override { return _name; }
269#define elxOverrideGetConstMacro(name, type) \
270 type Get##name () const override \
272 return this->m_##name; \
287#define elxout ::xl::xout[ "standard" ]
295#if ( defined( _WIN32 ) || defined( WIN32 ) )
296# define ELASTIXLIB_API
298# if ( __GNUC__ >= 4 || defined( __clang__ ) )
299# define ELASTIXLIB_API __attribute__ ( ( visibility( "default" ) ) )
301# define ELASTIXLIB_API