1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
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
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.
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
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 # ------------------------------------------------------------------------ */
26 #ifndef __WX__PROCESSING__CT__WIDGET__
27 #define __WX__PROCESSING__CT__WIDGET__
32 #include <vtkMarchingCubes.h>
33 #include <vtkPolyDataMapper.h>
34 #include <vtkImageThreshold.h>
35 #include <vtkImageData.h>
36 #include <vtkImageSeedConnectivity.h>
41 #include "wxMPRWidget.h"
42 #include "wxVTKRenderWindowInteractor.h"
43 #include <kernel/axisExtractor02.h>
45 #include <kernel/marInterfaceCT.h>
46 #include <kernel/marAxis.h>
52 //------------------------------------------------------------------
53 //------------------------------------------------------------------
54 //------------------------------------------------------------------
56 class wxProcessingCTWidget: public wxPanel{
58 wxProcessingCTWidget(wxWindow *parent, marInterfaceCT *mar);
59 ~wxProcessingCTWidget();
60 void ConfigureVTK(marImageData *marimagedata, int x, int y, int z);
62 void OnLowThreshold(wxScrollEvent& event); // Umbral inferior
63 void OnMidThreshold(wxScrollEvent& event); // Umbral medio
68 // void OnHighThreshold(wxScrollEvent& event); // Umbral alto
69 void OnZSlice(wxScrollEvent& event); // Z Slice
70 void OnExtract(wxCommandEvent& event);
71 void OnRefreshView(wxCommandEvent & event);
73 void SetThreshold(int min ,int max);
74 void GetThreshold(int *min ,int *max);
76 void OnSpinLowThresholdSpin1(wxScrollEvent& event);
77 void OnSpinLowThresholdSpin2(wxScrollEvent& event);
85 vtkMarchingCubes *_mCubes;
86 vtkPolyDataMapper *_surfMapper;
91 // New vtk - thresholding
93 vtkImageThreshold *_thresh; //Lower - Upper
94 vtkImageThreshold *_thresh2; //Lower - Medium
97 vtkImageSeedConnectivity *_connect;
98 vtkImageSeedConnectivity *_connect2;
104 wxSlider *_lowthreshold;
105 wxSlider *_midthreshold;
107 wxSlider *_lowthresholdSpin1;
108 wxSlider *_lowthresholdSpin2;
112 //wxSlider *_highthreshold;
114 wxVtk2DBaseView *_imageviewer2D_1;
115 wxVtk2DBaseView *_imageviewer2D_2;
116 wxVtk2DBaseView *_imageviewer2D_3;
120 vtkBaseData *_vtkbasedata_1;
121 vtkBaseData *_vtkbasedata_2;
122 vtkBaseData *_vtkbasedata_3;
124 wxPanel *CreateControlPanel(wxWindow *parent);
125 wxPanel *CreateViewPanel(wxWindow *parent);
130 DECLARE_EVENT_TABLE( );
135 #endif // __WX__PROCESSING__CT__WIDGET__