]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxProcessingCTWidget.h
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / include / wxProcessingCTWidget.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 #ifndef __WX__PROCESSING__CT__WIDGET__
27 #define __WX__PROCESSING__CT__WIDGET__
28
29
30
31 #include <vtkActor.h>
32 #include <vtkMarchingCubes.h>   
33 #include <vtkPolyDataMapper.h>
34 #include <vtkImageThreshold.h>
35 #include <vtkImageData.h>
36 #include <vtkImageSeedConnectivity.h>
37
38
39
40
41 #include "wxMPRWidget.h"
42 #include "wxVTKRenderWindowInteractor.h"
43 #include <kernel/axisExtractor02.h>
44
45 #include <kernel/marInterfaceCT.h>
46 #include <kernel/marAxis.h>
47
48
49 #include <wx/wx.h>
50 #include <wx/panel.h>
51
52 //------------------------------------------------------------------
53 //------------------------------------------------------------------
54 //------------------------------------------------------------------
55
56 class wxProcessingCTWidget: public wxPanel{
57 public:
58         wxProcessingCTWidget(wxWindow *parent, marInterfaceCT *mar);
59         ~wxProcessingCTWidget();
60         void ConfigureVTK(marImageData *marimagedata, int x, int y, int z);
61         void Refresh();
62         void OnLowThreshold(wxScrollEvent& event); // Umbral inferior
63         void OnMidThreshold(wxScrollEvent& event); // Umbral medio
64         void LowThreshold();
65         void MidThreshold();
66
67 // MAZV 27 sep 2006
68 //      void OnHighThreshold(wxScrollEvent& event); // Umbral alto
69         void OnZSlice(wxScrollEvent& event); // Z Slice
70         void OnExtract(wxCommandEvent& event);
71         void OnRefreshView(wxCommandEvent & event);
72
73         void SetThreshold(int min       ,int max);
74         void GetThreshold(int *min      ,int *max);
75
76         void OnSpinLowThresholdSpin1(wxScrollEvent& event);
77         void OnSpinLowThresholdSpin2(wxScrollEvent& event);
78
79
80
81 private:
82         wxWindow                                        *_parent;
83
84         // Original Volume
85         vtkMarchingCubes        *_mCubes;
86         vtkPolyDataMapper       *_surfMapper;
87         vtkActor                        *_surfActor;
88
89         marInterfaceCT          *_mar;
90
91         // New vtk - thresholding
92         
93         vtkImageThreshold                       *_thresh;  //Lower - Upper
94         vtkImageThreshold                       *_thresh2; //Lower - Medium
95
96         
97         vtkImageSeedConnectivity        *_connect;
98         vtkImageSeedConnectivity        *_connect2;
99         vtkImageCast                            *cast3;
100         vtkImageCast                            *cast4;
101         vtkImageData                            *data;
102         
103
104         wxSlider                                        *_lowthreshold;
105         wxSlider                                        *_midthreshold;
106
107         wxSlider                                        *_lowthresholdSpin1;
108         wxSlider                                        *_lowthresholdSpin2;
109
110
111 // MAZV 27 sep 2006
112 //wxSlider                                              *_highthreshold;
113         wxSlider                                        *_zslice;
114         wxVtk2DBaseView                         *_imageviewer2D_1;
115         wxVtk2DBaseView                         *_imageviewer2D_2;
116         wxVtk2DBaseView                         *_imageviewer2D_3;
117
118         wxButton                                        *_extract;
119
120         vtkBaseData                                     *_vtkbasedata_1;
121         vtkBaseData                                     *_vtkbasedata_2;
122         vtkBaseData                                     *_vtkbasedata_3;
123
124         wxPanel                                         *CreateControlPanel(wxWindow *parent);
125         wxPanel                                         *CreateViewPanel(wxWindow *parent);
126
127         int                     _x, _y, _z;
128     double              _range[2];
129
130         DECLARE_EVENT_TABLE( );
131
132
133 };
134
135 #endif // __WX__PROCESSING__CT__WIDGET__
136
137
138
139