]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxProcessingCTWidget.h
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / include / wxProcessingCTWidget.h
1
2
3 #ifndef __WX__PROCESSING__CT__WIDGET__
4 #define __WX__PROCESSING__CT__WIDGET__
5
6
7
8 #include <vtkActor.h>
9 #include <vtkMarchingCubes.h>   
10 #include <vtkPolyDataMapper.h>
11 #include <vtkImageThreshold.h>
12 #include <vtkImageData.h>
13 #include <vtkImageSeedConnectivity.h>
14
15
16
17
18 #include "wxMPRWidget.h"
19 #include "wxVTKRenderWindowInteractor.h"
20 #include <kernel/axisExtractor02.h>
21
22 #include <kernel/marInterfaceCT.h>
23 #include <kernel/marAxis.h>
24
25
26 #include <wx/wx.h>
27 #include <wx/panel.h>
28
29 //------------------------------------------------------------------
30 //------------------------------------------------------------------
31 //------------------------------------------------------------------
32
33 class wxProcessingCTWidget: public wxPanel{
34 public:
35         wxProcessingCTWidget(wxWindow *parent, marInterfaceCT *mar);
36         ~wxProcessingCTWidget();
37         void ConfigureVTK(marImageData *marimagedata, int x, int y, int z);
38         void Refresh();
39         void OnLowThreshold(wxScrollEvent& event); // Umbral inferior
40         void OnMidThreshold(wxScrollEvent& event); // Umbral medio
41         void LowThreshold();
42         void MidThreshold();
43
44 // MAZV 27 sep 2006
45 //      void OnHighThreshold(wxScrollEvent& event); // Umbral alto
46         void OnZSlice(wxScrollEvent& event); // Z Slice
47         void OnExtract(wxCommandEvent& event);
48         void OnRefreshView(wxCommandEvent & event);
49
50         void SetThreshold(int min       ,int max);
51         void GetThreshold(int *min      ,int *max);
52
53         void OnSpinLowThresholdSpin1(wxScrollEvent& event);
54         void OnSpinLowThresholdSpin2(wxScrollEvent& event);
55
56
57
58 private:
59         wxWindow                                        *_parent;
60
61         // Original Volume
62         vtkMarchingCubes        *_mCubes;
63         vtkPolyDataMapper       *_surfMapper;
64         vtkActor                        *_surfActor;
65
66         marInterfaceCT          *_mar;
67
68         // New vtk - thresholding
69         
70         vtkImageThreshold                       *_thresh;  //Lower - Upper
71         vtkImageThreshold                       *_thresh2; //Lower - Medium
72
73         
74         vtkImageSeedConnectivity        *_connect;
75         vtkImageSeedConnectivity        *_connect2;
76         vtkImageCast                            *cast3;
77         vtkImageCast                            *cast4;
78         vtkImageData                            *data;
79         
80
81         wxSlider                                        *_lowthreshold;
82         wxSlider                                        *_midthreshold;
83
84         wxSlider                                        *_lowthresholdSpin1;
85         wxSlider                                        *_lowthresholdSpin2;
86
87
88 // MAZV 27 sep 2006
89 //wxSlider                                              *_highthreshold;
90         wxSlider                                        *_zslice;
91         wxVtk2DBaseView                         *_imageviewer2D_1;
92         wxVtk2DBaseView                         *_imageviewer2D_2;
93         wxVtk2DBaseView                         *_imageviewer2D_3;
94
95         wxButton                                        *_extract;
96
97         vtkBaseData                                     *_vtkbasedata_1;
98         vtkBaseData                                     *_vtkbasedata_2;
99         vtkBaseData                                     *_vtkbasedata_3;
100
101         wxPanel                                         *CreateControlPanel(wxWindow *parent);
102         wxPanel                                         *CreateViewPanel(wxWindow *parent);
103
104         int                     _x, _y, _z;
105     double              _range[2];
106
107         DECLARE_EVENT_TABLE( );
108
109
110 };
111
112 #endif // __WX__PROCESSING__CT__WIDGET__
113
114
115
116