From 20002bb35aa557d2d8c7db9ea96915f6953ade9c Mon Sep 17 00:00:00 2001 From: bharath Date: Wed, 21 Jul 2010 09:35:17 +0000 Subject: [PATCH] inherits from ImageToImageGenericFilter class --- .../clitkAffineRegistrationGenericFilter.h | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/registration/clitkAffineRegistrationGenericFilter.h b/registration/clitkAffineRegistrationGenericFilter.h index 830046f..2cb5a8c 100644 --- a/registration/clitkAffineRegistrationGenericFilter.h +++ b/registration/clitkAffineRegistrationGenericFilter.h @@ -29,6 +29,8 @@ #include "clitkGenericOptimizer.h" #include "clitkGenericInterpolator.h" #include "clitkGenericAffineTransform.h" +#include "clitkImageToImageGenericFilter.h" + //itk include #include @@ -58,52 +60,46 @@ namespace clitk { //==================================================================== -class AffineRegistrationGenericFilter: public itk::LightObject +template +class ITK_EXPORT AffineRegistrationGenericFilter: + public ImageToImageGenericFilter > { public: + AffineRegistrationGenericFilter(); + //================================================ typedef AffineRegistrationGenericFilter Self; - typedef itk::LightObject Superclass; typedef itk::SmartPointer Pointer; typedef itk::SmartPointer ConstPointer; //================================================ itkNewMacro(Self); + itkTypeMacro(AffineRegistrationGenericFilter, LightObject); + //==================================================================== // Set methods void SetArgsInfo(const args_info_clitkAffineRegistration args_info) { m_ArgsInfo=args_info; m_Verbose=m_ArgsInfo.verbose_flag; - } - - //==================================================================== - // Update - void Update(); + if (m_ArgsInfo.reference_given) { + SetInputFilename(m_ArgsInfo.reference_arg); + } + if (m_ArgsInfo.target_given) { + SetOutputFilename(m_ArgsInfo.target_arg); + } -protected: - const char * GetNameOfClass() const { - return "AffineRegistrationGenericFilter"; } - //==================================================================== - // Constructor & Destructor - AffineRegistrationGenericFilter(); - ~AffineRegistrationGenericFilter() { - ; - } - - //==================================================================== - //Templated member functions - template void UpdateWithDim(std::string PixelType); - template void UpdateWithDimAndPixelType(); + template + void InitializeImageType(); - //==================================================================== - //Member Data -public: bool m_Verbose; args_info_clitkAffineRegistration m_ArgsInfo; + + template + void UpdateWithInputImageType(); }; } -- 2.47.1