]> Creatis software - clitk.git/blobdiff - segmentation/clitkFillMaskGenericFilter.h
changes in license header
[clitk.git] / segmentation / clitkFillMaskGenericFilter.h
index 8a9b479fc8103844f078e8fd54852f469ff6eaa9..f87aeaf0be82a6cb2dcb28b118990ea5e3188379 100644 (file)
@@ -1,99 +1,63 @@
-#ifndef clitkFillMaskGenericFilter_h
-#define clitkFillMaskGenericFilter_h
+/*=========================================================================
+  Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
 
-/* =================================================
- * @file   clitkFillMaskGenericFilter.h
- * @author 
- * @date   
- * 
- * @brief 
- * 
- ===================================================*/
+  Authors belong to: 
+  - University of LYON              http://www.universite-lyon.fr/
+  - Léon Bérard cancer center       http://www.centreleonberard.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.
 
-// clitk include
-#include "clitkFillMask_ggo.h"
-#include "clitkImageCommon.h"
-#include "clitkExtractImageFilter.h"
+  It is distributed under dual licence
 
-//itk include
-#include "itkLightObject.h"
-#include "itkJoinSeriesImageFilter.h"
-#include "itkBinaryThresholdImageFilter.h"
-#include "itkConnectedComponentImageFilter.h"
-#include "itkRelabelComponentImageFilter.h"
-#include "itkThresholdImageFilter.h"
-#include "itkPermuteAxesImageFilter.h"
-#include "itkExtractImageFilter.h"
-#include "itkCastImageFilter.h"
+  - BSD        See included LICENSE.txt file
+  - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+===========================================================================**/
 
+#ifndef CLITKFILLMASKGENERICFILTER_H
+#define CLITKFILLMASKGENERICFILTER_H
+
+// clitk 
+#include "clitkImageToImageGenericFilter.h"
+#include "clitkFillMaskFilter.h"
+
+//--------------------------------------------------------------------
 namespace clitk 
 {
 
-
-  class ITK_EXPORT FillMaskGenericFilter : public itk::LightObject
+  template<class ArgsInfoType>
+  class ITK_EXPORT FillMaskGenericFilter : 
+    public ImageToImageGenericFilter<FillMaskGenericFilter<ArgsInfoType> >
   {
   public:
-    //----------------------------------------
-    // ITK
-    //----------------------------------------
-    typedef FillMaskGenericFilter                   Self;
-    typedef itk::LightObject                   Superclass;
-    typedef itk::SmartPointer<Self>            Pointer;
-    typedef itk::SmartPointer<const Self>      ConstPointer;
-   
-    // Method for creation through the object factory
-    itkNewMacro(Self);  
-
-    // Run-time type information (and related methods)
-    itkTypeMacro( FillMaskGenericFilter, LightObject );
-
-
-    //----------------------------------------
-    // Typedefs
-    //----------------------------------------
-
-
-    //----------------------------------------
-    // Set & Get
-    //----------------------------------------    
-    void SetArgsInfo(const args_info_clitkFillMask & a)
-    {
-      m_ArgsInfo=a;
-      m_Verbose=m_ArgsInfo.verbose_flag;
-      m_InputFileName=m_ArgsInfo.input_arg;
-    }
-    
-    
-    //----------------------------------------  
-    // Update
-    //----------------------------------------  
-    void Update();
-
-  protected:
-
-    //----------------------------------------  
-    // Constructor & Destructor
-    //----------------------------------------  
+    //--------------------------------------------------------------------
     FillMaskGenericFilter();
-    ~FillMaskGenericFilter() {};
-
-    
-    //----------------------------------------  
-    // Templated members
-    //----------------------------------------  
-    template <class PixelType>  void UpdateWithPixelType();
 
+    //--------------------------------------------------------------------
+    typedef FillMaskGenericFilter            Self;
+    typedef ImageToImageGenericFilter<Self > Superclass;
+    typedef itk::SmartPointer<Self>          Pointer;
+    typedef itk::SmartPointer<const Self>    ConstPointer;
+   
+    //--------------------------------------------------------------------
+    itkNewMacro(Self);  
+    itkTypeMacro(FillMaskGenericFilter, LightObject);
 
-    //----------------------------------------  
-    // Data members
-    //----------------------------------------
-    args_info_clitkFillMask m_ArgsInfo;
-    bool m_Verbose;
-    std::string m_InputFileName;
+    //--------------------------------------------------------------------
+    void SetArgsInfo(const ArgsInfoType & a);
 
-  };
+    //--------------------------------------------------------------------
+    // Main function called each time the filter is updated
+    template<class ImageType>  
+    void UpdateWithInputImageType();
 
+   protected:
+    template<unsigned int Dim> void InitializeImageType();
+    ArgsInfoType mArgsInfo;
+  }; // end class
+  //--------------------------------------------------------------------
 
 } // end namespace clitk
 
@@ -101,4 +65,4 @@ namespace clitk
 #include "clitkFillMaskGenericFilter.txx"
 #endif
 
-#endif // #define clitkFillMaskGenericFilter_h
+#endif // #define CLITKFILLMASKGENERICFILTER_H