]> Creatis software - clitk.git/blob - vv/vvBinaryImageOverlayActor.h
- add future structure set manager
[clitk.git] / vv / vvBinaryImageOverlayActor.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://oncora1.lyon.fnclcc.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 #ifndef VVBINARYIMAGEOVERLAYACTOR_H
19 #define VVBINARYIMAGEOVERLAYACTOR_H
20
21 #include "clitkCommon.h"
22 #include "vvSlicer.h"
23
24 class vtkImageClip;
25 class vtkMarchingSquares;
26 class vtkActor;
27 class vvImage;
28 class vtkImageMapToRGBA;
29 class vtkImageActor;
30
31 //------------------------------------------------------------------------------
32 class vvBinaryImageOverlayActor
33 {
34   //  Q_OBJECT
35  public:
36   vvBinaryImageOverlayActor();
37   ~vvBinaryImageOverlayActor();
38
39   void setSlicer(vvSlicer * slicer);
40   void update(int slicer, int slice);
41   void hideActors();
42   void showActors();
43   void setColor(double r, double g, double b);
44   void setImage(vvImage::Pointer image);
45   void initialize();
46
47  protected:
48   vvSlicer * mSlicer;
49   int mSlice;
50   int mTSlice;
51   int mPreviousTSlice;
52   int mPreviousSlice;
53   vvImage::Pointer mImage;
54   std::vector<double> mColor;
55   double mAlpha;
56   
57   std::vector<vtkImageMapToRGBA *> mMapperList;
58   std::vector<vtkImageActor*> mImageActorList;
59
60   void ComputeExtent(int orientation, 
61                      int slice, 
62                      int * inExtent,
63                      int * outExtent);
64   void ComputeExtent(int * inExtent, 
65                      int * outExtent, 
66                      vtkImageData * image, 
67                      vtkImageData * overlay);
68   void SetDisplayExtentAndCameraPosition(int orientation, 
69                                          int slice, 
70                                          int * extent, 
71                                          vtkImageActor * actor, 
72                                          double position);
73
74 }; // end class vvBinaryImageOverlayActor
75 //------------------------------------------------------------------------------
76
77 #endif
78