]> Creatis software - clitk.git/blobdiff - filters/clitkSplitImageGenericFilter.h
added functionalities such as Reset a Transform, Save and view transformations etc.
[clitk.git] / filters / clitkSplitImageGenericFilter.h
index 8df8a28687f077587183f66f102f97d58ce801ac..e72eba1521e7327954964b04a06952e900aeef00 100644 (file)
@@ -1,18 +1,22 @@
-/*-------------------------------------------------------------------------
+/*=========================================================================
+  Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
 
-  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.
-                                                                             
--------------------------------------------------------------------------*/
+  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 clitkSplitImageGenericFilter_H
 #define clitkSplitImageGenericFilter_H
-
 /**
  -------------------------------------------------------------------
  * @file   clitkSplitImageGenericFilter.h
@@ -34,7 +38,8 @@
 namespace clitk {
   
   //--------------------------------------------------------------------
-  class SplitImageGenericFilter : public clitk::ImageToImageGenericFilter {
+  class SplitImageGenericFilter: 
+    public clitk::ImageToImageGenericFilter<SplitImageGenericFilter> {
   
   public:
        
@@ -42,8 +47,7 @@ namespace clitk {
     SplitImageGenericFilter ();
 
     // Types
-    typedef SplitImageGenericFilter  Self;
-    typedef ImageToImageGenericFilter     Superclass;
+    typedef SplitImageGenericFilter       Self;
     typedef itk::SmartPointer<Self>       Pointer;
     typedef itk::SmartPointer<const Self> ConstPointer;
 
@@ -54,16 +58,15 @@ namespace clitk {
     void SetSplitDimension (int dim) { mSplitDimension = dim; }
     void SetVerbose (const bool v) { m_Verbose = v; }
 
-    // Update
-    void Update ();
+   //--------------------------------------------------------------------
+    // Main function called each time the filter is updated
+    template<class InputImageType>  
+    void UpdateWithInputImageType();
 
   protected:  
+    template<unsigned int Dim> void InitializeImageType();
     int  mSplitDimension;
     bool m_Verbose;
-    //--------------------------------------------------------------------
-    template<unsigned int Dim> void UpdateWithDim(std::string PixelType, int Components);
-    template<unsigned int Dim, class PixelType> void UpdateWithDimAndPixelType();
-    //--------------------------------------------------------------------
 
   }; // end class SplitImageGenericFilter
 //--------------------------------------------------------------------