]> Creatis software - clitk.git/blobdiff - filters/clitkVFResampleGenericFilter.h
Display window and level when using local windowing
[clitk.git] / filters / clitkVFResampleGenericFilter.h
index b1c4568dd133d1caebd1a65bf1833cdc31f94ea1..351a6fc1e1166b63e86c9de21c7e29b8135a9e4e 100644 (file)
@@ -1,6 +1,22 @@
+/*=========================================================================
+  Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
+
+  Authors belong to: 
+  - University of LYON              http://www.universite-lyon.fr/
+  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
+  - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
+
+  This software is distributed WITHOUT ANY WARRANTY; without even
+  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+  PURPOSE.  See the copyright notices for more information.
+
+  It is distributed under dual licence
+
+  - BSD        See included LICENSE.txt file
+  - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+======================================================================-====*/
 #ifndef CLITKIMAGERESAMPLEGENERICFILTER_H
 #define CLITKIMAGERESAMPLEGENERICFILTER_H
-
 /**
  -------------------------------------------------------------------
  * @file   clitkVFResampleGenericFilter.h
 namespace clitk {
   
   //--------------------------------------------------------------------
-  class VFResampleGenericFilter: public clitk::ImageToImageGenericFilter {
+  class VFResampleGenericFilter: 
+    public clitk::ImageToImageGenericFilter<VFResampleGenericFilter> {
     
   public: 
     // constructor
     VFResampleGenericFilter();
 
     // Types
-    typedef VFResampleGenericFilter    Self;
-    typedef ImageToImageGenericFilter     Superclass;
+    typedef VFResampleGenericFilter       Self;
     typedef itk::SmartPointer<Self>       Pointer;
     typedef itk::SmartPointer<const Self> ConstPointer;
 
@@ -57,9 +73,13 @@ namespace clitk {
     void SetBSplineOrder(int o) { mBSplineOrder = o; }
     void SetBLUTSampling(int b) { mSamplingFactors.resize(1); mSamplingFactors[0] = b; }
 
-    void Update();    
+   //--------------------------------------------------------------------
+    // Main function called each time the filter is updated
+    template<class InputImageType>  
+    void UpdateWithInputImageType();
 
   protected:
+    template<unsigned int Dim> void InitializeImageType();
     //--------------------------------------------------------------------
     std::string mInterpolatorName;
     std::vector<int> mOutputSize;
@@ -72,12 +92,8 @@ namespace clitk {
     std::vector<int> mSamplingFactors;
 
     //--------------------------------------------------------------------
-    template<unsigned int Dim> void Update_WithDim();
-    template<unsigned int Dim, class PixelType> void Update_WithDimAndPixelType();
     template<unsigned int Dim, class PixelType, unsigned int DimCompo> 
     void Update_WithDimAndPixelTypeAndComponent();
-
-    //--------------------------------------------------------------------
     template<class ImageType>
     typename ImageType::Pointer ComputeImage(typename ImageType::Pointer inputImage);