]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxSegmentationFM3DWidget.h
6e631ff66f7e31159109ac3c034c9bff156c1756
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / include / wxSegmentationFM3DWidget.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: wxSegmentationFM3DWidget.h,v $
5   Language:  C++
6   Date:      $Date: 2009/05/14 13:54:57 $
7   Version:   $Revision: 1.1 $
8
9   Copyright: (c) 2002, 2003
10   License:
11   
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notice for more information.
15
16 =========================================================================*/
17
18 #ifndef __WX__SEGMENTATION__FM3D__HXX__
19 #define __WX__SEGMENTATION__FM3D__HXX__
20
21 /*
22 #include <vector>
23
24 #include <vtkObjectBase.h>
25 #include <vtkCommand.h>
26 #include <vtkActor.h>
27 #include <vtkPoints.h>
28 #include <vtkPolyData.h>
29 #include <vtkPolyDataMapper.h>
30 #include <vtkProbeFilter.h>
31 #include <vtkPlaneSource.h> 
32 #include <vtkImageChangeInformation.h>
33 #include <vtkStructuredPoints.h> 
34 #include <vtkTransform.h> 
35 #include <vtkImageViewer2.h> 
36 #include <vtkBoxWidget.h>
37 */
38              
39 /*
40 #include "kernel/marInterface.h"
41
42 #include "wxMPRBaseData.h"
43 #include "wxVtkBaseView.h"
44 */
45
46
47 #include <wx/notebook.h>
48
49 #include "vtkImageGaussianSmooth.h"
50 #include "vtkSmoothPolyDataFilter.h"
51
52 #include "wxMPRWidget.h"
53 #include "../manualContour.h"
54
55 #include "itkFM3D.h"
56
57
58 //------------------------------------------------------------------
59 //------------------------------------------------------------------
60 //------------------------------------------------------------------
61
62
63 class wxSegmentationFM3DWidget : public wxPanel
64 {
65 public:
66     wxSegmentationFM3DWidget(wxWindow* parent,marImageData *marimageData,double voxelSize);
67         ~wxSegmentationFM3DWidget( );
68
69         void ConfigureVTK();
70
71         void RefreshView();
72         void OnRefreshView(wxCommandEvent & event);
73
74
75         vtkMPRBaseData          *GetVtkMPRBaseData();
76         vtkPlane2DView          *GetVtkPlane2DView();
77
78
79
80 private:
81         double                                                          _voxelSize;
82         marImageData                                            *_marimageData; 
83         wxMPRWidget2                                            *_MPRWidget2;
84
85         //
86         wxVtk3DBaseView                                         *_wxvtk3Dbaseview_Clipping3D_C;
87         wxVtkMPR3DView                                          *_wxvtkmpr3Dview_C;
88         wxVtkClipping3DView                                     *_wxvtkclipping3Dview_C;
89
90         wxPanel         *Create3DViewContour( wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
91         void            ConfigureContour();
92
93         //DCH: CONTROLES INTERFAZ GRAFICA
94
95         wxSlider* slAlpha;
96         wxSlider* slBeta;
97         wxButton* btnSegment;
98         wxButton* btnUndo;
99         wxSlider* slVolumeOpacity;
100         wxSlider* slSigmaLevel;
101         wxSlider* slLaplacianConvergence;
102         wxSlider* slLaplacianIterations;
103
104
105         void OnChangeAlpha(wxScrollEvent& event);
106         void OnChangeBeta(wxScrollEvent& event);
107         void OnBtnSegment(wxCommandEvent& event);
108         void OnBtnUndo(wxCommandEvent& event);
109         void OnChangeOpacity(wxScrollEvent& event);
110         void OnChangeSigmaLevel(wxScrollEvent& event);
111         void OnChangeLaplacianConvergence(wxScrollEvent& event);
112         void OnChangeLaplacianIteration(wxScrollEvent& event);
113
114
115         // DHC: MODELO
116         itkFM3D* filtroSegmentacion;
117         double alphaValue;
118         double betaValue;
119         double opacityValue;
120         double sigmaValue;
121         float convergenceValue;
122         int        iterationsValue;
123
124         // DHC: RENDERIZACION VTK
125         vtkImageGaussianSmooth*         f_gauss;
126         vtkMarchingCubes*                       f_cubes;
127         vtkSmoothPolyDataFilter*        f_laplace;
128         vtkPolyDataMapper*                      f_mapper;
129         vtkActor*                                       f_actor;
130
131
132
133         DECLARE_EVENT_TABLE( );
134
135
136
137 };
138
139
140
141
142 #endif // __WX__SEGMENTATION__FM3D__HXX__ 
143
144 // EOF - wxSegmentationFM3DWidget.h