]> Creatis software - clitk.git/blobdiff - common/clitkDicomRT_StructureSet.h
Remove transparency for screenshot
[clitk.git] / common / clitkDicomRT_StructureSet.h
index 5761e14dc28e167bf13ae0d3e92b68c5b448cc12..dff4d75276aa3196dca59941661007f7da497733 100644 (file)
 #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 <vtkGDCMPolyDataReader.h>
+#include <vtkRTStructSetProperties.h>
+#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,16 +55,22 @@ public:
   typedef itk::SmartPointer<Self> Pointer;
   itkNewMacro(Self);
 
-  typedef std::map<int, clitk::DicomRT_ROI::Pointer>::iterator ROIIteratorType;
-  typedef std::map<int, clitk::DicomRT_ROI::Pointer>::const_iterator ROIConstIteratorType;
+  typedef std::map<int, clitk::DicomRT_ROI::Pointer> 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<int, clitk::DicomRT_ROI::Pointer> & 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;
@@ -64,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
@@ -77,10 +94,11 @@ protected:
   std::string mName;
   std::string mDate;
   std::string mTime;
+  vtkSmartPointer<vtkMatrix4x4> mTransformMatrix;
 
   std::map<int, clitk::DicomRT_ROI::Pointer> mROIs;
   std::map<int, std::string> mMapOfROIName;
-#if GDCM_MAJOR_VERSION == 2
+#if GDCM_MAJOR_VERSION >= 2
   gdcm::Reader * mReader;
   gdcm::SmartPointer<gdcm::SequenceOfItems> mROIInfoSequenceOfItems;
   gdcm::SmartPointer<gdcm::SequenceOfItems> mROIContoursSequenceOfItems;