]> Creatis software - clitk.git/blob - tools/clitkWriteDicomSeriesGenericFilter.h
clitkImageCommon.h is not systematically included anymore
[clitk.git] / tools / clitkWriteDicomSeriesGenericFilter.h
1 #ifndef clitkWriteDicomSeriesGenericFilter_h
2 #define clitkWriteDicomSeriesGenericFilter_h
3
4 /* =================================================
5  * @file   clitkWriteDicomSeriesGenericFilter.h
6  * @author 
7  * @date   
8  * 
9  * @brief 
10  * 
11  ===================================================*/
12
13
14 // clitk include
15 #include "clitkIO.h"
16 #include "clitkImageCommon.h"
17 #include "clitkWriteDicomSeries_ggo.h"
18
19 //itk include
20 #include "itkLightObject.h"
21 #include "itkGDCMImageIO.h"
22 #include "itkMetaDataDictionary.h"
23 #include "itkGDCMSeriesFileNames.h"
24 #include "itkImageSeriesReader.h"
25 #include "itkImageSeriesWriter.h"
26 #include <vector>
27 #include <itksys/SystemTools.hxx>
28
29 namespace clitk 
30 {
31   template<class args_info_type>
32   class ITK_EXPORT WriteDicomSeriesGenericFilter : public itk::LightObject
33   {
34   public:
35     //----------------------------------------
36     // ITK
37     //----------------------------------------
38     typedef WriteDicomSeriesGenericFilter                   Self;
39     typedef itk::LightObject                   Superclass;
40     typedef itk::SmartPointer<Self>            Pointer;
41     typedef itk::SmartPointer<const Self>      ConstPointer;
42    
43     // Method for creation through the object factory
44     itkNewMacro(Self);  
45
46     // Run-time type information (and related methods)
47     itkTypeMacro( WriteDicomSeriesGenericFilter, LightObject );
48
49
50     //----------------------------------------
51     // Typedefs
52     //----------------------------------------
53
54
55     //----------------------------------------
56     // Set & Get
57     //----------------------------------------    
58     void SetArgsInfo(const args_info_type & a)
59     {
60       m_ArgsInfo=a;
61       m_Verbose=m_ArgsInfo.verbose_flag;
62       m_InputFileName=m_ArgsInfo.input_arg;
63     }
64     
65     
66     //----------------------------------------  
67     // Update
68     //----------------------------------------  
69     void Update();
70
71   protected:
72
73     //----------------------------------------  
74     // Constructor & Destructor
75     //----------------------------------------  
76     WriteDicomSeriesGenericFilter();
77     ~WriteDicomSeriesGenericFilter() {};
78
79     
80     //----------------------------------------  
81     // Templated members
82     //----------------------------------------  
83     template <unsigned int Dimension>  void UpdateWithDim(std::string PixelType);
84     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndPixelType();
85
86
87     //----------------------------------------  
88     // Data members
89     //----------------------------------------
90     args_info_type m_ArgsInfo;
91     bool m_Verbose;
92     std::string m_InputFileName;
93
94   };
95
96
97 } // end namespace clitk
98
99 #ifndef ITK_MANUAL_INSTANTIATION
100 #include "clitkWriteDicomSeriesGenericFilter.txx"
101 #endif
102
103 #endif // #define clitkWriteDicomSeriesGenericFilter_h