X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkDicomRT_StructureSet.h;h=d1cc37c2364b3451f9ad0b495b9de409a80c3425;hb=eee2b74b70c0972894daf6a75685a8ef87e85c8f;hp=0da3a20c964d2dfb4b9c0dac78ece1d6b4eacbc3;hpb=667413db66459661701ccbb20c6dd89b15aa35bd;p=clitk.git diff --git a/common/clitkDicomRT_StructureSet.h b/common/clitkDicomRT_StructureSet.h index 0da3a20..d1cc37c 100644 --- a/common/clitkDicomRT_StructureSet.h +++ b/common/clitkDicomRT_StructureSet.h @@ -20,10 +20,20 @@ #ifndef CLITKDICOMRT_STRUCTURESET_H #define CLITKDICOMRT_STRUCTURESET_H +// clitk #include "clitkCommon.h" #include "clitkDicomRT_ROI.h" + +// vv #include "vvImage.h" +// gdcm +#if GDCM_MAJOR_VERSION == 2 +#include "gdcmReader.h" +#include "gdcmWriter.h" +#include "gdcmAttribute.h" +#endif + namespace clitk { //-------------------------------------------------------------------- @@ -34,12 +44,15 @@ public: typedef itk::SmartPointer Pointer; itkNewMacro(Self); + typedef std::map::iterator ROIIteratorType; + typedef std::map::const_iterator ROIConstIteratorType; + void Print(std::ostream & os = std::cout) const; void Read(const std::string & filename); void Write(const std::string & filename); - const std::vector & GetListOfROI() const; - clitk::DicomRT_ROI * GetROI(int n); + clitk::DicomRT_ROI * GetROIFromROINumber(int n); + std::map & GetROIs() { return mROIs; } const std::string & GetStudyID() const; const std::string & GetStudyTime() const; const std::string & GetStudyDate() const; @@ -50,6 +63,11 @@ public: int AddBinaryImageAsNewROI(vvImage * i, std::string name); +#if GDCM_MAJOR_VERSION == 2 + // Static + static int ReadROINumber(const gdcm::Item & item); +#endif + protected: std::string mStudyID; std::string mStudyTime; @@ -58,9 +76,15 @@ protected: std::string mName; std::string mDate; std::string mTime; + + std::map mROIs; std::map mMapOfROIName; - std::map mMapOfROIIndex; - std::vector mListOfROI; +#if GDCM_MAJOR_VERSION == 2 + gdcm::Reader * mReader; + gdcm::SmartPointer mROIInfoSequenceOfItems; + gdcm::SmartPointer mROIContoursSequenceOfItems; +#endif + gdcm::File * mFile; private: DicomRT_StructureSet();