]> Creatis software - creaMaracasVisu.git/blob - lib/Kernel/VTKObjects/ViewerWidgets/imageplanewidget.h
changes in qt for volume rendering with gpu support, if you are working with volume...
[creaMaracasVisu.git] / lib / Kernel / VTKObjects / ViewerWidgets / imageplanewidget.h
1 #ifndef IMAGEPLANEWIDGET_H
2 #define IMAGEPLANEWIDGET_H
3
4
5 #include "vtkRenderWindow.h"
6 #include "vtkRendererCollection.h"
7 #include "vtkImagePlaneWidget.h"
8 #include "vtkImageData.h"
9 #include "vtkColorTransferFunction.h"
10 #include "vtkImageViewer2.h"
11 #include "vtkSmartPointer.h"
12
13 class ImagePlaneWidget
14 {
15 public:
16     ImagePlaneWidget();
17
18     virtual void setImage(vtkImageData* img);
19
20     virtual void SetLookupTable(vtkLookupTable *lookuptable);
21
22     virtual void SetColorTable(vtkColorTransferFunction *lookuptable);
23
24     virtual void showPlanes(bool show);    
25
26     virtual bool showImageActors(bool show);
27
28     void setSliceXImageActor(int value);
29     void setSliceYImageActor(int value);
30     void setSliceZImageActor(int value);
31 protected:
32
33     vtkImageData* _img;
34     vtkImagePlaneWidget* _xwidget;
35     vtkImagePlaneWidget* _ywidget;
36     vtkImagePlaneWidget* _zwidget;
37     vtkImageActor * _imageactorx;
38     vtkImageActor* _imageactory;
39     vtkImageActor* _imageactorz;
40
41     int xslice;
42     int yslice;
43     int zslice;
44
45     void initialize(vtkRenderWindowInteractor* interactor);
46
47     void initializeImageActors();
48
49 private:
50     void invariant();
51
52     vtkRenderWindowInteractor* m_Interactor;
53
54 };
55
56 #endif // IMAGEPLANEWIDGET_H