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
Image< MaskPixelType, FixedDimension > FixedMaskType
FixedImagePyramidBase< Self > FixedImagePyramidBaseType
elx::TransformBase< Self > TransformBaseType
std::string m_CurrentTransformParameterFileName
DataObjectContainerType::Pointer DataObjectContainerPointer
unsigned char MaskPixelType
itk::VectorContainer< unsigned int, std::string > FileNameContainerType
Superclass2::DataObjectContainerType DataObjectContainerType
itk::VectorContainer< unsigned int, DataObjectPointer > DataObjectContainerType
AfterEachIterationCommandType::Pointer AfterEachIterationCommandPointer
The main elastix class, which connects components and invokes the BeforeRegistration(), BeforeEachResolution(), etc. methods.
AfterEachResolutionCommandType::Pointer AfterEachResolutionCommandPointer
MovingImageType InputImageType
AfterEachIterationCommandPointer m_AfterEachIterationCommand
SmartPointer< Self > Pointer
This class is the elastix base class for all Optimizers.
itk::DataObject DataObjectType
TimerPointer m_IterationTimer
SmartPointer< Self > Pointer
This class is the elastix base class for all Registration schemes.
FixedImageType::Pointer FixedImagePointer
The BaseComponent class is a class that all elastix components should inherit from.
TimerType::Pointer TimerPointer
A class to time the different parts of the registration.
MovingMaskType::Pointer MovingMaskPointer
OptimizerBase< Self > OptimizerBaseType
SimpleMemberCommand< Self > BeforeEachResolutionCommandType
Superclass2::DataObjectPointer DataObjectPointer
MovingImagePyramidBase< Self > MovingImagePyramidBaseType
This class is a base class for any image sampler.
InterpolatorBase< Self > InterpolatorBaseType
MovingImageType OutputImageType
AfterEachResolutionCommandPointer m_AfterEachResolutionCommand
virtual MovingImageType * GetMovingImage(void) const
This class is the elastix base class for all FixedImagePyramids.
FileNameContainerType::Pointer FileNameContainerPointer
SimpleMemberCommand< Self > AfterEachResolutionCommandType
Superclass2::MultipleImageLoader< MovingMaskType > MovingMaskLoaderType
SimpleMemberCommand< Self > AfterEachIterationCommandType
Superclass2::ObjectContainerPointer ObjectContainerPointer
MovingImageType::Pointer MovingImagePointer
virtual FixedImageType * GetFixedImage(void) const
CostFunction::ParametersValueType CoordRepType
Superclass2::ConfigurationType ConfigurationType
unsigned int m_IterationCounter
Superclass2::ObjectContainerType ObjectContainerType
FixedMaskType::Pointer FixedMaskPointer
#define elxGetBaseMacro(_name, _elxbasetype)
Image< MaskPixelType, MovingDimension > MovingMaskType
virtual ~ElastixTemplate()
RegistrationBase< Self > RegistrationBaseType
virtual FixedMaskType * GetFixedMask(void) const
SmartPointer< const Self > ConstPointer
Superclass2::ObjectPointer ObjectPointer
Superclass2::MultipleImageLoader< MovingImageType > MovingImageLoaderType
Superclass2::FileNameContainerType FileNameContainerType
This class is the elastix base class for all ResampleInterpolators.
ObjectContainerType::Pointer ObjectContainerPointer
This class is the elastix base class for all MovingImagePyramids.
TFixedImage FixedImageType
This class is the elastix base class for all Interpolators.
TimerPointer m_ResolutionTimer
ResampleInterpolatorBase< Self > ResampleInterpolatorBaseType
BeforeEachResolutionCommandPointer m_BeforeEachResolutionCommand
A class that deals with user given parameters and command line arguments.
itk::VectorContainer< unsigned int, ObjectPointer > ObjectContainerType
BaseComponent BaseComponentType
BeforeEachResolutionCommandType::Pointer BeforeEachResolutionCommandPointer
std::ofstream m_IterationInfoFile
Superclass2::MultipleImageLoader< FixedMaskType > FixedMaskLoaderType
DataObjectType::Pointer DataObjectPointer
ConfigurationType::Pointer ConfigurationPointer
Superclass2::DataObjectType DataObjectType
Superclass2::FileNameContainerPointer FileNameContainerPointer
Superclass2::ObjectType ObjectType
Superclass2::ConfigurationPointer ConfigurationPointer
ResamplerBase< Self > ResamplerBaseType
FixedImageType::DirectionType FixedImageDirectionType
ObjectType::Pointer ObjectPointer
This class creates an interface for elastix.
TMovingImage MovingImageType
virtual MovingMaskType * GetMovingMask(void) const
elx::ImageSamplerBase< Self > ImageSamplerBaseType
This class is the elastix base class for all Metrics.
Superclass2::DataObjectContainerPointer DataObjectContainerPointer
MetricBase< Self > MetricBaseType