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