]> Creatis software - clitk.git/commitdiff
Derived from ImageToImageGenericFilter for integrating into vv
authorbharath <bharath>
Thu, 12 Aug 2010 12:06:16 +0000 (12:06 +0000)
committerbharath <bharath>
Thu, 12 Aug 2010 12:06:16 +0000 (12:06 +0000)
registration/clitkBLUTDIRGenericFilter.h

index af0efe8f3925fdb6891cf951dd3a025872f45535..c0f9003f51111f119c0947f30ba0ac6e25b4d842 100755 (executable)
@@ -41,6 +41,7 @@
 #include "clitkGenericMetric.h"
 #include "clitkBSplineDeformableTransformInitializer.h"
 #include "clitkMultiResolutionPyramidRegionFilter.h"
+#include "clitkImageToImageGenericFilter.h"
 
 // itk include
 #include "itkMultiResolutionImageRegistrationMethod.h"
@@ -65,64 +66,31 @@ namespace clitk
 {
 
 
-  class ITK_EXPORT BLUTDIRGenericFilter : public itk::LightObject
+  class ITK_EXPORT BLUTDIRGenericFilter :public ImageToImageGenericFilter<BLUTDIRGenericFilter>
   {
   public:
     //----------------------------------------
-    // ITK
+    BLUTDIRGenericFilter();
     //----------------------------------------
     typedef BLUTDIRGenericFilter                   Self;
-    typedef itk::LightObject                   Superclass;
     typedef itk::SmartPointer<Self>            Pointer;
     typedef itk::SmartPointer<const Self>      ConstPointer;
+    typedef ImageToImageGenericFilterBase   Superclass;
    
     // Method for creation through the object factory
     itkNewMacro(Self);  
+    
+    void SetArgsInfo(const args_info_clitkBLUTDIR & a);
 
     // Run-time type information (and related methods)
-    itkTypeMacro( BLUTDIRGenericFilter, LightObject );
-
-
-    //----------------------------------------
-    // Typedefs
-    //----------------------------------------
-
-
-    //----------------------------------------
-    // Set & Get
-    //----------------------------------------    
-    void SetArgsInfo(const args_info_clitkBLUTDIR & a)
-    {
-      m_ArgsInfo=a;
-      m_ReferenceFileName=m_ArgsInfo.reference_arg;
-      m_Verbose=m_ArgsInfo.verbose_flag;
-    }
-    
     
-    //----------------------------------------  
-    // Update
-    //----------------------------------------  
-    void Update();
+    template<unsigned int Dim>
+    void InitializeImageType();
 
-  protected:
 
-    //----------------------------------------  
-    // Constructor & Destructor
-    //----------------------------------------  
-    BLUTDIRGenericFilter();
-    ~BLUTDIRGenericFilter() {};
+    template<class InputImageType>
+    void UpdateWithInputImageType();
 
-    
-    //----------------------------------------  
-    // Templated members
-    //----------------------------------------  
-    template <unsigned int Dimension>  void UpdateWithDim(std::string PixelType);
-    template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndPixelType();
-
-
-    //----------------------------------------  
-    // Data members
-    //----------------------------------------
     args_info_clitkBLUTDIR m_ArgsInfo;
     bool m_Verbose;
     std::string m_ReferenceFileName;
@@ -132,8 +100,5 @@ namespace clitk
 
 } // end namespace clitk
 
-#ifndef ITK_MANUAL_INSTANTIATION
-#include "clitkBLUTDIRGenericFilter.txx"
-#endif
 
 #endif // #define clitkBLUTDIRGenericFilter_h