]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.h
New classes due to separation of vtkMPR*.cxx and some modifications to othar classes
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkPlane2DView.h
1 #ifndef VTKPLANE2DVIEW_H_
2 #define VTKPLANE2DVIEW_H_
3
4 #include "vtkInteractorStylePlane2D.h"
5 #include "vtkInfoTextImageInteractorPlane2D.h"
6 #include "vtkInfoTextImage.h"
7
8 #include "wxVtk2DBaseView.h"
9
10 #include "vtkTransform.h"
11 #include "vtkImageChangeInformation.h"
12 #include "vtkStructuredPoints.h"
13 #include "vtkPlaneSource.h"
14 #include "vtkProbeFilter.h"
15 #include "vtkPolyDataMapper.h"
16
17 class vtkPlane2DView : public wxVtk2DBaseView
18 {
19 public:
20         vtkPlane2DView(wxWindow *parent);
21         ~vtkPlane2DView();
22         void                    Configure();
23         void                    ExtractPlane();
24         int                             GetImgSize();
25         void                    SetImgSize( int imgSize );
26
27         void                    RotationStart();
28         void                    RotationDrag(double vx, double vy,  bool ok_v, bool ok_ang);
29
30         virtual int             GetActualSlice(); 
31         virtual void    SetActualSlice(int slice);
32
33         virtual void    Refresh( );
34
35         vtkMPRBaseData                          *GetVtkmprbasedata();
36         vtkInteractorStylePlane2D       *GetInteractorstyleplane2D();
37
38         void                    SetActive(bool active);
39         void                    SetVisibleLine(bool ok);
40
41         void                    TransfromeCoordViewWorld2(double &X, double &Y, double &Z);
42
43         int                             GetMipWidth();
44         void                    SetMipWidth(int value);
45         bool                    GetMipVisualization();
46         void                    SetMipVisualization(bool ok);
47
48         void                    ResetBack();
49
50 private:
51         bool                    _active;
52         int                             _mip_width;
53         bool                    _mip_visualization;
54
55         double                  _backX;
56         double                  _backY;
57         double                  _backZ;
58         double                  _backOrient[4];
59
60         double                  _ang;
61         double                  _vxb;
62         double                  _vyb;
63         double                  _n[3];   // Normal
64
65         double                  _cx;
66         double                  _cy;
67         double                  _cz;
68
69         int                             _sizeIma;
70
71         vtkImageData *  _imageResult;
72
73         // Horizontal line
74         vtkPoints                                                       *_pts;
75         vtkActor                                                        *_lineActor;
76         vtkPolyDataMapper                                       *_lineMapper;
77     vtkPolyData                                                 *_pd;
78
79     vtkProbeFilter                                              *_3Dslices;
80         vtkPlaneSource                                          *_pSource;
81         vtkStructuredPoints                                     *_stPoints;
82     vtkImageChangeInformation                   *_change;
83         vtkTransform                                            *_transform1; 
84         vtkTransform                                            *_transform2; 
85
86         vtkInteractorStylePlane2D                       *_interactorstyleplane2D;
87
88         vtkInfoTextImage                                        *_vtkInfoTextImage;
89         vtkInfoTextImageInteractorPlane2D       *_vtkInfoTextImageInteractorPlane2D;
90
91
92         void SetPSource(int sizeIma);
93         void HorizontalLine();
94         void ResetPlane();
95         void Extract_One_PlaneVTK();
96         void Extract_MIP_PlaneVTK();
97
98 protected:
99 };
100
101 #endif /*VTKPLANE2DVIEW_H_*/