]> Creatis software - clitk.git/blob - segmentation/clitkMorphoMathGenericFilter.h
Add 2 options to clitkImage2Dicom
[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://www.centreleonberard.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 // clitk include
22 #include "clitkIO.h"
23 #include "clitkImageCommon.h"
24 #include "clitkImageToImageGenericFilter.h"
25 #include "clitkMorphoMath_ggo.h"
26 #include "clitkMorphoMathFilter.h"
27
28 //--------------------------------------------------------------------
29 namespace clitk
30 {
31   
32   template<class ArgsInfoType>
33   class ITK_EXPORT MorphoMathGenericFilter:
34     public clitk::ImageToImageGenericFilter<MorphoMathGenericFilter<ArgsInfoType> >
35   {
36   public: 
37
38     typedef MorphoMathGenericFilter<ArgsInfoType> Self;
39     typedef ImageToImageGenericFilter<MorphoMathGenericFilter<ArgsInfoType> > Superclass;
40     typedef itk::SmartPointer<Self>       Pointer;
41     typedef itk::SmartPointer<const Self> ConstPointer;
42
43     //--------------------------------------------------------------------
44     MorphoMathGenericFilter();
45     itkNewMacro(Self);  
46     itkTypeMacro(MorphoMathGenericFilter, LightObject);
47     
48     //--------------------------------------------------------------------   
49     void SetArgsInfo(const ArgsInfoType & a);
50     template<class FilterType> 
51       void SetOptionsFromArgsInfoToFilter(FilterType * f) ;
52
53     //--------------------------------------------------------------------
54     // Main function called each time the filter is updated
55     template<class ImageType>  
56       void UpdateWithInputImageType();
57     
58   protected:
59     template<unsigned int Dim> void InitializeImageType();
60     ArgsInfoType mArgsInfo;
61       
62   private:
63     MorphoMathGenericFilter(const Self&); //purposely not implemented
64     void operator=(const Self&); //purposely not implemented
65   }; // end class
66   
67 } // end namespace clitk
68
69 #ifndef ITK_MANUAL_INSTANTIATION
70 #include "clitkMorphoMathGenericFilter.txx"
71 #endif
72   
73 #endif //#define clitkMorphoMathGenericFilter_h