]> Creatis software - clitk.git/blob - vv/vvROIActor.h
Merge branch 'master' of /home/romulo/creatis/clitk3-git-shared/clitk3
[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();
41   void Initialize(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
55 public slots:
56   void UpdateSlice(int slicer, int slices);
57   void UpdateColor();
58   void UpdateImage();
59
60  protected:
61   clitk::DicomRT_ROI::Pointer mROI;
62   vvSlicerManager * mSlicerManager;
63   std::vector<vvImageContour::Pointer> mImageContour;
64   std::vector< vvBinaryImageOverlayActor::Pointer > mOverlayActors;
65   
66   bool mIsVisible;
67   bool mIsContourVisible;
68   double mOpacity;
69   bool mIsSelected;
70   int mContourWidth;
71   std::vector<double> mContourColor;
72   bool m_modeBG;
73
74 }; // end class vvROIActor
75 //------------------------------------------------------------------------------
76
77 #endif
78