]> Creatis software - clitk.git/blob - common/clitkDicomRT_ROI.h
- remove comments and add reload capabilities
[clitk.git] / common / clitkDicomRT_ROI.h
1 /*=========================================================================
2   Program:         vv http://www.creatis.insa-lyon.fr/rio/vv
3   Main authors :   XX XX XX
4
5   Authors belongs to: 
6   - University of LYON           http://www.universite-lyon.fr/
7   - Léon Bérard cancer center    http://oncora1.lyon.fnclcc.fr
8   - CREATIS CNRS laboratory      http://www.creatis.insa-lyon.fr
9
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.
13
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
17
18   =========================================================================*/
19
20 #ifndef CLITKDICOMRT_ROI_H
21 #define CLITKDICOMRT_ROI_H
22
23 #include "clitkDicomRT_Contour.h"
24 #include "vvImage.h"
25
26 namespace clitk {
27
28   //--------------------------------------------------------------------
29   class DicomRT_ROI {
30     
31   public:
32     DicomRT_ROI();
33     ~DicomRT_ROI();
34
35     void Print(std::ostream & os = std::cout) const;
36     void Read(std::map<int, std::string> & rois, gdcm::SQItem * item);
37     void SetFromBinaryImage(vvImage::Pointer image, int n, 
38                             std::string name, 
39                             std::vector<double> color, 
40                             std::string filename);
41
42     int GetROINumber() const;
43     const std::string & GetName() const;
44     const std::string & GetFilename() const;
45     const std::vector<double> & GetDisplayColor() const;
46     vtkPolyData * GetMesh();
47     const vvImage::Pointer GetImage() const;
48
49     void SetDisplayColor(double r, double v, double b);
50     std::vector<double> & GetDisplayColor() { return mColor; }
51     
52     double GetBackgroundValueLabelImage() const;
53     void SetBackgroundValueLabelImage(double bg);
54     
55     void SetImage(vvImage * im);
56     
57   protected:
58     void ComputeMesh();
59     std::string mName;
60     std::string mFilename;
61     int mNumber;
62     std::vector<double> mColor;
63     std::vector<DicomRT_Contour*> mListOfContours;
64     vtkPolyData * mMesh;
65     bool mMeshIsUpToDate;
66     vvImage::Pointer mImage;
67     double mBackgroundValue;
68   };
69   //--------------------------------------------------------------------
70
71 } // end namespace clitk
72 #endif // CLITKDICOMRT_ROI_H
73