]> Creatis software - clitk.git/blob - vv/vvROIActor.h
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvROIActor.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://www.centreleonberard.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18
19 #ifndef VVROIACTOR_H
20 #define VVROIACTOR_H
21
22 #include "vvBinaryImageOverlayActor.h"
23 #include "vvImageContour.h"
24 #include "clitkDicomRT_ROI.h"
25
26 #include <QObject>
27 #include <QSharedPointer>
28
29 class vvSlicerManager;
30 class vtkActor;
31
32 //------------------------------------------------------------------------------
33 class vvROIActor: public QObject {
34   Q_OBJECT
35     public:
36   vvROIActor();
37   ~vvROIActor();
38
39   void SetROI(clitk::DicomRT_ROI * r);
40   clitk::DicomRT_ROI * GetROI() { return mROI; }
41   void SetSlicerManager(vvSlicerManager * s);
42   void Update(bool force=false);
43   void Initialize(double d=1.0, bool IsVisible=true);
44   void SetVisible(bool b);
45   void SetContourVisible(bool b);
46   bool IsVisible();
47   bool IsContourVisible();
48   void SetOpacity(double x);
49   double GetOpacity();
50   void SetSelected(bool b);
51   void SetContourWidth(int n);
52   int GetContourWidth() { return mContourWidth; }
53   void SetContourColor(double r, double v, double b);
54   std::vector<double> & GetContourColor();  
55   void SetOverlayColor(double r, double v, double b);
56   std::vector<double> & GetOverlayColor();
57   void SetBGMode(bool b) { m_modeBG = b; }
58   void SetDepth(double d);
59   double GetDepth() { return mDepth; }
60   void CopyParameters(QSharedPointer<vvROIActor> roi);
61   void RemoveActors();
62
63 public slots:
64   void UpdateSlice(int slicer, int slices, int force=0);
65   void UpdateColor();
66   void UpdateImage();
67
68  protected:
69   clitk::DicomRT_ROI::Pointer mROI;
70   vvSlicerManager * mSlicerManager;
71   std::vector<vvImageContour::Pointer> mImageContour;
72   std::vector< vvBinaryImageOverlayActor::Pointer > mOverlayActors;
73
74   bool mIsVisible;
75   bool mIsContourVisible;
76   double mOpacity;
77   bool mIsSelected;
78   int mContourWidth;
79   std::vector<double> mContourColor;
80   bool m_modeBG;
81   double mDepth;
82
83 }; // end class vvROIActor
84 //------------------------------------------------------------------------------
85
86 #endif
87