15 #ifndef __elxElastixTemplate_h
16 #define __elxElastixTemplate_h
19 #include "itkObject.h"
21 #include "itkObjectFactory.h"
22 #include "itkCommand.h"
24 #include "itkImageFileReader.h"
25 #include "itkImageToImageMetric.h"
57 #define elxGetBaseMacro(_name,_elxbasetype) \
58 virtual _elxbasetype * GetElx##_name##Base (void) const \
60 return this->GetElx##_name##Base( 0 );\
62 _elxbasetype * GetElx##_name##Base ( unsigned int idx ) const \
64 if ( idx < this->GetNumberOf##_name##s() ) \
66 return dynamic_cast<_elxbasetype *>( \
67 this->Get##_name##Container()->ElementAt(idx).GetPointer() );\
111 template <
class TFixedImage,
class TMovingImage>
150 itkStaticConstMacro( Dimension,
unsigned int, FixedImageType::ImageDimension );
151 itkStaticConstMacro( FixedDimension,
unsigned int, FixedImageType::ImageDimension );
152 itkStaticConstMacro( MovingDimension,
unsigned int, MovingImageType::ImageDimension );
224 return this->GetFixedImage( 0 );
226 virtual FixedImageType * GetFixedImage(
unsigned int idx )
const;
229 return this->GetMovingImage( 0 );
231 virtual MovingImageType * GetMovingImage(
unsigned int idx )
const;
238 return this->GetFixedMask( 0 );
240 virtual FixedMaskType * GetFixedMask(
unsigned int idx )
const;
243 return this->GetMovingMask( 0 );
245 virtual MovingMaskType * GetMovingMask(
unsigned int idx )
const;
251 virtual int Run(
void );
252 virtual int ApplyTransform(
void );
255 virtual int BeforeAll(
void );
256 virtual int BeforeAllTransformix(
void );
257 virtual void BeforeRegistration(
void );
258 virtual void BeforeEachResolution(
void );
259 virtual void AfterEachResolution(
void );
260 virtual void AfterEachIteration(
void );
261 virtual void AfterRegistration(
void );
264 itkGetConstMacro( IterationCounter,
unsigned int );
267 itkGetStringMacro( CurrentTransformParameterFileName );
273 virtual bool GetOriginalFixedImageDirection( FixedImageDirectionType & direction )
const;
281 typedef typename Superclass2::MultipleImageLoader<FixedImageType> FixedImageLoaderType;
303 virtual void CreateTransformParameterFile(
const std::string FileName,
307 virtual void OpenIterationInfoFile(
void );
323 void CallInEachComponent( PtrToMemberFunction func );
324 int CallInEachComponentInt( PtrToMemberFunction2 func );
330 virtual void ConfigureComponents(
Self * This );
338 void operator=(
const Self& );
346 #undef elxGetBaseMacro
348 #ifndef ITK_MANUAL_INSTANTIATION
349 #include "elxElastixTemplate.hxx"
352 #endif // end #ifndef __elxElastixTemplate_h