1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
3 Main authors : XX XX XX
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
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.
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
18 =========================================================================*/
20 #ifndef CLITKDICOMRT_STRUCTURESET_H
21 #define CLITKDICOMRT_STRUCTURESET_H
24 #include "clitkCommon.h"
25 #include "clitkDicomRT_ROI.h"
31 #if GDCM_MAJOR_VERSION == 2
32 #include "gdcmReader.h"
33 #include "gdcmWriter.h"
34 #include "gdcmAttribute.h"
39 //--------------------------------------------------------------------
40 class DicomRT_StructureSet : public itk::LightObject{
43 typedef DicomRT_StructureSet Self;
44 typedef itk::SmartPointer<Self> Pointer;
47 typedef std::map<int, clitk::DicomRT_ROI::Pointer>::iterator ROIIteratorType;
48 typedef std::map<int, clitk::DicomRT_ROI::Pointer>::const_iterator ROIConstIteratorType;
50 void Print(std::ostream & os = std::cout) const;
51 void Read(const std::string & filename);
52 void Write(const std::string & filename);
54 clitk::DicomRT_ROI * GetROIFromROINumber(int n);
55 std::map<int, clitk::DicomRT_ROI::Pointer> & GetROIs() { return mROIs; }
56 const std::string & GetStudyID() const;
57 const std::string & GetStudyTime() const;
58 const std::string & GetStudyDate() const;
59 const std::string & GetLabel() const;
60 const std::string & GetName() const;
61 const std::string & GetDate() const;
62 const std::string & GetTime() const;
64 int AddBinaryImageAsNewROI(vvImage * i, std::string name);
66 #if GDCM_MAJOR_VERSION == 2
68 static int ReadROINumber(const gdcm::Item & item);
73 std::string mStudyTime;
74 std::string mStudyDate;
80 std::map<int, clitk::DicomRT_ROI::Pointer> mROIs;
81 std::map<int, std::string> mMapOfROIName;
82 #if GDCM_MAJOR_VERSION == 2
83 gdcm::Reader * mReader;
84 gdcm::SmartPointer<gdcm::SequenceOfItems> mROIInfoSequenceOfItems;
85 gdcm::SmartPointer<gdcm::SequenceOfItems> mROIContoursSequenceOfItems;
90 DicomRT_StructureSet();
91 ~DicomRT_StructureSet();
93 //--------------------------------------------------------------------
95 } // end namespace clitk
96 #endif // CLITKDICOMRT_STRUCTURESET_H