]> Creatis software - clitk.git/blob - common/clitkImage2DicomRTStructFilter.h
Add 2 options to clitkImage2Dicom
[clitk.git] / common / clitkImage2DicomRTStructFilter.h
1 /*=========================================================================
2   Program:         vv http://www.creatis.insa-lyon.fr/rio/vv
3   Main authors :   XX XX XX
4
5   Authors belongs to:
6   - University of LYON           http://www.universite-lyon.fr/
7   - Léon Bérard cancer center    http://www.centreleonberard.fr
8   - CREATIS CNRS laboratory      http://www.creatis.insa-lyon.fr
9
10   This software is distributed WITHOUT ANY WARRANTY; without even
11   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12   PURPOSE.  See the copyright notices for more information.
13
14   It is distributed under dual licence
15   - BSD       http://www.opensource.org/licenses/bsd-license.php
16   - CeCILL-B  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17
18   =========================================================================*/
19
20 #ifndef CLITKIMAGE2DICOMRTSTRUCTFILTER_H
21 #define CLITKIMAGE2DICOMRTSTRUCTFILTER_H
22
23 // clitk
24 #include "clitkDicomRT_ROI.h"
25 #include "clitkImageCommon.h"
26 #include "clitkFilterBase.h"
27 #include "clitkDicomRT_StructureSet.h"
28
29 namespace clitk {
30
31   //--------------------------------------------------------------------
32   template<class PixelType>
33   class Image2DicomRTStructFilter: public clitk::FilterBase {
34
35   public:
36     Image2DicomRTStructFilter();
37     ~Image2DicomRTStructFilter();
38
39     typedef itk::Image<PixelType, 3> ImageType;
40     typedef typename ImageType::Pointer ImagePointer;
41     typedef typename clitk::DicomRT_StructureSet::Pointer DicomRTStructPointer;
42
43     // Set inputs
44     virtual void SetInputFilenames (const std::vector<std::string> _arg)
45     {
46       if ( this->m_InputFilenames != _arg )
47       {
48         this->m_InputFilenames = _arg;
49         this->Modified();
50       }
51     }
52     itkSetMacro(StructureSetFilename, std::string);
53     itkSetMacro(DicomFolder, std::string);
54     itkSetMacro(OutputFilename, std::string);
55     void SetROIType(std::string type);
56     itkSetMacro(ThresholdValue, PixelType);
57     itkSetMacro(SkipInitialStructuresFlag, bool);
58
59     // Run filter
60     void Update();
61
62   protected:
63     std::string m_StructureSetFilename;
64     std::string m_DicomFolder;
65     std::string m_OutputFilename;
66     std::string m_ROIType;
67     PixelType m_ThresholdValue;
68     std::vector<std::string> m_InputFilenames;
69     bool m_SkipInitialStructuresFlag;
70   };
71   //--------------------------------------------------------------------
72
73 } // end namespace clitk
74
75 #include "clitkImage2DicomRTStructFilter.txx"
76
77 #endif // CLITKIMAGE2DICOMRTSTRUCTFILTER_H
78