]> Creatis software - clitk.git/blob - tools/clitkPartitionEnergyWindowDicomGenericFilter.h
COMP: fix compilation errors for ITKv5
[clitk.git] / tools / clitkPartitionEnergyWindowDicomGenericFilter.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 clitkPartitionEnergyWindowDicomGenericFilter_h
19 #define clitkPartitionEnergyWindowDicomGenericFilter_h
20
21 /* =================================================
22  * @file   clitkPartitionEnergyWindowDicomGenericFilter.h
23  * @author 
24  * @date   
25  * 
26  * @brief 
27  * 
28  ===================================================*/
29
30
31 // clitk include
32 #include "clitkIO.h"
33 #include "clitkImageCommon.h"
34 #include "clitkPartitionEnergyWindowDicom_ggo.h"
35
36 //itk include
37 #include "itkLightObject.h"
38 #include "itkGDCMImageIO.h"
39 #include "itkMetaDataDictionary.h"
40 #include "itkGDCMSeriesFileNames.h"
41 #include "itkImageSeriesReader.h"
42 #include "itkImageSeriesWriter.h"
43 #include "itkImageFileReader.h"
44 #include "itkImageFileWriter.h"
45 #include <vector>
46 #include <itksys/SystemTools.hxx>
47
48 namespace clitk 
49 {
50   template<class args_info_type>
51   class ITK_EXPORT PartitionEnergyWindowDicomGenericFilter : public itk::LightObject
52   {
53   public:
54     //----------------------------------------
55     // ITK
56     //----------------------------------------
57     typedef PartitionEnergyWindowDicomGenericFilter   Self;
58     typedef itk::LightObject                          Superclass;
59     typedef itk::SmartPointer<Self>                   Pointer;
60     typedef itk::SmartPointer<const Self>             ConstPointer;
61    
62     // Method for creation through the object factory
63     itkNewMacro(Self);  
64
65     // Run-time type information (and related methods)
66     itkTypeMacro( PartitionEnergyWindowDicomGenericFilter, LightObject );
67
68
69     //----------------------------------------
70     // Typedefs
71     //----------------------------------------
72
73
74     //----------------------------------------
75     // Set & Get
76     //----------------------------------------    
77     void SetArgsInfo(const args_info_type & a)
78     {
79       m_ArgsInfo=a;
80       m_Verbose=m_ArgsInfo.verbose_flag;
81       m_InputFileName=m_ArgsInfo.input_arg;
82     }
83     
84     
85     //----------------------------------------  
86     // Update
87     //----------------------------------------  
88     void Update();
89
90   protected:
91
92     //----------------------------------------  
93     // Constructor & Destructor
94     //----------------------------------------  
95     PartitionEnergyWindowDicomGenericFilter();
96     ~PartitionEnergyWindowDicomGenericFilter() {};
97
98     
99     //----------------------------------------  
100     // Templated members
101     //----------------------------------------  
102     template <unsigned int Dimension>  void UpdateWithDim(std::string PixelType);
103     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndPixelType();
104
105
106     //----------------------------------------  
107     // Data members
108     //----------------------------------------
109     args_info_type m_ArgsInfo;
110     bool m_Verbose;
111     std::string m_InputFileName;
112
113
114   };
115
116 //Copy dicom dictionary
117 void CopyDictionary (itk::MetaDataDictionary &fromDict, itk::MetaDataDictionary &toDict);
118
119 //convert to std::string
120 template <typename T> std::string NumberToString ( T Number );
121
122 } // end namespace clitk
123
124 #ifndef ITK_MANUAL_INSTANTIATION
125 #include "clitkPartitionEnergyWindowDicomGenericFilter.txx"
126 #endif
127
128 #endif // #define clitkPartitionEnergyWindowDicomGenericFilter_h