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_ROI_H
21 #define CLITKDICOMRT_ROI_H
23 #include "clitkDicomRT_Contour.h"
28 //--------------------------------------------------------------------
29 class DicomRT_ROI : public itk::LightObject
33 typedef DicomRT_ROI Self;
34 typedef itk::SmartPointer<Self> Pointer;
37 void Print(std::ostream & os = std::cout) const;
38 #if GDCM_MAJOR_VERSION == 2
39 void Read(std::map<int, std::string> & rois, gdcm::Item const & item);
41 void Read(std::map<int, std::string> & rois, gdcm::SQItem * item);
43 void SetFromBinaryImage(vvImage * image, int n,
45 std::vector<double> color,
46 std::string filename);
48 int GetROINumber() const;
49 const std::string & GetName() const;
50 const std::string & GetFilename() const;
51 const std::vector<double> & GetDisplayColor() const;
52 vtkPolyData * GetMesh();
53 vvImage * GetImage() const;
55 void SetDisplayColor(double r, double v, double b);
56 std::vector<double> & GetDisplayColor() { return mColor; }
58 double GetBackgroundValueLabelImage() const;
59 void SetBackgroundValueLabelImage(double bg);
61 double GetForegroundValueLabelImage() const;
62 void SetForegroundValueLabelImage(double bg);
64 void SetImage(vvImage * im);
65 DicomRT_Contour* GetContour(int n);
67 // double GetContourSpacing() const {return mZDelta;}
72 std::string mFilename;
74 std::vector<double> mColor;
75 std::vector<DicomRT_Contour::Pointer> mListOfContours;
76 vtkSmartPointer<vtkPolyData> mMesh;
78 vvImage::Pointer mImage;
79 double mBackgroundValue;
80 double mForegroundValue;
81 ///Spacing between two contours
88 //--------------------------------------------------------------------
90 } // end namespace clitk
91 #endif // CLITKDICOMRT_ROI_H