]> Creatis software - clitk.git/blob - segmentation/clitkMorphoMathGenericFilter.h
initial entry
[clitk.git] / segmentation / clitkMorphoMathGenericFilter.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
18 #ifndef clitkMorphoMathGenericFilter_h
19 #define clitkMorphoMathGenericFilter_h
20 /**
21    =================================================
22    * @file   clitkMorphoMathGenericFilter.h
23    * @author Jef Vandemeulebroucke <jef@creatis.insa-lyon.fr>
24    * @date   5 May 2009
25    * 
26    * @brief 
27    * 
28    =================================================*/
29
30 // clitk include
31 #include "clitkIO.h"
32 #include "clitkImageCommon.h"
33 #include "clitkMorphoMath_ggo.h"
34 #include "clitkConditionalBinaryErodeImageFilter.h"
35 #include "clitkConditionalBinaryDilateImageFilter.h"
36
37 // itk include
38 #include "itkLightObject.h"
39 #include "itkBinaryErodeImageFilter.h"
40 #include "itkBinaryDilateImageFilter.h"
41 #include "itkBinaryMorphologicalClosingImageFilter.h"
42 #include "itkBinaryMorphologicalOpeningImageFilter.h"
43 #include "itkBinaryBallStructuringElement.h"
44 #include "itkCastImageFilter.h"
45
46 namespace clitk {
47   
48   //====================================================================
49   class MorphoMathGenericFilter: public itk::LightObject
50   {
51   public: 
52
53     //================================================
54     typedef MorphoMathGenericFilter        Self;
55     typedef itk::LightObject  Superclass;
56     typedef itk::SmartPointer<Self>        Pointer;
57     typedef itk::SmartPointer<const Self> ConstPointer;
58
59     //================================================
60     itkNewMacro(Self);  
61     
62     //====================================================================
63     // Set methods
64     void SetArgsInfo(const args_info_clitkMorphoMath a)
65     {
66       m_ArgsInfo=a;
67       m_InputFileName=m_ArgsInfo.input_arg;
68       m_Verbose=m_ArgsInfo.verbose_flag;
69     }
70
71     //====================================================================
72     // Update
73     virtual void Update();
74     
75   protected:
76     const char * GetNameOfClass() const { return "MorphoMathGenericFilter"; }
77
78     //====================================================================
79     // Constructor & Destructor
80     MorphoMathGenericFilter();
81     ~MorphoMathGenericFilter(){;}
82     
83     //====================================================================
84     //Protected member functions
85     template <unsigned int Dimension>  void UpdateWithDim(std::string PixelType);
86     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndPixelType();
87
88   
89     args_info_clitkMorphoMath m_ArgsInfo;
90     bool m_Verbose;
91     std::string m_InputFileName;
92
93   };
94   
95 } // end namespace clitk
96 #ifndef ITK_MANUAL_INSTANTIATION
97 #include "clitkMorphoMathGenericFilter.txx"
98 #endif
99   
100 #endif //#define clitkMorphoMathGenericFilter_h