]> Creatis software - clitk.git/blob - vv/vvROIActor.h
Merge branch 'master' of /home/dsarrut/clitk3.server
[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 #include <QObject>
26
27 class vvSlicerManager;
28 class vtkActor;
29
30 //------------------------------------------------------------------------------
31 class vvROIActor: public QObject {
32   Q_OBJECT
33     public:
34   vvROIActor();
35   ~vvROIActor();
36
37   void SetROI(clitk::DicomRT_ROI * r);
38   clitk::DicomRT_ROI * GetROI() { return mROI; }
39   void SetSlicerManager(vvSlicerManager * s);
40   void Update(bool force=false);
41   void Initialize(double d=1.0, bool IsVisible=true);
42   void SetVisible(bool b);
43   void SetContourVisible(bool b);
44   bool IsVisible();
45   bool IsContourVisible();
46   void SetOpacity(double x);
47   double GetOpacity();
48   void SetSelected(bool b);
49   void SetContourWidth(int n);
50   int GetContourWidth() { return mContourWidth; }
51   void SetContourColor(double r, double v, double b);
52   std::vector<double> & GetContourColor();
53   void SetBGMode(bool b) { m_modeBG = b; }
54   void SetDepth(double d);
55   double GetDepth() { return mDepth; }
56
57 public slots:
58   void UpdateSlice(int slicer, int slices, bool force=false);
59   void UpdateColor();
60   void UpdateImage();
61
62  protected:
63   clitk::DicomRT_ROI::Pointer mROI;
64   vvSlicerManager * mSlicerManager;
65   std::vector<vvImageContour::Pointer> mImageContour;
66   std::vector< vvBinaryImageOverlayActor::Pointer > mOverlayActors;
67   
68   bool mIsVisible;
69   bool mIsContourVisible;
70   double mOpacity;
71   bool mIsSelected;
72   int mContourWidth;
73   std::vector<double> mContourColor;
74   bool m_modeBG;
75   double mDepth;
76
77 }; // end class vvROIActor
78 //------------------------------------------------------------------------------
79
80 #endif
81