]> Creatis software - clitk.git/blobdiff - filters/clitkImageFillRegionGenericFilter.h
SetTransform has been removed from vvImage since we obtain a pointer to the transform...
[clitk.git] / filters / clitkImageFillRegionGenericFilter.h
index ea128b9a214350a0809b3b8617a31444af53494a..1ef79ee140b085d36ea4e09a3d5cd1da3a000d2a 100644 (file)
@@ -1,18 +1,22 @@
-/*-------------------------------------------------------------------------
-
-  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
-  l'Image). All rights reserved. See Doc/License.txt or
-  http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
-                                                                                
-     This software is distributed WITHOUT ANY WARRANTY; without even
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-     PURPOSE.  See the above copyright notices for more information.
-                                                                             
--------------------------------------------------------------------------*/
+/*=========================================================================
+  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 CLITKIMAGEFILLREGIONGENERICFILTER_H
 #define CLITKIMAGEFILLREGIONGENERICFILTER_H
-
 /**
  -------------------------------------------------------------------
  * @file   clitkImageFillRegionGenericFilter.h
@@ -35,7 +39,8 @@
 namespace clitk {
   
   //--------------------------------------------------------------------
-  class ImageFillRegionGenericFilter : public clitk::ImageToImageGenericFilter {
+  class ImageFillRegionGenericFilter: 
+    public clitk::ImageToImageGenericFilter<ImageFillRegionGenericFilter> {
   
   public:
        
@@ -45,7 +50,6 @@ namespace clitk {
 
     // Types
     typedef ImageFillRegionGenericFilter  Self;
-    typedef ImageToImageGenericFilter     Superclass;
     typedef itk::SmartPointer<Self>       Pointer;
     typedef itk::SmartPointer<const Self> ConstPointer;
 
@@ -58,10 +62,13 @@ namespace clitk {
     void SetSphericRegion(std::vector<double> & radius, std::vector<double> & center);
     void SetSphericRegion(std::vector<double> & radius);
 
-    // Update
-    void Update ();
+    //--------------------------------------------------------------------
+    // Main function called each time the filter is updated
+    template<class InputImageType>  
+    void UpdateWithInputImageType();
 
   protected:  
+    template<unsigned int Dim> void InitializeImageType();
     double mPixelValue;
     int * mSize;
     int * mStart;
@@ -70,12 +77,7 @@ namespace clitk {
     bool mSphericRegion;
     bool m_IsCentered;
 
-
-    //--------------------------------------------------------------------
-    template<unsigned int Dim> void Update_WithDim();
-    template<unsigned int Dim, class PixelType> void Update_WithDimAndPixelType();
     template<unsigned int Dim, class PixelType> void Update_WithDimAndPixelType_SphericRegion();
-    //--------------------------------------------------------------------
 
   }; // end class ImageFillRegionGenericFilter
 //--------------------------------------------------------------------