X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkDicomRT_StructureSet.h;h=dff4d75276aa3196dca59941661007f7da497733;hb=d786b4f836c0f12ba4a6dd06803cbe771ac371e3;hp=5e4cf972d0a158284d4d5e721865bb0bef5eb016;hpb=c4de479fec231c7d53555dcd21d308f06aad17ec;p=clitk.git diff --git a/common/clitkDicomRT_StructureSet.h b/common/clitkDicomRT_StructureSet.h index 5e4cf97..dff4d75 100644 --- a/common/clitkDicomRT_StructureSet.h +++ b/common/clitkDicomRT_StructureSet.h @@ -24,11 +24,22 @@ #include "clitkCommon.h" #include "clitkDicomRT_ROI.h" +//vtk +#include "vtkMatrix4x4.h" + // vv #include "vvImage.h" // gdcm -#if GDCM_MAJOR_VERSION == 2 +#include "clitkConfiguration.h" +#if CLITK_USE_SYSTEM_GDCM == 1 +#include +#include +#endif + +// gdcm +#if GDCM_MAJOR_VERSION >= 2 +// This is not use if CLITK_USE_SYSTEM_GDCM==1 #include "gdcmReader.h" #include "gdcmWriter.h" #include "gdcmAttribute.h" @@ -44,15 +55,22 @@ public: typedef itk::SmartPointer Pointer; itkNewMacro(Self); - typedef typename std::map::iterator ROIIteratorType; - typedef typename std::map::const_iterator ROIConstIteratorType; + typedef std::map ROIMapContainer; + typedef ROIMapContainer::iterator ROIIteratorType; + typedef ROIMapContainer::const_iterator ROIConstIteratorType; void Print(std::ostream & os = std::cout) const; void Read(const std::string & filename); + void SetTransformMatrix(vtkMatrix4x4* matrix); + bool IsDicomRTStruct(const std::string & filename); void Write(const std::string & filename); clitk::DicomRT_ROI * GetROIFromROINumber(int n); - std::map & GetROIs() { return mROIs; } + clitk::DicomRT_ROI* GetROIFromROIName(const std::string& name); + //clitk::DicomRT_ROI* GetROIFromROINameRegEx(const std::string& regEx); + clitk::DicomRT_ROI* GetROIFromROINameSubstr(const std::string& s); + ROIMapContainer * GetROIsFromROINameSubstr(const std::string& s); + ROIMapContainer & GetROIs() { return mROIs; } const std::string & GetStudyID() const; const std::string & GetStudyTime() const; const std::string & GetStudyDate() const; @@ -63,7 +81,7 @@ public: int AddBinaryImageAsNewROI(vvImage * i, std::string name); -#if GDCM_MAJOR_VERSION == 2 +#if GDCM_MAJOR_VERSION >= 2 // Static static int ReadROINumber(const gdcm::Item & item); #endif @@ -76,10 +94,11 @@ protected: std::string mName; std::string mDate; std::string mTime; + vtkSmartPointer mTransformMatrix; std::map mROIs; std::map mMapOfROIName; -#if GDCM_MAJOR_VERSION == 2 +#if GDCM_MAJOR_VERSION >= 2 gdcm::Reader * mReader; gdcm::SmartPointer mROIInfoSequenceOfItems; gdcm::SmartPointer mROIContoursSequenceOfItems;