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 /*=========================================================================
29 Module: $RCSfile: wxQuantificationWidget.cxx,v $
31 Date: $Date: 2012/11/15 14:15:18 $
32 Version: $Revision: 1.2 $
34 Copyright: (c) 2002, 2003
37 This software is distributed WITHOUT ANY WARRANTY; without even
38 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
39 PURPOSE. See the above copyright notice for more information.
41 =========================================================================*/
43 #include "wxQuantificationWidget.h"
44 #include "../marDictionary.h"
45 //#include "../wxMaracasMPR.h"
49 //#include <wx/notebook.h>
53 //------------------------------------------------------------------------
54 //------------------------------------------------------------------------
55 //------------------------------------------------------------------------
56 BEGIN_EVENT_TABLE( wxQuantificationWidget, wxPanel )
57 EVT_BUTTON(ID_BUTTON_CONTOUR , wxQuantificationWidget::OnContour_BT )
58 EVT_BUTTON(ID_BUTTON_CLEAN , wxQuantificationWidget::OnClean_BT )
59 EVT_BUTTON(ID_BUTTON_CLEAN_ALL , wxQuantificationWidget::OnCleanAll_BT )
60 EVT_BUTTON(ID_BUTTON_SAVE_CONTOURS3D, wxQuantificationWidget::OnSaveContours3D_BT )
62 // EVT_BUTTON(ID_BUTTON_HEALTHY, wxQuantificationWidget::OnHealthySlice_BT )
64 // PS -> EVT_BUTTON(ID_BUTTON_CALCULATED, wxQuantificationWidget::OnCalculated_BT )
65 // PS -> EVT_BUTTON(ID_BUTTON_PAUSE, wxQuantificationWidget::OnPause_BT )
66 // PS -> EVT_BUTTON(ID_BUTTON_DELETE, wxQuantificationWidget::OnDelete_BT )
67 // PS -> EVT_BUTTON(ID_BUTTON_POINT, wxQuantificationWidget::OnSetPoint_BT )
69 EVT_CHECKBOX(ID_CHECKBOX_HEALTHY, wxQuantificationWidget::OnHealthySlice_CB )
70 EVT_CHECKBOX(ID_CHECKBOX_SHOW_SURFACE, wxQuantificationWidget::OnShowSurface_CB )
71 EVT_CHECKBOX(ID_CHECKBOX_VISIBLE_RINGS, wxQuantificationWidget::OnVisibleRing_CB )
72 EVT_CHECKBOX(ID_CHECKBOX_PERPENDICULAR, wxQuantificationWidget::OnPerpendicular_CB )
74 EVT_RADIOBUTTON(ID_RADIOBUTTON_GREYSCALE, wxQuantificationWidget::OnGreyScale_RB )
75 EVT_RADIOBUTTON(ID_RADIOBUTTON_COLOR, wxQuantificationWidget::OnColor_RB )
77 EVT_COMMAND_SCROLL(ID_SLIDER_SLICE, wxQuantificationWidget::OnSliderSliceScroll )
79 EVT_COMMAND_SCROLL(ID_SLIDER_OPACITY, wxQuantificationWidget::OnSliderOpacityScroll )
80 EVT_COMMAND_SCROLL_THUMBRELEASE(ID_SLIDER_ISOVALUE, wxQuantificationWidget::OnSliderIsovalueScroll )
84 //--------------------------------------------------------------------------------
86 //--------------------------------------------------------------------------------
87 wxQuantificationWidget::wxQuantificationWidget(wxWindow* parent, wxWindowID id,
88 const wxPoint& pos, const wxSize& size, long style,
90 : wxQuantificationWidget_base( parent, id, pos, size, style, name )
92 panel_splitter = new wxSplitterWindow( this , -1, wxDefaultPosition, wxSize(400,400 ), wxSP_3D | wxSP_LIVE_UPDATE | wxCLIP_CHILDREN );
93 // panel_left = new wxPanel(panel_splitter , -1, wxDefaultPosition, wxSize(400,400));
94 panel_right = new wxPanel(panel_splitter , -1, wxDefaultPosition, wxSize(400,400));
96 panel_splitter_left = new wxSplitterWindow( panel_splitter , -1, wxDefaultPosition, wxSize(400,400 ), wxSP_3D | wxSP_LIVE_UPDATE | wxCLIP_CHILDREN );
97 panel_left_up = new wxPanel(panel_splitter_left , -1, wxDefaultPosition, wxSize(200,200));
98 panel_left_down = new wxPanel(panel_splitter_left , -1, wxDefaultPosition, wxSize(200,200));
101 panel_splitter_right = new wxSplitterWindow( panel_right , -1, wxDefaultPosition, wxSize(400,400 ), wxSP_3D | wxSP_LIVE_UPDATE | wxCLIP_CHILDREN );
102 panel_right_up = new wxPanel(panel_splitter_right , -1, wxDefaultPosition, wxSize(200,200));
103 panel_right_down = new wxPanel(panel_splitter_right , -1, wxDefaultPosition, wxSize(200,200));
109 SetSizeHealthyRegion( 5 );
112 // this->SetBackgroundColour(*wxLIGHT_GREY);
114 _3DWorld = new vtk3DQuantSurfaceWidget( panel_left_up, ID_QUANTIF3D );
115 _3DWorld->SetInterfaceVtkPanelWidgets(this);
117 _2DWorld = new vtk2DQuantSliceWidget( panel_right_up, -1 );
118 _2DWorld->SetSize(800,800);
119 _2DWorld->SetInterfaceVtkPanelWidgets(this);
130 //startTimeRI = clock();
135 //--------------------------------------------------------------------------------
137 // ----------------------------------------------------------------------------
138 wxQuantificationWidget::~wxQuantificationWidget( )
144 // ----------------------------------------------------------------------------
145 wxPanel* wxQuantificationWidget::CreateStenosisPanel(){
146 marDictionary marDict;
148 wxPanel* panel = new wxPanel(panel_right_down);
150 _st_Label100 = new wxStaticText(panel, -1, wxString(marDict.GetString(255), wxConvUTF8) ); // "Stenosis (area)"
151 _st_Label101 = new wxStaticText(panel, -1, wxString(marDict.GetString(260), wxConvUTF8) ); // "Stenosis (diameter)"
152 // _st_Label102 = new wxStaticText(panel, -1, " < Area (mm^2) > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
153 // _st_Label103 = new wxStaticText(panel, -1, " < Perimeter (mm) > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
154 // _st_Label104 = new wxStaticText(panel, -1, " < Diameter (mm) from Area > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
155 // _st_Label105 = new wxStaticText(panel, -1, " < Diameter (mm) from Perimeter > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
156 // _st_Label106 = new wxStaticText(panel, -1, " < Minimum Diameter (mm) > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
157 // _st_Label107 = new wxStaticText(panel, -1, " < Maximum Diameter (mm) > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
158 // _st_Label108 = new wxStaticText(panel, -1, " < Avarege Diameter (mm) > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
160 _st_Value100 = new wxStaticText(panel, -1, _T("-- ") );
161 _st_Value101 = new wxStaticText(panel, -1, _T("-- ") );
162 // _st_Value102 = new wxStaticText(panel, -1, "--");
163 // _st_Value103 = new wxStaticText(panel, -1, "--");
164 // _st_Value104 = new wxStaticText(panel, -1, "--");
165 // _st_Value105 = new wxStaticText(panel, -1, "--");
166 // _st_Value106 = new wxStaticText(panel, -1, "--");
167 // _st_Value107 = new wxStaticText(panel, -1, "--");
168 // _st_Value108 = new wxStaticText(panel, -1, "--");
171 // wxStaticText *_st_LabelBlanc = new wxStaticText(panel, -1, " ");
172 // _st_LabelBlanc->SetBackgroundColour(*wxLIGHT_GREY);
175 // panel->SetBackgroundColour(wxColour(100,0,100));
176 // _st_Label100->SetBackgroundColour(*wxLIGHT_GREY);
177 // _st_Label101->SetBackgroundColour(*wxLIGHT_GREY);
182 // _st_Label102->SetBackgroundColour(*wxLIGHT_GREY);
183 // _st_Label103->SetBackgroundColour(*wxLIGHT_GREY);
184 // _st_Label104->SetBackgroundColour(*wxLIGHT_GREY);
185 // _st_Label105->SetBackgroundColour(*wxLIGHT_GREY);
186 // _st_Label106->SetBackgroundColour(*wxLIGHT_GREY);
187 // _st_Label107->SetBackgroundColour(*wxLIGHT_GREY);
188 // _st_Label108->SetBackgroundColour(*wxLIGHT_GREY);
192 // _st_Value100->SetBackgroundColour(*wxLIGHT_GREY);
193 // _st_Value101->SetBackgroundColour(*wxLIGHT_GREY);
196 // _st_Value102->SetBackgroundColour(*wxLIGHT_GREY);
197 // _st_Value103->SetBackgroundColour(*wxLIGHT_GREY);
198 // _st_Value104->SetBackgroundColour(*wxLIGHT_GREY);
199 // _st_Value105->SetBackgroundColour(*wxLIGHT_GREY);
200 // _st_Value106->SetBackgroundColour(*wxLIGHT_GREY);
201 // _st_Value107->SetBackgroundColour(*wxLIGHT_GREY);
202 // _st_Value108->SetBackgroundColour(*wxLIGHT_GREY);
204 wxFont font(14,wxDEFAULT ,wxNORMAL,wxBOLD);
205 // _st_Label100->SetFont(font);
206 // _st_Label101->SetFont(font);
207 _st_Value100->SetFont(font);
208 _st_Value101->SetFont(font);
212 wxGridSizer* gridSizer1 = new wxFlexGridSizer(1);
213 gridSizer1->Add( new wxStaticText(panel, -1, _T(" ")) ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
214 gridSizer1->Add(_st_Value100 ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
215 gridSizer1->Add(_st_Label100 ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
216 gridSizer1->Add( new wxStaticText(panel, -1, _T(" ")) ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
217 gridSizer1->Add(_st_Value101 ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
218 gridSizer1->Add(_st_Label101 ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
222 // gridSizer->Add(_st_LabelBlanc);
223 // gridSizer->Add(_st_LabelBlanc);
224 // gridSizer->Add(_st_LabelBlanc);
225 // gridSizer->Add(_st_LabelBlanc);
226 // gridSizer->Add(_st_Label102);
227 // gridSizer->Add(_st_Value102);
228 // gridSizer->Add(_st_LabelBlanc);
229 // gridSizer->Add(_st_LabelBlanc);
230 // gridSizer->Add(_st_Label103);
231 // gridSizer->Add(_st_Value103);
232 // gridSizer->Add(_st_LabelBlanc);
233 // gridSizer->Add(_st_LabelBlanc);
234 // gridSizer->Add(_st_Label104);
235 // gridSizer->Add(_st_Value104);
236 // gridSizer->Add(_st_LabelBlanc);
237 // gridSizer->Add(_st_LabelBlanc);
238 // gridSizer->Add(_st_Label105);
239 // gridSizer->Add(_st_Value105);
240 // gridSizer->Add(_st_LabelBlanc);
241 // gridSizer->Add(_st_LabelBlanc);
242 // gridSizer->Add(_st_Label106);
243 // gridSizer->Add(_st_Value106);
244 // gridSizer->Add(_st_LabelBlanc);
245 // gridSizer->Add(_st_LabelBlanc);
246 // gridSizer->Add(_st_Label107);
247 // gridSizer->Add(_st_Value107);
248 // gridSizer->Add(_st_LabelBlanc);
249 // gridSizer->Add(_st_LabelBlanc);
250 // gridSizer->Add(_st_Label108);
251 // gridSizer->Add(_st_Value108);
253 wxGridSizer* gridSizer = new wxFlexGridSizer(4);
254 gridSizer->Add( new wxStaticText(panel, -1, _T(" ")) ,15, wxALIGN_LEFT , 50);
255 gridSizer->Add( new wxStaticText(panel, -1, _T(" ")) ,15, wxALIGN_LEFT , 50);
256 gridSizer->Add( new wxStaticText(panel, -1, _T(" ")) ,15, wxALIGN_LEFT , 50);
257 gridSizer->Add(gridSizer1 ,15, wxALIGN_LEFT , 50);
259 panel->SetAutoLayout(true);
260 panel->SetSizer(gridSizer);
264 // panel->SetBackgroundColour(*wxLIGHT_GREY);
266 panel->SetSize(400,300);
267 panel->SetSize( gridSizer->GetMinSize() );
272 //--------------------------------------------------------
274 void wxQuantificationWidget::Set_control(){
275 marDictionary marDict;
280 //_Chart = new wxChart( this, ID_QUANTIF3D );
281 //_Chart->SetMaxWidthHeight(500,300);
282 //_Chart->SetBackgroundColour(*wxWHITE);
284 _wxStenosisPanel = CreateStenosisPanel();
287 // PS -> _bt_Point = new wxButton( this, ID_BUTTON_POINT, "Point...",
288 // PS -> wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
289 // _bt_Healthy = new wxButton( panel_left, ID_BUTTON_HEALTHY, "Healthy Slice",
290 // wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
294 // PS -> _bt_ContourCalculated = new wxButton( this, ID_BUTTON_CALCULATED, "Contour calculated",
295 // PS -> wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
296 // PS -> _bt_Pause = new wxButton( this, ID_BUTTON_PAUSE, "Pause",
297 // PS -> wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
298 // PS -> _bt_Delete = new wxButton( this, ID_BUTTON_DELETE, "Delete Quantification",
299 // PS -> wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
304 _cb_HealthySlice = new wxCheckBox( panel_left_down, ID_CHECKBOX_HEALTHY, wxString(marDict.GetString(205), wxConvUTF8)); // "Healthy slice"
305 _cb_HealthySlice->SetValue(true);
307 // _cb_HealthySlice->SetBackgroundColour(*wxLIGHT_GREY);
308 _cb_Perpendicular = new wxCheckBox( panel_left_down, ID_CHECKBOX_PERPENDICULAR, wxString(marDict.GetString(210), wxConvUTF8)); //"Perpendicular section"
309 _cb_Perpendicular->SetValue(true);
311 // _cb_Perpendicular->SetBackgroundColour(*wxLIGHT_GREY);
313 _rb_GreyScale = new wxRadioButton( panel_left_down, ID_RADIOBUTTON_GREYSCALE, wxString(marDict.GetString(230), wxConvUTF8), wxDefaultPosition,wxDefaultSize,wxRB_GROUP ); //"greyscale "
314 _rb_GreyScale->SetValue(true);
316 // _rb_GreyScale->SetBackgroundColour(*wxLIGHT_GREY);
318 _rb_Color = new wxRadioButton( panel_left_down, ID_RADIOBUTTON_COLOR, wxString(marDict.GetString(235), wxConvUTF8), wxDefaultPosition,wxDefaultSize );//"color "
319 _rb_Color->SetValue(false);
321 // _rb_Color->SetBackgroundColour(*wxLIGHT_GREY);
323 _cb_VisibleRings = new wxCheckBox( panel_left_down, ID_CHECKBOX_VISIBLE_RINGS, wxString(marDict.GetString(215), wxConvUTF8));//"Visible rings"
324 _cb_VisibleRings->SetValue(true);
326 // _cb_VisibleRings->SetBackgroundColour(*wxLIGHT_GREY);
327 _cb_ShowSurface = new wxCheckBox( panel_left_down, ID_CHECKBOX_SHOW_SURFACE, wxString(marDict.GetString(220), wxConvUTF8));//"Show Surface"
328 _cb_ShowSurface->SetValue(true);
330 // _cb_ShowSurface->SetBackgroundColour(*wxLIGHT_GREY);
333 _bt_AddContour3D = new wxButton( panel_left_down, ID_BUTTON_CONTOUR, wxString(marDict.GetString(245), wxConvUTF8) ,//"Add mark contour"
334 wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
335 _bt_CleanContour3D = new wxButton( panel_left_down, ID_BUTTON_CLEAN, wxString(marDict.GetString(250), wxConvUTF8) ,//"Erase mark contours"
336 wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
338 _bt_CleanAllContours3D = new wxButton( panel_left_down, ID_BUTTON_CLEAN_ALL, wxString(marDict.GetString(253), wxConvUTF8) ,//"Erase all mark contours"
339 wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
341 _bt_SaveContours3D = new wxButton( panel_left_down, ID_BUTTON_SAVE_CONTOURS3D, wxString(marDict.GetString(248), wxConvUTF8) ,//"Save contours 3D"
342 wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
345 _sl_Slice = new wxSlider( panel_left_down, ID_SLIDER_SLICE , 0, 0, 10000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS );
346 _sl_Isovalue = new wxSlider( panel_left_down, ID_SLIDER_ISOVALUE, 0, 0, 10000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS );
347 _sl_Opacity = new wxSlider( panel_left_down, ID_SLIDER_OPACITY , 0, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS );
349 // _sl_Slice->SetBackgroundColour(*wxLIGHT_GREY);
350 // _sl_Isovalue->SetBackgroundColour(*wxLIGHT_GREY);
351 // _sl_Opacity->SetBackgroundColour(*wxLIGHT_GREY);
354 _sl_Slice->SetSize(1800,16);
355 _sl_Isovalue->SetSize(300,16);
356 _sl_Opacity->SetSize(300,16);
359 _st_Slice = new wxStaticText(panel_left_down, -1, wxString(marDict.GetString(90), wxConvUTF8) ); //"Slice "
360 _st_Isovalue = new wxStaticText(panel_left_down, -1, wxString(marDict.GetString(240), wxConvUTF8) ); //"Isovalue"
361 _st_Opacity = new wxStaticText(panel_left_down, -1, wxString(marDict.GetString(225), wxConvUTF8) ); //"Opacity "
363 // _st_Slice->SetBackgroundColour(*wxLIGHT_GREY);
364 // _st_Isovalue->SetBackgroundColour(*wxLIGHT_GREY);
365 // _st_Opacity->SetBackgroundColour(*wxLIGHT_GREY);
368 // _st_Label0 = new wxStaticText(this, -1, "Partial Axis Lenght");
369 // _st_Value0 = new wxStaticText(this, -1, "0.00");
370 // _st_Label0->SetBackgroundColour(*wxLIGHT_GREY);
371 // _st_Value0->SetBackgroundColour(*wxLIGHT_GREY);
372 _st_Label1 = new wxStaticText(this, -1, wxString(marDict.GetString(380), wxConvUTF8) ); //"Total Axis Lenght"
373 _st_Value1 = new wxStaticText(this, -1, _T("0.00"));
376 // _st_Label1->SetBackgroundColour(*wxLIGHT_GREY);
377 // _st_Value1->SetBackgroundColour(*wxLIGHT_GREY);
379 _st_Label2 = new wxStaticText(this, -1, wxString(marDict.GetString(390), wxConvUTF8) );//"Area"
380 _st_Value2 = new wxStaticText(this, -1, _T("0.00"));
382 // _st_Label2->SetBackgroundColour(*wxLIGHT_GREY);
383 // _st_Value2->SetBackgroundColour(*wxLIGHT_GREY);
385 _st_Label3 = new wxStaticText(this, -1, wxString(marDict.GetString(400), wxConvUTF8) );//"Perimeter"
386 _st_Value3 = new wxStaticText(this, -1, _T("0.00") );
388 // _st_Label3->SetBackgroundColour(*wxLIGHT_GREY);
389 // _st_Value3->SetBackgroundColour(*wxLIGHT_GREY);
392 // _st_Label4 = new wxStaticText(this, -1, "Diameter from area");
393 // _st_Value4 = new wxStaticText(this, -1, "0.00");
394 // _st_Label4->SetBackgroundColour(*wxLIGHT_GREY);
395 // _st_Value4->SetBackgroundColour(*wxLIGHT_GREY);
396 // _st_Label5 = new wxStaticText(this, -1, "Diameter from perimeter");
397 // _st_Value5 = new wxStaticText(this, -1, "0.00");
398 // _st_Label5->SetBackgroundColour(*wxLIGHT_GREY);
399 // _st_Value5->SetBackgroundColour(*wxLIGHT_GREY);
400 _st_Label6 = new wxStaticText(this, -1, wxString(marDict.GetString(405), wxConvUTF8) );//"Minimum Diameter"
401 _st_Value6 = new wxStaticText(this, -1, _T("0.00"));
403 // _st_Label6->SetBackgroundColour(*wxLIGHT_GREY);
404 // _st_Value6->SetBackgroundColour(*wxLIGHT_GREY);
405 _st_Label7 = new wxStaticText(this, -1, wxString(marDict.GetString(410), wxConvUTF8) );//"Maximum Diameter"
406 _st_Value7 = new wxStaticText(this, -1, _T("0.00"));
408 // _st_Label7->SetBackgroundColour(*wxLIGHT_GREY);
409 // _st_Value7->SetBackgroundColour(*wxLIGHT_GREY);
410 _st_Label8 = new wxStaticText(this, -1, wxString(marDict.GetString(415), wxConvUTF8) );//"Average Diameter"
411 _st_Value8 = new wxStaticText(this, -1, _T("0.00"));
413 // _st_Label8->SetBackgroundColour(*wxLIGHT_GREY);
414 // _st_Value8->SetBackgroundColour(*wxLIGHT_GREY);
415 // EED -> _st_Label9 = new wxStaticText(this, -1, "Stenosis");
416 // EED -> _st_Value9 = new wxStaticText(this, -1, "0.00");
417 // EED -> _st_Label9->SetBackgroundColour(*wxLIGHT_GREY);
418 // EED -> _st_Value9->SetBackgroundColour(*wxLIGHT_GREY);
420 _st_LabelRef101 = new wxStaticText(this, -1, wxString(marDict.GetString(385), wxConvUTF8) );//"Seg. Length"
421 _st_ValueRef101 = new wxStaticText(this, -1, _T("--"));
423 // _st_LabelRef101->SetBackgroundColour(*wxLIGHT_GREY);
424 // _st_ValueRef101->SetBackgroundColour(*wxLIGHT_GREY);
425 _st_LabelRef102 = new wxStaticText(this, -1, wxString(marDict.GetString(395), wxConvUTF8) );//"Ref. Area"
426 _st_ValueRef102 = new wxStaticText(this, -1, _T("--"));
428 // _st_LabelRef102->SetBackgroundColour(*wxLIGHT_GREY);
429 // _st_ValueRef102->SetBackgroundColour(*wxLIGHT_GREY);
430 _st_LabelRef103 = new wxStaticText(this, -1, wxString(marDict.GetString(420), wxConvUTF8) );//"Ref. Average Diam."
431 _st_ValueRef103 = new wxStaticText(this, -1, _T("--"));
433 // _st_LabelRef103->SetBackgroundColour(*wxLIGHT_GREY);
434 // _st_ValueRef103->SetBackgroundColour(*wxLIGHT_GREY);
436 _pl_cntlHealthySick2 = new wxPanelControlsHealthySickSlice2(panel_right_down,this);
439 // panel_left->SetBackgroundColour(*wxLIGHT_GREY);
440 // panel_right_up->SetBackgroundColour(*wxLIGHT_GREY);
441 // panel_right_down->SetBackgroundColour(*wxLIGHT_GREY);
442 // panel_splitter_right->SetBackgroundColour(*wxLIGHT_GREY);
443 // panel_splitter->SetBackgroundColour(*wxLIGHT_GREY);
447 //--------------------------------------------------------
449 void wxQuantificationWidget::Do_layout()
454 wxBoxSizer *sizer_principal = new wxBoxSizer(wxVERTICAL);
455 wxBoxSizer *status = new wxBoxSizer(wxHORIZONTAL);
458 // wxFlexGridSizer *medium_right_up = new wxFlexGridSizer(1,0);
459 wxBoxSizer *medium_right_up = new wxBoxSizer(wxVERTICAL);
461 wxFlexGridSizer *medium_right_down = new wxFlexGridSizer(1,0);
464 wxBoxSizer *medium_left_up = new wxBoxSizer(wxVERTICAL);
465 wxBoxSizer *medium_right = new wxBoxSizer(wxVERTICAL);
466 // wxFlexGridSizer *autoQuantif = new wxFlexGridSizer(1,0);
469 // wxStaticBoxSizer *axe = new wxStaticBoxSizer(new wxStaticBox(panel_left_down, -1, _T("")), wxVERTICAL);
470 wxFlexGridSizer *axe = new wxFlexGridSizer(1);
471 axe->AddGrowableCol(0);
473 wxFlexGridSizer *axe1 = new wxFlexGridSizer(10,0);
474 wxBoxSizer *axe2 = new wxBoxSizer(wxHORIZONTAL);
475 wxFlexGridSizer *axe3 = new wxFlexGridSizer(10,0);
476 wxFlexGridSizer *axe4 = new wxFlexGridSizer(10,0);
477 wxBoxSizer *axe5 = new wxBoxSizer(wxHORIZONTAL);
478 wxBoxSizer *axe6 = new wxBoxSizer(wxHORIZONTAL);
480 wxBoxSizer *status0 = new wxBoxSizer(wxVERTICAL);
481 wxBoxSizer *status1 = new wxBoxSizer(wxVERTICAL);
482 wxBoxSizer *status2 = new wxBoxSizer(wxVERTICAL);
483 wxBoxSizer *status3 = new wxBoxSizer(wxVERTICAL);
484 // wxBoxSizer *status4 = new wxBoxSizer(wxVERTICAL);
485 // wxBoxSizer *status5 = new wxBoxSizer(wxVERTICAL);
486 wxBoxSizer *status6 = new wxBoxSizer(wxVERTICAL);
487 wxBoxSizer *status7 = new wxBoxSizer(wxVERTICAL);
488 wxBoxSizer *status8 = new wxBoxSizer(wxVERTICAL);
489 wxBoxSizer *status9 = new wxBoxSizer(wxVERTICAL);
490 wxBoxSizer *statusRef1 = new wxBoxSizer(wxVERTICAL);
491 wxBoxSizer *statusRef2 = new wxBoxSizer(wxVERTICAL);
492 wxBoxSizer *statusRef3 = new wxBoxSizer(wxVERTICAL);
495 axe1->Add(_st_Slice , 10, wxALL|wxEXPAND, 0);
496 axe1->Add(_sl_Slice , 10, wxALL|wxGROW, 0);
497 axe1->AddGrowableCol(1);
499 axe2->Add(_cb_HealthySlice , 10, wxALL|wxEXPAND, 0);
500 axe2->Add(_cb_Perpendicular , 10, wxALL|wxEXPAND, 0);
501 axe2->Add(_cb_VisibleRings , 10, wxALL|wxEXPAND, 0);
502 axe2->Add(_cb_ShowSurface , 10, wxALL|wxEXPAND, 0);
504 axe3->Add(_st_Opacity , 1, wxALL|wxEXPAND, 0);
505 axe3->Add(_sl_Opacity , 10, wxALL|wxGROW, 0);
506 axe3->Add(_rb_GreyScale , 10, wxALL|wxEXPAND, 0);
507 axe3->Add(_rb_Color , 10, wxALL|wxEXPAND, 0);
508 axe3->AddGrowableCol(1);
510 axe4->Add(_st_Isovalue , 1, wxALL|wxEXPAND, 0);
511 axe4->Add(_sl_Isovalue , 1, wxALL|wxGROW, 0);
512 axe4->AddGrowableCol(1);
514 axe5->Add(_bt_AddContour3D , 1 );
515 axe5->Add(_bt_CleanContour3D , 1 );
516 axe6->Add(_bt_CleanAllContours3D , 1 );
517 axe6->Add(_bt_SaveContours3D , 1 );
520 // status0->Add(_st_Label0, 1, wxALL|wxALIGN_CENTER, 5);
521 // status0->Add(_st_Value0, 1, wxALL|wxALIGN_CENTER, 5);
522 status1->Add(_st_Label1, 1, wxALL|wxALIGN_CENTER, 5);
523 status1->Add(_st_Value1, 1, wxALL|wxALIGN_CENTER, 5);
524 status2->Add(_st_Label2, 1, wxALL|wxALIGN_CENTER, 5);
525 status2->Add(_st_Value2, 1, wxALL|wxALIGN_CENTER, 5);
526 status3->Add(_st_Label3, 1, wxALL|wxALIGN_CENTER, 5);
527 status3->Add(_st_Value3, 1, wxALL|wxALIGN_CENTER, 5);
528 // status4->Add(_st_Label4, 1, wxALL|wxALIGN_CENTER, 5);
529 // status4->Add(_st_Value4, 1, wxALL|wxALIGN_CENTER, 5);
530 // status5->Add(_st_Label5, 1, wxALL|wxALIGN_CENTER, 5);
531 // status5->Add(_st_Value5, 1, wxALL|wxALIGN_CENTER, 5);
532 status6->Add(_st_Label6, 1, wxALL|wxALIGN_CENTER, 5);
533 status6->Add(_st_Value6, 1, wxALL|wxALIGN_CENTER, 5);
534 status7->Add(_st_Label7, 1, wxALL|wxALIGN_CENTER, 5);
535 status7->Add(_st_Value7, 1, wxALL|wxALIGN_CENTER, 5);
536 status8->Add(_st_Label8, 1, wxALL|wxALIGN_CENTER, 5);
537 status8->Add(_st_Value8, 1, wxALL|wxALIGN_CENTER, 5);
538 // EED -> status9->Add(_st_Label9, 1, wxALL|wxALIGN_CENTER, 5);
539 // EED -> status9->Add(_st_Value9, 1, wxALL|wxALIGN_CENTER, 5);
541 statusRef1->Add(_st_LabelRef101, 1, wxALL|wxALIGN_CENTER, 5);
542 statusRef1->Add(_st_ValueRef101, 1, wxALL|wxALIGN_CENTER, 5);
543 statusRef2->Add(_st_LabelRef102, 1, wxALL|wxALIGN_CENTER, 5);
544 statusRef2->Add(_st_ValueRef102, 1, wxALL|wxALIGN_CENTER, 5);
545 statusRef3->Add(_st_LabelRef103, 1, wxALL|wxALIGN_CENTER, 5);
546 statusRef3->Add(_st_ValueRef103, 1, wxALL|wxALIGN_CENTER, 5);
549 // status->Add(status0 , 1, wxALL|wxEXPAND, 0);
550 status->Add(status1 , 1, wxALL|wxEXPAND, 0);
551 status->Add(statusRef1 , 1, wxALL|wxEXPAND, 0);
552 status->Add(status2 , 1, wxALL|wxEXPAND, 0);
553 status->Add(statusRef2 , 1, wxALL|wxEXPAND, 0);
554 status->Add(status3 , 1, wxALL|wxEXPAND, 0);
555 // status->Add(status4 , 1, wxALL|wxEXPAND, 0);
556 // status->Add(status5 , 1, wxALL|wxEXPAND, 0);
557 status->Add(status6 , 1, wxALL|wxEXPAND, 0);
558 status->Add(status7 , 1, wxALL|wxEXPAND, 0);
559 status->Add(status8 , 1, wxALL|wxEXPAND, 0);
560 status->Add(statusRef3 , 1, wxALL|wxEXPAND, 0);
561 // EED -> status->Add(status9, 1, wxALL|wxEXPAND, 0);
563 axe->Add(axe1, 2, wxALL|wxEXPAND, 0);
564 axe->Add(axe2, 2, wxALL|wxEXPAND, 0); //wxALIGN_CENTER_HORIZONTAL
565 axe->Add(axe3, 2, wxALL|wxEXPAND, 0);
566 axe->Add(axe4, 2, wxALL|wxEXPAND, 0);
568 // axe->Add(axe5, 2, wxALL|wxEXPAND, 0);
569 // axe->Add(axe6, 2, wxALL|wxEXPAND, 0);
573 panel_left_down->SetAutoLayout(true);
574 panel_left_down->SetSizer(axe);
575 panel_left_down->Layout();
579 // medium_right_up->Add(_2DWorld , 1, wxALL|wxGROW, 5);
580 medium_right_up->Add(_2DWorld , 1, wxALL|wxEXPAND, 5);
582 medium_right_down->Add(_wxStenosisPanel , 1, wxALL, 5);
583 medium_right_down->Add(_pl_cntlHealthySick2 , 1, wxALL, 5);
586 //medium_right->Add(_Chart , 1, wxALL|wxEXPAND , 0);
588 // panel_left->SetAutoLayout(true);
589 // panel_left->SetSizer(medium_left);
590 // panel_left->Layout();
593 medium_left_up->Add(_3DWorld , 1, wxEXPAND, 0);
594 panel_left_up->SetAutoLayout(true);
595 panel_left_up->SetSizer(medium_left_up);
596 panel_left_up->Layout();
599 panel_splitter_left->SplitHorizontally( panel_left_up , panel_left_down );
600 panel_splitter_left->SetMinimumPaneSize( 50 );
604 panel_right_up->SetAutoLayout(true);
605 panel_right_up->SetSizer(medium_right_up);
606 panel_right_up->Layout();
608 panel_right_down->SetAutoLayout(true);
609 panel_right_down->SetSizer(medium_right_down);
610 panel_right_down->Layout();
615 while (pp->GetParent()!=NULL) pp=pp->GetParent();
616 pp->GetSize(&ww,&hh);
618 panel_splitter_right->SplitHorizontally( panel_right_up, panel_right_down, (int)(hh*0.4) );
619 panel_splitter_right->SetMinimumPaneSize( 50 );
623 // medium_right->Add(panel_splitter_right,1 ,wxGROW,0 );
624 medium_right->Add(panel_splitter_right,1 ,wxALL|wxEXPAND,0 );
625 panel_right->SetAutoLayout(true);
626 panel_right->SetSizer(medium_right);
627 panel_right->Layout();
628 // panel_right->FitInside();
631 panel_splitter->SplitVertically( panel_splitter_left , panel_right, (int)(ww*0.6) );
632 panel_splitter->SetMinimumPaneSize( 50 );
635 // sizer_principal->Add( panel_splitter , 1 , wxGROW );
636 // sizer_principal->Add( status , 0 , wxGROW );
637 sizer_principal->Add( panel_splitter , 1 , wxALL|wxEXPAND );
638 sizer_principal->Add( status , 0 , wxALL|wxEXPAND );
640 this->SetSizer(sizer_principal);
648 //--------------------------------------------------------
649 void wxQuantificationWidget::Set_Data( )
656 //EED _real_first_point_quant = -1;
657 //EED _real_last_point_quant = -1;
664 _actual_darea = 0.00;
665 _actual_dperi = 0.00;
670 _actual_partial = 0.00;
672 //_actual_total = _mar->_experiment->GetAxisLength();
673 //_st_Value1->SetLabel(_actual_total);
674 //return( maracas_data::experiment->get_work_axis( )->get_total_length( ) );
679 //--------------------------------------------------------
680 void wxQuantificationWidget::Positionate( )
688 //--------------------------------------------------------
689 void wxQuantificationWidget::Forget( )
694 // ----------------------------------------------------------------------------
695 void wxQuantificationWidget::ShowMARACASData( marInterface* mar )
698 vtkImageData* imagedata;
704 _mar->_experiment->prepareQuantification( );
705 nos = _mar->_experiment->getNumberOfSlices( );
706 actualQuant = (int) (nos-1)/2 ;
707 imagedata = _mar->_experiment->getSliceImage( actualQuant );
708 _mar->_experiment->getAxis()->setActualQuant( actualQuant ) ;
709 _mar->_experiment->getDynData( )->getVolume( )->getMinMax( min, max );
711 _3DWorld->ShowMARACASDataAndAxe( mar );
712 _3DWorld->InitCameraReset( );
713 _2DWorld->ConstructVTK( imagedata );
716 _sl_Isovalue->SetRange( (int)min, (int)max);
717 _sl_Isovalue->SetValue( (int)(max/4) );
718 _sl_Opacity->SetValue( 50 );
721 _pl_cntlHealthySick2->GetPnlSearStenosis()->GetPanelAutomatic()->SetRange(0,nos-1);
727 this->GetSize(&wwT,&hhT);
728 _wxStenosisPanel->GetSize(&ww1,&hh1);
729 _pl_cntlHealthySick2->GetSize(&ww2,&hh2);
732 panel_splitter_right->SetSashPosition(ss,true);
735 //----------------------------------------------------------------------------
736 void wxQuantificationWidget::Reset_sl_Slider()
738 int nos = _mar->_experiment->getNumberOfSlices( );
739 _sl_Slice->SetRange(0, nos-1);
740 _sl_Slice->SetValue( (nos-1)/2 );
741 // _pl_cntlHealthySick->Reset_sl_Slider(nos);
743 //----------------------------------------------------------------------------
744 void wxQuantificationWidget::SetSlider_Isovalue_Opacity(int isovalue,int opacity){
745 _sl_Isovalue->SetValue(isovalue);
746 _sl_Opacity->SetValue(opacity);
747 _3DWorld->SetSurfaceIsoValue( isovalue );
748 _3DWorld->SetSurfaceOpacity( opacity );
750 //----------------------------------------------------------------------------
751 void wxQuantificationWidget::OnShowSurface_CB(wxCommandEvent& event)
753 _3DWorld->SetSurfaceVisibility( _cb_ShowSurface->GetValue() );
755 // ---------------------------------------------------------------------------
756 void wxQuantificationWidget::ResetAxis(){
758 _mar->_experiment->getAxis()->setActualQuant( _sl_Slice->GetValue() );
760 _3DWorld->Hide3DHealthySliceActor();
761 _mar->_experiment->getAxis( )->setHealthySlice( 0,-1,0 );
763 // ---------------------------------------------------------------------------
764 void wxQuantificationWidget::RefreshAxis( ){
765 int acuatQuant = _mar->_experiment->getAxis()->getActualQuant();
766 vtkImageData* imagedata;
767 vtkProbeFilter* image3D;
768 vtkPolyData* vtkPolydata_2Dcontour;
769 vtkPoints* vtkPoints_2DDiameterMin;
770 vtkPoints* vtkPoints_2DDiameterMax;
772 image3D = _mar->_experiment->get3DSlice ( acuatQuant );
773 imagedata = _mar->_experiment->getSliceImage ( acuatQuant );
774 vtkPolydata_2Dcontour = _mar->_experiment->get2Dcontour ( acuatQuant );
775 vtkPoints_2DDiameterMin = _mar->_experiment->get2DDiameterMin ( acuatQuant );
776 vtkPoints_2DDiameterMax = _mar->_experiment->get2DDiameterMax ( acuatQuant );
778 _3DWorld->SetImage(image3D);
780 _2DWorld->SetImage(imagedata);
782 if (_cb_VisibleRings->GetValue()==true){
783 _2DWorld->SetContour( vtkPolydata_2Dcontour );
784 _2DWorld->SetDiameterMin( vtkPoints_2DDiameterMin , true );
785 _2DWorld->SetDiameterMax( vtkPoints_2DDiameterMax , true );
789 // PS -> marContour * tutu=_mar->_experiment->getAxis()->getContour( event.GetPosition() );
790 // cnt = _mar->_experiment->generateContour(event.GetPosition(), -1, -1, NULL);
791 // PS -> tutu=_mar->_experiment->getAxis()->getContour( event.GetPosition() );
792 // _2DWorld->SetContour( cnt );
796 // ----------------------------------------------------------------------------
797 void wxQuantificationWidget::MoveSlider(int actualQuant){
799 if (_bak_ActualSlice!=-1){
800 SetManualContour_ReplaceContour();
801 SetManualContour_2DWorld(false);
804 _mar->_experiment->getAxis()->setActualQuant( actualQuant );
807 // ----------------------------------------------------------------------------
808 void wxQuantificationWidget::OnSliderSliceScroll(wxScrollEvent& event){
809 MoveSlider( event.GetPosition() );
811 // ----------------------------------------------------------------------------
812 double wxQuantificationWidget::GetStenosisDiameter(int sickSlice){
813 double healthyAverageDiameter = _mar->_experiment->getReferenceAverDiam() ;
814 marContour *marcontourSick = _mar->_experiment->getContour( sickSlice );
815 return doubleStenosis( healthyAverageDiameter , marcontourSick->getMinimumDiameter() );
817 // ----------------------------------------------------------------------------
818 double wxQuantificationWidget::GetStenosisArea( int sickSlice){
819 double healthyArea = _mar->_experiment->getReferenceArea();
820 marContour *marcontourSick = _mar->_experiment->getContour( sickSlice );
821 return doubleStenosis( healthyArea , marcontourSick->getArea() );
823 // ----------------------------------------------------------------------------
827 // ----------------------------------------------------------------------------
828 double wxQuantificationWidget::GetStenosisTEST1(marContour *marcontourH, marContour *marcontour){
829 double healthy= marcontourH->getMinimumDiameter() * marcontourH->getMaximumDiameter();
830 double sick= marcontour->getMinimumDiameter() * marcontour->getMaximumDiameter();
831 return doubleStenosis( healthy , sick );
833 // ----------------------------------------------------------------------------
834 double wxQuantificationWidget::GetStenosisTEST2(marContour *marcontourH, marContour *marcontour){
835 double steA = GetStenosisArea(marcontourH,marcontour);
836 double steB = GetStenosisDiameter(marcontourH,marcontour);
837 return sqrt(steA + steB);
839 // ----------------------------------------------------------------------------
840 double wxQuantificationWidget::GetStenosisTEST3(marContour *marcontourH, marContour *marcontour){
841 return doubleStenosis( marcontourH->getAverageDiameter() , marcontour->getAverageDiameter() );
847 // ----------------------------------------------------------------------------
848 void wxQuantificationWidget::showVariables()
850 marContour* marcontour;
853 int healthySliceStart;
856 // healthySlice = _sl_Slice->GetValue();
857 // _mar->_experiment->getAxis( )->setHealthySlice( healthySlice );
858 // _3DWorld->Set3DHealthySliceActor( );
859 // _3DWorld->Show3DHealthySliceActor( );
860 actualQuant = _mar->_experiment->getAxis()->getActualQuant( );
861 marcontour=_mar->_experiment->getContour( actualQuant );
864 // tmpString.Printf( "%.2f mm" , marcontour->getPartialAxisLenght());
865 // _st_Value0->SetLabel(tmpString);
866 tmpString.Printf( _T("%.2f mm") , _mar->_experiment->getTotalLength() ); _st_Value1->SetLabel(tmpString);
869 tmpString.Printf( _T("%.2f mm^2") , marcontour->getArea()); _st_Value2->SetLabel(tmpString);
870 tmpString.Printf( _T("%.2f mm") , marcontour->getPerimeter()); _st_Value3->SetLabel(tmpString);
871 // tmpString.Printf( _T("%.2f mm") , marcontour->getDiameterFromArea()); _st_Value4->SetLabel(tmpString);
872 // tmpString.Printf( _T("%.2f mm") , marcontour->getDiameterFromPerimeter()); _st_Value5->SetLabel(tmpString);
873 tmpString.Printf( _T("%.2f mm") , marcontour->getMinimumDiameter()); _st_Value6->SetLabel(tmpString);
874 tmpString.Printf( _T("%.2f mm") , marcontour->getMaximumDiameter()); _st_Value7->SetLabel(tmpString);
875 tmpString.Printf( _T("%.2f mm") , marcontour->getAverageDiameter()); _st_Value8->SetLabel(tmpString);
877 healthySlice = _mar->_experiment->getAxis( )->getHealthySlice( );
878 healthySliceStart = _mar->_experiment->getAxis( )->getHealthySliceStart( );
879 healthySliceEnd = _mar->_experiment->getAxis( )->getHealthySliceEnd( );
880 if ( (healthySlice!=-1) ) {
881 _st_Value100->SetLabel( strStenosis( GetStenosisArea(actualQuant) ) );
882 _st_Value101->SetLabel( strStenosis( GetStenosisDiameter(actualQuant) ) );
883 tmpString.Printf( _T("%.2f mm^2") , _mar->_experiment->getReferenceArea() ); _st_ValueRef102->SetLabel(tmpString);
884 tmpString.Printf( _T("%.2f mm") , _mar->_experiment->getReferenceAverDiam() ); _st_ValueRef103->SetLabel(tmpString);
886 _st_Value100->SetLabel(_T("--"));
887 _st_Value101->SetLabel(_T("--"));
888 _st_ValueRef101->SetLabel(_T("--"));
889 _st_ValueRef102->SetLabel(_T("--"));
890 _st_ValueRef103->SetLabel(_T("--"));
893 int startSlice = _mar->_experiment->getAxis()->getStartQuant();
894 int finishSlice = _mar->_experiment->getAxis()->getFinishQuant();
895 if ((startSlice!=-1) && (finishSlice!=-1)){
896 tmpString.Printf( _T("%.2f mm") , _mar->_experiment->getSubAxisLength() ); _st_ValueRef101->SetLabel(tmpString);
898 _st_ValueRef101->SetLabel(_T("--"));
901 panel_splitter->SetSashPosition(panel_splitter->GetSashPosition() );
904 // ----------------------------------------------------------------------------
905 double wxQuantificationWidget::doubleStenosis(double healthy, double sick){
911 // result = (fabs(healthy-sick)/healthy) * 100 ;
912 result = ( (healthy-sick)/healthy) * 100 ;
917 // ----------------------------------------------------------------------------
918 wxString wxQuantificationWidget::strStenosis(double stenosis){
922 tmpString.Printf(_T("%d"),-1);
924 tmpString.Printf(_T("%.2f"), stenosis );
926 return tmpString + _T(" \%");
928 // ----------------------------------------------------------------------------
929 void wxQuantificationWidget::OnSliderIsovalueScroll(wxScrollEvent& event)
932 _3DWorld->SetSurfaceIsoValue( event.GetPosition() );
934 // ----------------------------------------------------------------------------
935 void wxQuantificationWidget::OnSliderOpacityScroll(wxScrollEvent& event)
937 _3DWorld->SetSurfaceOpacity( event.GetPosition() );
939 //----------------------------------------------------------------------------
940 void wxQuantificationWidget::AddAxisActors(){
942 marAxis *maraxis = _mar->_experiment->getAxis( );
943 if (maraxis!=NULL) _3DWorld->SetAxis( maraxis->Draw( ) );
947 //----------------------------------------------------------------------------
948 void wxQuantificationWidget::Clean3D( bool eraseAxe )
952 //EED _real_first_point_quant = -1;
953 //EED _real_last_point_quant = -1;
955 _quant_shown = false;
957 _3DWorld->InitListContourActor( -1,_mar->_experiment->getNumberOfSlices() );
958 if (eraseAxe==true) { _3DWorld->RemoveAxis(); }
961 _3DWorld->Hide3DSliceActor( );
962 _3DWorld->Hide3DContourActor( );
963 _3DWorld->Hide3DHealthySliceActor();
967 if (_pRenderer3D != 0) _pRenderer3D->RemoveActor(hs_actor);
968 if (_hs_actor != 0) hs_actor->delete();
969 if (_hs_mapper != 0) hs_mapper->delete();
970 if (_hs_grid != 0) hs_grid->delete();
971 if (_hs_points != 0) hs_points->delete();
972 if (_hs_poly_line != 0) hs_poly_line->delete();
977 int max = _rings_index->GetCount();
980 if (_pRenderer3D != 0)
981 _pRenderer3D->RemoveActor(_cont3DActor(hs_actor[i]));
982 if (_cont3DActor[i] != 0)
983 _cont3DActor[i]->Delete();
984 if (_cont3DMapper[i] != 0)
985 _cont3DMapper[i]->Delete();
986 if (_cont3DGrid[i] != 0)
987 _cont3DGrid[i]->Delete();
988 if (_cont3DPolyLine[i] != 0)
989 _cont3DPolyLine[i]->Delete();
990 if (_cont3DPoints[i] != 0)
991 _cont3DPoints[i]->Delete();
995 //_rings_index = _list;
1001 void wxQuantificationWidget::Reload_Axis(bool mask , bool step )
1004 this->redoAxisSpline();
1005 if ( pRenderer3D != 0 ) {
1006 _pRenderer3D->RemoveActor(GetSphereActorName(sphere_quant1));
1007 _pRenderer3D->RemoveActor(GetSphereActorName(sphere_quant2));
1009 this->DeleteSphere(sphere_quant1);
1010 this->DeleteSphere(sphere_quant2);
1014 this->recalculeAxisSignal()
1017 if ( ( mask || step ) && _shown ) {
1018 tk_messageBox -icon info -message "$string_table::str_quant_will_be_erased" -type ok
1019 catch { renderer_$widgets(work3D) RemoveActor hs_actor_$widgets(work3D) }
1020 catch { hs_actor_$widgets(work3D) Delete }
1021 catch { hs_mapper_$widgets(work3D) Delete }
1022 catch { hs_grid_$widgets(work3D) Delete }
1023 catch { hs_points_$widgets(work3D) Delete }
1024 catch { hs_poly_line_$widgets(work3D) Delete }
1025 foreach i $rings_index {
1026 catch { renderer_$widgets(work3D) RemoveActor cont3DActor_{$widgets(work3D)}_{$i} }
1027 catch { cont3DActor_{$widgets(work3D)}_{$i} Delete }
1028 catch { cont3DMapper_{$widgets(work3D)}_{$i} Delete }
1029 catch { cont3DGrid_{$widgets(work3D)}_{$i} Delete }
1030 catch { cont3DPolyLine_{$widgets(work3D)}_{$i} Delete }
1031 catch { cont3DPoints_{$widgets(work3D)}_{$i} Delete }
1043 _quant_shown = false;
1044 this->clean_graph(); // old BLT
1047 _range(getIntensityRange());
1048 _resample(getVTKSource());
1049 _bounds(resample(GetBounds());
1052 set points [ getAxis_dll ]
1053 set nP [ expr [ llength $points ] / 3 ]
1054 $widgets(sclSlice) configure \
1056 -to [ expr [ getNumberOfAxisPoints_dll ] - 1 ] \
1059 // Poly-line actor construction...
1060 catch { renderer_$widgets(work3D) RemoveActor axisActor_$widgets(work3D) }
1061 catch { axisActor_$widgets(work3D) Delete }
1062 catch { axisMapper_$widgets(work3D) Delete }
1063 catch { axisGrid_$widgets(work3D) Delete }
1064 catch { axisPolyLine_$widgets(work3D) Delete }
1065 catch { axisPoints_$widgets(work3D) Delete }
1067 axisPoints = vtkPoints::New();
1068 axisPolyLine = vtkPolyLine::New();
1069 axisPolyLine->GetPointIds()->SetNumberOfIds( nP);
1070 vox_size = getActualVoxelSize();
1072 for { set i 0 } { $i < $nP } { incr i } {
1074 [ axisPolyLine_$widgets(work3D) GetPointIds ] SetId $i $i
1077 [ lindex $points [ expr $i * 3 + 0 ] ] \
1078 [ lindex $points [ expr $i * 3 + 1 ] ] \
1079 [ lindex $points [ expr $i * 3 + 2 ] ] \
1080 [ lindex $bounds 0 ] \
1081 [ lindex $bounds 2 ] \
1082 [ lindex $bounds 4 ] \
1083 $vox_size $vox_size $vox_size \
1085 axisPoints->InsertNextPoint( lindex $p 0 ] [ lindex $p 1 ] [ lindex $p 2 ]
1089 axisGrid = vtkUnstructuredGrid::New();
1090 axisGrid->Allocate( 1, 1);
1091 axisGrid->InsertNextCell( [ axisPolyLine->GetCellType(), ] \
1092 [ axisPolyLine_$widgets(work3D) GetPointIds ]
1093 axisGrid->SetPoints(axisPoints);
1095 axisMapper = vtkDataSetMapper::New();
1096 axisMapper->SetInput(axisGrid);
1097 axisMapper->ImmediateModeRenderingOn();
1099 axisActor = vtkActor::New();
1100 axisActor->SetMapper(axisMapper);
1101 axisActor->GetProperty()->BackfaceCullingOn();
1102 axisActor->GetProperty()->SetDiffuseColor(1, 0, 0);
1104 _pRenderer3D->AddActor(axisActor);
1106 _pRenderWindow3D->Render();
1107 _pRenderWindow2D->Render();
1109 _pRenderer3D->AddActor(outlineActor));
1114 if ( _given_points == 1 )
1118 this->update_blt_all_meassures();
1123 void wxQuantificationWidget::Show_Max_Min_Diameters()
1127 slice = widgets(sclSlice);
1128 wxList *lmax = this->getMaximumLine();
1129 wxList *lmin = this->getMinimumLine();
1131 if ( _pRenderer2D != 0 )
1133 _pRenderer2D->RemoveActor(dMin_actor);
1134 _pRenderer2D->RemoveActor(dMax_actor);
1136 if ( dMax_actor != 0 ) dMax_actor->Delete();
1137 if ( dMax_mapper != 0 ) dMax_mapper->Delete();
1138 if ( dMax_line != 0 ) dMax_line->Delete();
1139 if ( dMin_actor != 0 ) dMin_actor->Delete();
1140 if ( dMin_mappe != 0 ) dMin_mappe->Delete();
1141 if ( dMax_actor != 0 ) dMax_actor->Delete();
1142 if ( dMin_line != 0 ) dMin_line->Delete();
1145 dMax_line = vtkLineSource::New();
1146 dMax_line->SetPoint1( lmax->Getfirst() , lmax->item(1), 0.0 );
1147 dMax_line->SetPoint2( lmax->Item(2), lmax->Item(3), 0.0 );
1149 dMax_mapper = vtkPolyDataMapper::New();
1150 dMax_mapper->SetInput(dMax_line->GetOutput());
1151 dMax_mapper->ImmediateModeRenderingOn();
1153 dMax_actor = vtkActor::New();
1154 dMax_actor->SetMapper(dMax_mapper));
1155 dMax_actor->GetProperty()->SetColor(1.00, 0.00, 0.00);
1157 dMin_line = vtkLineSource::New();
1158 dMin_line->SetPoint1( lmin->GetFirst(), lmin->Item(1), 0.0);
1159 dMin_line->SetPoint2( lmin->Item(2), lmin->Item(3), 0.0);
1161 dMin_mapper = vtkPolyDataMapper::New();
1162 dMin_mapper->SetInput(dMin_line->GetOutput());
1163 dMin_mapper->ImmediateModeRenderingOn();
1165 dMin_actor = vtkActor::New();
1166 dMin_actor->SetMapper(dMin_mapper);
1167 dMin_actor->GetProperty()->SetColor(0.00, 0.00, 1.00);
1169 array set arr( params(), 0 )
1170 if ( arr(e_debug_diameters) == 1 )
1172 _prenderer2D->AddActor(dMax_actor);
1173 _prenderer2D->AddActor(dMin_actor);
1177 //GetRenderWindow Render
1183 int wxQuantificationWidget::Back( )
1193 void wxQuantificationWidget::Set_plane_3D( double x, double y )
1196 _pRenderer3D->IsInViewport(0, 0);
1201 if ( _tmp_world_picker3D != 0) tmp_world_picker3D->Delete();
1203 y =[ [ lindex [ $widgets(work3D) configure - height ] 4 ] - y - 1 ]
1205 _pickWPPos = Pick_point_local_actor $x $y _pRenderer3D _isoActor3D 0.001 ]
1207 _xc = _pickWPPos->item(1);
1208 _yc = _pickWPPos->item(2);
1209 _zc = _pickWPPos->item(3);
1210 #Chercher le point de l'axe le plus proche au point choisi sur la surface
1211 _indP = axisGrid3D->FindPoint(_xc, _yc, _zc);
1212 _coordsP = axisGrid3D->GetPoint(_indP);
1213 _xc =[lindex _coordsP 0]
1214 _yc =[lindex _coordsP 1]
1215 _zc =[lindex _coordsP 2]
1219 $widgets(sclSlice) set $indP
1226 _pRenderWindow3D->Render();
1232 void wxQuantificationWidget::Refresh_Quant( )
1234 if ( _real_first_point_quant != -1 && _real_last_point_quant != -1 &&
1235 _quant_sten->GetCount() > 0) {
1236 //_quant_sten = GetStenosisQuant();
1237 //_sten = _quant_sten->Item(_widgets(sclSlice)->get() -
1238 // _real_first_point_quant )
1240 //this->update_blt_all_meassures();
1245 void wxQuantificationWidget::Point_Intensity(double x, double y)
1247 //y = [ lindex [ _pRenderWindow3D->Configure(height) ] ->Item(4) ] - y - 1;
1249 //if ( _tmp_picker != 0 ) _tmp_picker->Delete();
1250 //_tmp_picker = vtkWorldPointPicker::New();
1251 //_pickWP = tmp_picker2D->Pick(x, y, 0) _pRenderer2D
1252 //_pickWPPos = tmp_picker2D->GetPickPosition();
1254 //x = [ lindex [ split [ lindex $pickWPPos 0 ] . ] 0 ]
1255 //y = [ lindex [ split [ lindex $pickWPPos 1 ] . ] 0 ]
1256 //y = GetCutSize() - y - 1;
1257 //_intensity = GetIntensityCut(x, y);
1261 void wxQuantificationWidget::CleanContour()
1263 /* if ( _pRenderer2D != 0 ) {
1264 _pRenderer2D->RemoveActor(_debug2Actor3D);
1265 _pRenderer2D->RemoveActor(_debug1Actor3D);
1267 if ( _debug2Actor3D != 0 )
1268 _debug2Actor3D->Delete();
1269 //if ( _connMapper3D != 0 ) _connMapper3D->Delete();
1270 //if ( _isoStrips3D != 0 ) _isoStrips3D->Delete();
1271 //if ( _cpd23D != 0 ) _cpd23D->Delete();
1272 //if ( _conn3D != 0 ) _conn3D->Delete();
1273 //if ( _cpd3D != 0 ) _cpd3D->Delete();
1274 if ( _debug1Actor3D != 0 )
1275 _debug1Actor3D->Delete();
1276 //if ( _cntVTKMapper3D != 0 ) _cntVTKMapper3D->Delete();
1277 //if ( _cntVTK3D != 0 ) _cntVTK3D->Delete();
1279 if ( _pRenderer2D != 0 ) {
1280 _pRenderer2D->RemoveActor(_aPolyLineActor2D);
1281 _pRenderer2D->RemoveActor(_aPolygonActor2D);
1284 if ( _aPolyLineActor2D != 0 )
1285 _aPolyLineActor2D->Delete();
1286 //if ( _aPolyLineMapper2D != 0 ) _aPolyLineMapper2D->Delete();
1287 //if ( _aPolyLineGrid2D != 0 ) _aPolyLineGrid2D->Delete();
1288 //if ( _aPolyLine2D != 0 ) _aPolyLine2D->Delete();
1289 //if ( _PointsContour2D != 0 ) _PointsContour2D->Delete();
1290 if ( _aPolygonActor2D != 0 )
1291 _aPolygonActor2D->Delete();
1292 //if ( _aPolygonMapper2D != 0 ) _aPolygonMapper2D->Delete();
1293 //if ( _aPolygonGrid2D != 0 ) _aPolygonGrid2D->Delete();
1294 //if ( _aPolygon2D != 0 ) _aPolygon2D->Delete();
1296 if ( _pRenderer2D != 0 ) {
1297 _pRenderer2D->RemoveActor(_dMaxActor2D);
1298 _pRenderer2D->RemoveActor(_dMinActor2D);
1301 if ( _dMaxActor2D != 0 )
1302 _dMaxActor2D->Delete();
1303 //if ( _dMaxMapper2D != 0 ) _dMaxMapper2D->Delete();
1304 //if ( _dMaxLine2D != 0 ) _dMaxLine2D->Delete();
1305 if ( _dMinActor2D != 0 )
1306 _dMinActor2D->Delete();
1307 //if ( _dMinMapper2D != 0 ) _dMinMapper2D->Delete();
1308 //if ( _dMinLine2D != 0 ) _dMinLine2D->Delete();
1310 _pRenderWindow3D->Render();
1311 _pRenderWindow2D->Render();*/
1315 //-----------------------------------------------------------------
1317 void wxQuantificationWidget::Do_Quant()
1320 if ( _quantifing == 0 )
1322 this->Clean_Graph();
1327 int f = ( _first_point_quant < _last_point_quant ) ? _first_point_quant : _last_point_quant;
1328 int l = ( _first_point_quant > _last_point_quant ) ? _first_point_quant : _last_point_quant;
1333 _quant_area = _list;
1334 _quant_peri = _list;
1335 _quant_darea = _list;
1336 _quant_dperi = _list;
1337 _quant_dmax = _list;
1338 _quant_dmin = _list;
1339 _quant_davg = _list;
1341 for ( int i = f; i <= l; i++ )
1342 lappend _quant_x->Append(i);
1344 update_blt_all_meassures();
1350 wxMessageDialog* Q_recalculate = new wxDialog(this,
1351 _str_recalculate_contours,
1353 wxYES_NO|wxNO_DEFAULT|wxCENTRE,
1357 if (Q_recalculate->ShowModal() == wxID_OK)
1360 delete Q_recalculate;
1362 this->Clean_Contour();
1363 $widgets(sclSlice) set cont ;
1364 planes_window::set_plane
1366 _params = GetContourParams();
1367 this->Generate_IsoContour( (GetCutSize() / 2) (GetCutSize() / 2)
1370 while ( NextQuant(recal,IsoStrips3D) == 1 && cont <= l )
1372 if ( _quantifing == 1 )
1374 if ( _pRenderer2D != 0 )
1376 _pRenderer2D->RemoveActor(_aPolygonActor2D);
1377 _pRenderer2D->RemoveActor(_aPolyLineActor2D);
1379 if ( _aPolygonActor2D != 0 ) _aPolygonActor2D->Delete();
1380 if ( _aPolygonGrid2D != 0 ) _aPolygonGrid2D->Delete();
1381 if ( _aPolyLineActor2D != 0 ) _aPolyLineActor2D->Delete();
1382 if ( _aPolyLineMapper2D != 0 ) _aPolyLineMapper2D->Delete();
1383 if ( _aPolyLineGrid2D != 0 ) _aPolyLineGrid2D->Delete();
1384 if ( _aPolyLine2D != 0 ) _aPolyLine2D->Delete();
1385 if ( _PointsContour2D != 0 ) _PointsContour2D->Delete();
1386 if ( _aPolygon2D != 0 ) _aPolygon2D->Delete();
1388 _points = GetContourPoints();
1389 _taille = _points->GetLength() / 2;
1391 aPolygon2D = vtkPolygon::New();
1392 PointsContour2D = vtkPoints::New();
1394 aPolyLine2D = vtkPolyLine::New();
1395 _PointIds = aPolyLine2D->GetPointIds();
1396 _PointIds->SetNumberOfIds(_taille);
1397 _PointIdsPolygon = aPolygon2D->GetPointIds();
1398 _PointIdsPolygon->SetNumberOfIds( _taille);
1400 for ( int i =0; i < _taille ; i++ )
1402 _PointIds->SetId(i, i);
1403 _PointIdsPolygon->SetId(i, i);
1404 PointsContour2D->InsertNextPoint( _points->Item( i * 2 ) + 0 ,
1405 _points->Item(i * 2) + 1, 0);
1408 aPolyLineGrid2D = vtkUnstructuredGrid::New();
1409 aPolyLineGrid2D->Allocate(1, 1);
1410 _param1 = aPolyLine2D->GetCellType();
1411 _param2 = aPolyLine2D->GetPointIds();
1412 aPolyLineGrid2D->InsertNextCell(_param1, _param2);
1413 aPolyLineGrid2D->SetPoints(PointsContour2D)
1415 aPolyLineMapper2D = vtkDataSetMapper::New();
1416 aPolyLineMapper2D->SetInput(aPolyLineGrid2D);
1418 aPolyLineActor2D = vtkActor::New();
1419 aPolyLineActor2D->SetMapper(aPolyLineMapper2D);
1420 _Property1 = aPolyLineActor2D->GetProperty();
1421 _Property1->SetColor(0, 1, 0);
1422 _Property1->SetLineWidth(2);
1423 _Property1->SetPointSize(2);
1424 _Property1->BackfaceCullingOff();
1426 _pRenderer2D->AddActor(aPolyLineActor2D);
1428 aPolygonGrid2D = vtkUnstructuredGrid::New();
1429 aPolygonGri2D->Allocate(1, 1);
1430 _param1 = aPolygon2D->GetCellType();
1431 _param2 = aPolygon2D->GetPointIds();
1432 aPolygonGrid2D->InsertNextCell(_param1, _param2);
1433 aPolygonGrid2D->SetPoints(PointsContour2D);
1435 aPolygonMapper2D = vtkDataSetMapper::New();
1436 aPolygonMapper2->SetInput(aPolygonGrid2D);
1438 aPolygonActor2D = vtkActor::New();
1439 aPolygonActor2D->SetMapper(aPolygonMapper2D);
1440 _Property1 = aPolygonActor2D->GetProperty();
1441 _Property1->SetColor(0, 1, 0);
1442 _Property1->SetLineWidth(2);
1443 _Property1->SetPointSize(2);
1444 _Property1->BackfaceCullingOff();
1446 int arr[] = Params(0);
1447 if ( arr(e_debug_fill_area) == 1 )
1448 _pRenderer2D->AddActor(aPolygonActor2D)
1450 this->Show_Max_Min_Diameters();
1452 _pRenderWindow2D->Render();
1454 this->Draw3D_Contour(cont);
1456 _values = GetValues(cont);
1458 _quant_area->Append(_values->Item(1));
1459 _quant_peri->Append(_values->Item(2));
1460 _quant_darea->Append(_values->Item(3));
1461 _quant_dperi->Append(_values->Item(4));
1462 _quant_dmax->Append(_values->Item(5));
1463 _quant_dmin->Append(_values->Item(6));
1464 _quant_davg->Append(_values->Item(7));
1466 this->update_blt_all_meassures();
1468 _area = _values->Item(1);
1469 _peri = _values->Item(2);
1470 _darea = _values->Item(3);
1471 _dperi = _values->Item(4);
1472 _dmax = _values->Item(5);
1473 _dmin = _values->Item(6);
1474 _davg = _values->Item(7);
1478 this->Clean_contour();
1480 $widgets(sclSlice) set $cont;
1482 _params = GetContourParams();
1483 this->Generate_IsoContour [ [ GetCutSize() / 2 ]
1484 [ GetCutSize() / 2 ]
1485 [ _params->Item(5) ]
1486 [ _params->Item(6) ];
1490 else if ( _quantifing == 2 )
1492 while ( _quantifing == 2 )
1495 else if ( _quantifing == 3 )
1497 $widgets(btnPause) configure -text $string_table::str_pause
1503 this->Clean_contour();
1510 wxMessageDialog* Q_stop = new wxDialog(this,
1511 _str_stop_quantification,
1513 wxYES_NO|wxNO_DEFAULT|wxCENTRE,
1517 if (Q_stop->ShowModal() == wxID_OK)
1525 //-----------------------------------------------------------------
1526 void wxQuantificationWidget::OnContour_BT(wxCommandEvent& event){
1527 int slice=_sl_Slice->GetValue();
1528 _3DWorld->Set3DContourActor( slice , _mar->_experiment->get3Dcontour(slice) , _cb_VisibleRings->GetValue() ,0 );
1530 //-----------------------------------------------------------------
1531 void wxQuantificationWidget::OnClean_BT(wxCommandEvent& event){
1532 int slice=_sl_Slice->GetValue();
1533 _3DWorld->Erase3DContourActor( slice );
1536 //-----------------------------------------------------------------
1537 void wxQuantificationWidget::OnCleanAll_BT(wxCommandEvent& event){
1538 marDictionary marDict;
1541 wxMessageDialog *wxdiag;
1542 strcpy( tmp , marDict.GetString(870) ); strcat(tmp,"\n"); strcat(tmp,marDict.GetString(875));
1543 wxdiag= new wxMessageDialog(this, wxString(tmp ,wxConvUTF8), wxString(marDict.GetString(865), wxConvUTF8) , wxOK | wxCANCEL);//"This option erase all 3D contours.\n Do you want to continue?","Alert"
1544 if ( wxdiag->ShowModal() == wxID_OK ) {
1545 _3DWorld->InitListContourActor( 0, _mar->_experiment->getNumberOfSlices() );
1550 //-----------------------------------------------------------------
1551 void wxQuantificationWidget::OnSaveContours3D_BT(wxCommandEvent& event)
1554 wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas_contour3D"), wxSAVE );
1555 if (dialog.ShowModal() == wxID_OK)
1557 std::string pathfilename( (const char *)(dialog.GetPath().mb_str()) );
1558 // std::string directory( (const char *)(dialog.GetDirectory().mb_str()) );
1559 // std::string filename( (const char *)(dialog.GetFilename().mb_str()) );
1560 // std::string pathfilename = directory + "/" + filename;
1561 // printf("EED> wxQuantificationWidget::OnSaveContours3D_BT > %s\n",pathfilename.c_str());
1563 ff=fopen(pathfilename.c_str(), "w+");
1564 _mar->_experiment->getAxis()->SaveExisting3DContours(ff);
1570 // PS -> void wxQuantificationWidget::OnContour_BT(wxCommandEvent& event)
1576 // PS -> vtkPolyData* cnt;
1577 // PS -> //marContour* cnt;
1578 // PS -> // vtkUnstructuredGrid* allData;
1580 // PS -> index = _sl_Slice->GetValue( );
1581 // PS -> // this->CleanContour( );
1582 // PS -> cnt = _mar->_experiment->generateContour(index, -1, -1, NULL);
1583 // PS -> // allData = cnt->Draw( );
1584 // PS -> // _2DWorld->SetContour( allData );
1585 // PS -> _2DWorld->SetContour( cnt );
1587 // PS -> _first_quant = 0;
1589 // PS -> /*planes_window::show_max_min_diameters
1591 // PS -> [ $widgets(image2D) GetRenderWindow ] Render
1593 // PS -> planes_window::draw3D_contour $index
1595 // PS -> set quant_data [ getValues_dll $index ]
1596 // PS -> set actual_area [ change_float_precision [ lindex $quant_data 0 ] 2 ]
1597 // PS -> set actual_peri [ change_float_precision [ lindex $quant_data 1 ] 2 ]
1598 // PS -> set actual_darea [ change_float_precision [ lindex $quant_data 2 ] 2 ]
1599 // PS -> set actual_dperi [ change_float_precision [ lindex $quant_data 3 ] 2 ]
1600 // PS -> set actual_dmax [ change_float_precision [ lindex $quant_data 4 ] 2 ]
1601 // PS -> set actual_dmin [ change_float_precision [ lindex $quant_data 5 ] 2 ]
1602 // PS -> set actual_davg [ change_float_precision [ lindex $quant_data 6 ] 2 ]
1603 // PS -> set i [ lsearch -exact $actual_quant_x $index ]
1604 // PS -> if { $i != -1 } {
1606 // PS -> set actual_quant_area [ lreplace $actual_quant_area $i $i $actual_area ]
1607 // PS -> set actual_quant_peri [ lreplace $actual_quant_peri $i $i $actual_peri ]
1608 // PS -> set actual_quant_darea [ lreplace $actual_quant_darea $i $i $actual_darea ]
1609 // PS -> set actual_quant_dperi [ lreplace $actual_quant_dperi $i $i $actual_dperi ]
1610 // PS -> set actual_quant_dmax [ lreplace $actual_quant_dmax $i $i $actual_dmax ]
1611 // PS -> set actual_quant_dmin [ lreplace $actual_quant_dmin $i $i $actual_dmin ]
1612 // PS -> set actual_quant_davg [ lreplace $actual_quant_davg $i $i $actual_davg ]
1613 // PS -> if { [ llength $actual_quant_sten ] > 0 } {
1615 // PS -> set actual_quant_sten [ getStenosisQuant_dll ]
1616 // PS -> set actual_sten [ change_float_precision [ lindex $actual_quant_sten [ expr $index - $real_first_point_quant ] ] 2 ]
1621 // PS -> planes_window::update_blt_all_meassures*/
1625 // PS -> void wxQuantificationWidget::OnClean_BT(wxCommandEvent& event)
1627 // PS -> /* this->CleanContour();*/
1632 //------------------------------------------------------------------------
1633 void wxQuantificationWidget::DetectHealthySickSlice( bool minSurf , bool maxSurf ){
1640 double maxStenosis = -9999999;
1641 double maxArea = -9999999;
1643 int healthySlice = 0;
1644 int sizeHealthyRegion = GetSizeHealthyRegion();
1645 int analysisTypeStenosis= GetAnalysisTypeStenosis();
1649 //ff = fopen("c:/temp/MaracasStadistics.txt","a+");
1650 //long int endtime = clock();
1651 //double sg = (double)(endtime-startTimeRI) / (double)CLK_TCK;
1652 //fprintf(ff,"EED %p wxQuantificationWidget::DetectHealthySickSlice > RI_t = %f \n",this,sg);
1656 //startTimeCalcule = clock();
1658 GetSliceLimites(0,startslice,endslice);
1660 if (startslice>endslice){
1662 endslice=startslice;
1667 if (minSurf==false) { backSlice = _sl_Slice->GetValue(); }
1669 for (iSlice=startslice; iSlice<=endslice;iSlice++){
1672 // this is equal to the minimum surface/diameter
1673 if (analysisTypeStenosis==1 ){ stenosis = GetStenosisDiameter(iSlice); }
1674 if (analysisTypeStenosis==2 ){ stenosis = GetStenosisArea(iSlice); }
1678 areaB = _mar->_experiment->getAverageArea(iSlice-sizeHealthyRegion,iSlice+sizeHealthyRegion);
1681 if ((stenosis>maxStenosis) &&(minSurf==true)){
1682 maxStenosis=stenosis;
1685 if ((areaB>maxArea) && (maxSurf==true)){
1687 healthySlice=iSlice;
1689 MoveSlider( iSlice );
1690 _sl_Slice->SetValue( iSlice );
1693 //ff = fopen("c:/temp/MaracasStadistics.txt","a+");
1694 //endtime = clock();
1695 //sg = (double)(endtime-startTimeCalcule) / (double)CLK_TCK;
1696 //fprintf(ff,"EED %p wxQuantificationWidget::DetectHealthySickSlice > t = %f ( %d , %d , %d )\n",this,sg,startslice,endslice, endslice-startslice);
1700 MoveSlider( sickSlice );
1701 _sl_Slice->SetValue( sickSlice );
1705 MoveSlider( healthySlice );
1706 _sl_Slice->SetValue( healthySlice );
1713 //------------------------------------------------------------------------
1714 void wxQuantificationWidget::AutoQuantification(){
1715 int analysisTypeStenosis = GetAnalysisTypeStenosis();
1716 int slice = _sl_Slice->GetValue();
1717 int healthySlice = _mar->_experiment->getAxis()->getHealthySlice( );
1718 int healthySliceStart = _mar->_experiment->getAxis()->getHealthySliceStart( );
1719 int healthySliceEnd = _mar->_experiment->getAxis()->getHealthySliceEnd( );
1720 double maxStenosis = -9999999;
1723 if (healthySlice !=-1 ) {
1724 int iSickSlice,startslice,endslice;
1725 GetSliceLimites(0,startslice,endslice);
1726 if (startslice>endslice){
1728 endslice=startslice;
1731 for (iSickSlice=startslice; iSickSlice<=endslice;iSickSlice++){
1732 if (analysisTypeStenosis==1 ){ ste = GetStenosisDiameter(iSickSlice); }
1733 if (analysisTypeStenosis==2 ){ ste = GetStenosisArea(iSickSlice); }
1734 if (ste>maxStenosis){
1738 MoveSlider( iSickSlice );
1739 _sl_Slice->SetValue( iSickSlice );
1741 MoveSlider( slice );
1742 _sl_Slice->SetValue( slice );
1744 wxMessageBox( "Set an healthy slice.\n \n ","DxMM : MARACAS", wxOK | wxCENTRE | wxICON_INFORMATION, this);
1749 //------------------------------------------------------------------------
1750 int wxQuantificationWidget::GetHealthySlice(){
1751 return _mar->_experiment->getAxis()->getHealthySlice( );
1753 //------------------------------------------------------------------------
1754 void wxQuantificationWidget::SetHealthySlice(int healthySlice){
1755 if (healthySlice==-1) {
1756 healthySlice=_sl_Slice->GetValue();
1758 int sizeHealthyRegion = GetSizeHealthyRegion();
1759 int maxSlider = GetMaxActualSlice();
1760 int healthySliceStart = healthySlice - sizeHealthyRegion;
1761 int healthySliceEnd = healthySlice + sizeHealthyRegion;
1762 if (healthySliceStart < 0) { healthySliceStart = 0; }
1763 if (healthySliceEnd < 0) { healthySliceEnd = 0; }
1764 if (healthySliceStart > maxSlider) { healthySliceStart = maxSlider; }
1765 if (healthySliceEnd > maxSlider) { healthySliceEnd = maxSlider; }
1766 _mar->_experiment->getAxis()->setHealthySlice( healthySliceStart, healthySlice , healthySliceEnd);
1768 _3DWorld->Set3DHealthySliceActor( );
1769 _3DWorld->Show3DHealthySliceActor();
1770 _cb_HealthySlice->SetValue(true);
1771 _3DWorld->InitListContourActor( 1, _mar->_experiment->getNumberOfSlices() );
1773 for ( iHealthySlice=healthySliceStart ; iHealthySlice<=healthySliceEnd ; iHealthySlice++){
1774 _3DWorld->Set3DContourActor( iHealthySlice , _mar->_experiment->get3Dcontour(iHealthySlice) , true ,1);
1780 //------------------------------------------------------------------------
1781 void wxQuantificationWidget::OnHealthySlice_BT(wxCommandEvent& event){
1782 SetHealthySlice( _sl_Slice->GetValue() );
1786 // PS -> void wxQuantificationWidget::OnCalculated_BT(wxCommandEvent& event)
1789 // PS -> _index = ( $widgets(sclSlice) get )
1791 // PS -> this->Clean_Contour();
1792 // PS -> _points = GetContourPoints();
1793 // PS -> _taille = _points->Item(2) / 2;
1795 // PS -> if ( _taille > 0 )
1797 // PS -> aPolygon2D = vtkPolygon::New();
1798 // PS -> PointsContour2D = vtkPoints::New();
1799 // PS -> aPolyLine2D = vtkPolyLine::New();
1801 // PS -> _PointIds = aPolyLine2D->GetPointIds();
1802 // PS -> _PointIds->SetNumberOfIds(_taille);
1803 // PS -> _PointIdsPolygon = aPolygon2D->GetPointIds();
1804 // PS -> _PointIdsPolygon->SetNumberOfIds(_taille);
1806 // PS -> for (int i=0; i< _taille ; i++ )
1808 // PS -> _PointIds->SetId(i, i);
1809 // PS -> _PointIdsPolygon->SetId(i, i);
1810 // PS -> PointsContour2D->InsertNextPoint( _points->Item(i * 2 + 0),
1811 // PS -> _points->Item(i * 2 + 1), 0 );
1815 // PS -> aPolyLineGrid2D = vtkUnstructuredGrid::New();
1816 // PS -> aPolyLineGrid2D->Allocate(1, 1);
1817 // PS -> _param1 = aPolyLine2D->GetCellType();
1818 // PS -> _param2 = aPolyLine2D->GetPointIds();
1819 // PS -> aPolyLineGrid2D->InsertNextCell(_param1, _param2);
1820 // PS -> aPolyLineGrid2D->SetPoints(PointsContour2D);
1822 // PS -> aPolyLineMapper2D = vtkDataSetMapper::New();
1823 // PS -> aPolyLineMapper2D->SetInput(aPolyLineGrid2D);
1825 // PS -> aPolyLineActor2D = vtkActor::New();
1826 // PS -> aPolyLineActor2D->SetMapper(aPolyLineMapper2D);
1827 // PS -> _Property1 = aPolyLineActor2D->GetProperty();
1828 // PS -> _Property1->SetColor(0, 1, 0);
1829 // PS -> _Property1->SetLineWidth(2);
1830 // PS -> _Property1->SetPointSize(2);
1831 // PS -> _Property1->BackfaceCullingOff();
1833 // PS -> _pRenderer2D->AddActor(aPolyLineActor2D);
1835 // PS -> aPolygonGrid2D = vtkUnstructuredGrid::New();
1836 // PS -> aPolygonGrid2D->Allocate(1, 1);
1837 // PS -> _param1 = aPolygon2D->GetCellType();
1838 // PS -> _param2 = aPolygon2D->GetPointIds();
1839 // PS -> aPolygonGrid2D->InsertNextCell(_param1, _param2);
1840 // PS -> aPolygonGrid2D->SetPoints(PointsContour2D);
1842 // PS -> aPolygonMapper2D = vtkDataSetMapper::New();
1843 // PS -> aPolygonMapper2D->SetInput(aPolygonGrid2D);
1845 // PS -> aPolygonActor2D = vtkActor::New();
1846 // PS -> aPolygonActor2D->SetMapper(aPolygonMapper2D);
1847 // PS -> _Property1 = aPolygonActor2D->GetProperty();
1848 // PS -> _Property1->SetColor(0, 1, 0);
1849 // PS -> _Property1->SetLineWidth(2);
1850 // PS -> _Property1->SetPointSize(2);
1851 // PS -> _Property1->BackfaceCullingOff();
1853 // PS -> int arr[] = this->Params(0);
1854 // PS -> if ( arr(_e_debug_fill_area) == 1 )
1855 // PS -> _pRenderer2D->AddActor(aPolygonActor2D);
1857 // PS -> _pRenderWindow3D->Render();
1858 // PS -> _pRenderWindow2D->Render();
1866 // PS -> void wxQuantificationWidget::OnPause_BT(wxCommandEvent& event)
1868 // PS -> if ( _quantifing == 1 ) {
1869 // PS -> _quantifing = 2;
1870 // PS -> _bt_Pause->SetLabel("Play");
1871 // PS -> _mar->_experiment->backQuant();
1873 // PS -> else if ( _quantifing == 2 )
1875 // PS -> _quantifing = 1;
1876 // PS -> _bt_Pause->SetLabel("Pause");
1881 // PS -> void wxQuantificationWidget::OnDelete_BT(wxCommandEvent& event)
1884 // PS -> wxMessageDialog* Q_erase = new wxDialog(this,
1885 // PS -> _str_erase_quant_q,
1886 // PS -> "Question",
1887 // PS -> wxYES_NO|wxNO_DEFAULT|wxCENTRE,
1888 // PS -> wxPoint(100, 100));
1890 // PS -> if (Q_erase->ShowModal() == wxID_OK)
1892 // PS -> _first_quant = 1;
1893 // PS -> _real_first_point_quant = -1;
1894 // PS -> _real_last_point_quant = -1;
1895 // PS -> this->controls(1);
1896 // PS -> _quant_shown = false;
1898 // PS -> this->clean_graph();
1900 // PS -> if (_pRenderer3D != 0) _pRenderer3D->RemoveActor(hs_actor);
1901 // PS -> if (_hs_actor != 0) hs_actor->delete();
1902 // PS -> if (_hs_mapper != 0) hs_mapper->delete();
1903 // PS -> if (_hs_grid != 0) hs_grid->delete();
1904 // PS -> if (_hs_points != 0) hs_points->delete();
1905 // PS -> if (_hs_poly_line != 0) hs_poly_line->delete();
1907 // PS -> foreach i $rings_index
1910 // PS -> catch { renderer_$widgets(work3D) RemoveActor cont3DActor_{$widgets(work3D)}_{$i} }
1911 // PS -> catch { cont3DActor_{$widgets(work3D)}_{$i} Delete }
1912 // PS -> catch { cont3DMapper_{$widgets(work3D)}_{$i} Delete }
1913 // PS -> catch { cont3DGrid_{$widgets(work3D)}_{$i} Delete }
1914 // PS -> catch { cont3DPolyLine_{$widgets(work3D)}_{$i} Delete }
1915 // PS -> catch { cont3DPoints_{$widgets(work3D)}_{$i} Delete }
1918 // PS -> _rings_index = _list;
1919 // PS -> _quant_x = _list;
1920 // PS -> _quant_area = _list;
1921 // PS -> _quant_peri = _list;
1922 // PS -> _quant_darea = _list;
1923 // PS -> _quant_dperi = _list;
1924 // PS -> _quant_dmax = _list;
1925 // PS -> _quant_dmin = _list;
1926 // PS -> _quant_davg = _list;
1927 // PS -> _quant_sten = _list;
1929 // PS -> _area = 0.00;
1930 // PS -> _peri = 0.00;
1931 // PS -> _darea = 0.00;
1932 // PS -> _dperi = 0.00;
1933 // PS -> _dmax = 0.00;
1934 // PS -> _dmin = 0.00;
1935 // PS -> _davg = 0.00;
1936 // PS -> _sten = 0.00;
1937 // PS -> _shown = false;
1939 // PS -> _pRenderWindow3D->Render();
1940 // PS -> this->clean_contour();
1942 // PS -> wxMessageDialog* Q_extract = new wxDialog(this,
1943 // PS -> _str_erase_extracted_contours,
1944 // PS -> "Question",
1945 // PS -> wxYES_NO|wxNO_DEFAULT|wxCENTRE,
1946 // PS -> wxPoint(100, 100));
1948 // PS -> if (Q_extract->ShowModal() == wxID_OK)
1949 // PS -> this->cleanData();
1951 // PS -> delete Q_extract;
1954 // PS -> delete Q_erase;
1961 // PS -> void wxQuantificationWidget::OnSetPoint_BT(wxCommandEvent& event)
1963 // PS -> //set slice = [ $widgets(sclSlice) get ]
1964 // PS -> //this->select_axis_point( 0, 0, $slice
1969 //--------------------------------------------------------------------
1971 void wxQuantificationWidget::OnHealthySlice_CB(wxCommandEvent& event)
1974 /* if ( _show_hs == 1 ) {
1975 if ( _pRenderer3D != 0 )
1976 _pRenderer3D->AddActor(_hsActor3D);
1980 if ( _pRenderer3D != 0 )
1981 _pRenderer3D->RemoveActor(_hsActor3D);
1984 _pRenderWindow3D->Render(); // Maj*/
1987 int healthySlice = _mar->_experiment->getAxis( )->getHealthySlice( );
1988 if (healthySlice!=-1) {
1989 if ( _cb_HealthySlice->GetValue() )
1990 _3DWorld->Show3DHealthySliceActor();
1992 _3DWorld->Hide3DHealthySliceActor();
1997 //--------------------------------------------------------------------
1998 void wxQuantificationWidget::OnVisibleRing_CB(wxCommandEvent& event){
1999 if ( _cb_VisibleRings->GetValue() ){
2000 _3DWorld->Show3DContourActor();
2001 _2DWorld->Show2DContourDiameters();
2004 _3DWorld->Hide3DContourActor();
2005 _2DWorld->Hide2DContourDiameters();
2008 // GetNumberOfAxisPoints()
2009 /* int noap = _mar->_experiment->getNumberOfAxes();
2010 for (int i= 0; i < noap; i++ ) {
2011 if ( _show_rings == 0 ) {
2012 if ( _pRenderer3D != 0 )
2013 _pRenderer3D->RemoveActor(_contActor3D[i]);
2016 if ( _pRenderer3D != 0 )
2017 _pRenderer3D->AddActor(_contActor3D[i]);
2020 _pRenderWindow3D->Render(); // Maj*/
2022 //--------------------------------------------------------------------
2023 void wxQuantificationWidget::OnPerpendicular_CB(wxCommandEvent& event)
2025 if ( _cb_Perpendicular->GetValue() )
2026 _3DWorld->Show3DSliceActor();
2028 _3DWorld->Hide3DSliceActor();
2030 //--------------------------------------------------------------------
2032 void wxQuantificationWidget::OnGreyScale_RB(wxCommandEvent& event){
2033 if ( _rb_GreyScale->GetValue() ){
2034 _3DWorld->SetBWLookUp();
2037 //--------------------------------------------------------------------
2038 void wxQuantificationWidget::OnColor_RB(wxCommandEvent& event){
2039 if ( _rb_Color->GetValue() ){
2040 _3DWorld->SetColorLookUp();
2043 //--------------------------------------------------------------------
2044 void wxQuantificationWidget::CallBackOnLeftDClick( wxMouseEvent& event ){
2046 double pp[3], cp[3];
2047 _3DWorld->GetLast3DClickPoint(pp,cp);
2049 int i,iback,maxPoints;
2051 double dist,distMin=-1;
2054 marAxis *maraxis = _mar->_experiment->getAxis( );
2055 maxPoints = maraxis->getNumberOfSplinePoints();
2056 for ( i=0 ; i<maxPoints ; i++ ){
2057 c = maraxis->getSplinePoint(i);
2061 dist=sqrt( cc[0]*cc[0] + cc[1]*cc[1] + cc[2]*cc[2] );
2062 if ((distMin==-1) || (dist<distMin)) {
2067 _sl_Slice->SetValue(iback);
2072 //--------------------------------------------------------------------
2073 void wxQuantificationWidget::CallBackOnMouseWheel( wxMouseEvent& event ){
2074 int slice=_sl_Slice->GetValue();
2075 if (event.GetWheelRotation()>0){ slice++; }
2076 if (event.GetWheelRotation()<0){ slice--; }
2077 if (slice < _sl_Slice->GetMin() ) { slice=_sl_Slice->GetMin(); }
2078 if (slice > _sl_Slice->GetMax() ) { slice=_sl_Slice->GetMax(); }
2079 _sl_Slice->SetValue(slice);
2082 //--------------------------------------------------------------------
2083 int wxQuantificationWidget::GetActualSlice(){
2084 return _sl_Slice->GetValue();
2086 //--------------------------------------------------------------------
2087 int wxQuantificationWidget::GetMaxActualSlice(){
2088 return _sl_Slice->GetMax();
2090 //--------------------------------------------------------------------
2091 int wxQuantificationWidget::GetSizeHealthyRegion(){
2092 return _sizeHealthyRegion;
2094 //--------------------------------------------------------------------
2095 void wxQuantificationWidget::SetSizeHealthyRegion(int size){
2096 _sizeHealthyRegion = size;
2098 //--------------------------------------------------------------------
2099 void wxQuantificationWidget::GetHealthySliceRange(int &healthySliceStart,int &healthySliceEnd){
2100 healthySliceStart = _mar->_experiment->getAxis()->getHealthySliceStart( );
2101 healthySliceEnd = _mar->_experiment->getAxis()->getHealthySliceEnd( );
2103 //--------------------------------------------------------------------
2104 void wxQuantificationWidget::Set3DRegionSliceActor( int type, int k1,int k2 ){
2105 _3DWorld->Set3DRegionSliceActor(type,k1,k2);
2107 //--------------------------------------------------------------------
2108 void wxQuantificationWidget::Set3DStartRegionSliceActor( int type, int k){
2109 _3DWorld->Set3DStartRegionSliceActor(type,k);
2111 //--------------------------------------------------------------------
2112 void wxQuantificationWidget::Set3DEndRegionSliceActor( int type, int k){
2113 _3DWorld->Set3DEndRegionSliceActor(type,k);
2115 //--------------------------------------------------------------------
2116 void wxQuantificationWidget::Show3DRegionSliceActor( int type ){
2117 _3DWorld->Show3DRegionSliceActor(type);
2119 //--------------------------------------------------------------------
2120 void wxQuantificationWidget::Show3DStartRegionSliceActor( int type ){
2121 _3DWorld->Show3DStartRegionSliceActor(type);
2123 //--------------------------------------------------------------------
2124 void wxQuantificationWidget::Show3DEndRegionSliceActor( int type ){
2125 _3DWorld->Show3DEndRegionSliceActor(type);
2127 //--------------------------------------------------------------------
2128 void wxQuantificationWidget::Hide3DRegionSliceActor( int type ){
2129 _3DWorld->Hide3DRegionSliceActor(type);
2131 //--------------------------------------------------------------------
2132 void wxQuantificationWidget::Hide3DStartRegionSliceActor( int type ){
2133 _3DWorld->Hide3DStartRegionSliceActor(type);
2135 //--------------------------------------------------------------------
2136 void wxQuantificationWidget::Hide3DEndRegionSliceActor( int type ){
2137 _3DWorld->Hide3DEndRegionSliceActor(type);
2139 //--------------------------------------------------------------------
2140 void wxQuantificationWidget::GetSliceLimites(int type, int &sliceStart, int &sliceEnd){
2141 _3DWorld->GetSliceLimites(type,sliceStart,sliceEnd);
2143 //--------------------------------------------------------------------
2144 int wxQuantificationWidget::GetAnalysisTypeStenosis(){
2145 return _3DWorld->GetAnalysisTypeStenosis();
2147 //--------------------------------------------------------------------
2148 void wxQuantificationWidget::SetAnalysisTypeStenosis(int analysisTypeStenosis){
2149 _3DWorld->SetAnalysisTypeStenosis(analysisTypeStenosis);
2151 //--------------------------------------------------------------------
2152 void wxQuantificationWidget::SetManualContour_2DWorld(bool ok){
2155 _2DWorld->SetState(1);
2156 _2DWorld->EraseManualContour();
2159 _2DWorld->SetState(2);
2160 _2DWorld->CreateNewManualContour();
2166 //--------------------------------------------------------------------
2167 void wxQuantificationWidget::SetManualContour_AddPoint_2DWorld(){
2168 _bak_ActualSlice = _sl_Slice->GetValue();
2169 _2DWorld->Hide2DContourDiameters();
2170 _mar->_experiment->getAxis()->EraseContour(_bak_ActualSlice);
2171 _3DWorld->Erase3DContourActor( _bak_ActualSlice );
2173 _2DWorld->SetStateManualContour(0);
2175 //--------------------------------------------------------------------
2176 void wxQuantificationWidget::SetManualContour_InsertPoint_2DWorld(){
2177 _2DWorld->SetStateManualContour(2);
2179 //--------------------------------------------------------------------
2180 void wxQuantificationWidget::SetManualContour_ErasePoint_2DWorld(){
2181 _2DWorld->SetStateManualContour(3);
2183 //--------------------------------------------------------------------
2184 void wxQuantificationWidget::SetManualContour_MovePoint_2DWorld(){
2185 _2DWorld->SetStateManualContour(4);
2187 //--------------------------------------------------------------------
2188 void wxQuantificationWidget::SetManualContour_ReplaceContour(){
2189 if (_bak_ActualSlice!=-1){
2190 int size = _2DWorld->GetNumberOfPointsSplineManualContour();
2191 double *vx = _2DWorld->GetVectorPointsXManualContour();
2192 double *vy = _2DWorld->GetVectorPointsYManualContour();
2193 _mar->_experiment->getAxis()->replaceContour2D(_bak_ActualSlice,size,vx,vy);
2197 _bak_ActualSlice=-1;
2200 //------------------------------------------------------------------------
2201 kVolume* wxQuantificationWidget::GetVolumeAxisExtended(int wz1,int wz2)
2204 vtkImageData *imagedata;
2205 imagedata=_mar->_experiment->getSliceImage(wz1);
2207 imagedata->GetDimensions (dims);
2211 kVolume *kvol =new kVolume( kVolume::USHORT, wx, wy, wz,1, 1, 1, malloc(sizeof(unsigned short)*wx*wy*wz ) );
2212 vtkImageData *vol = kvol->castVtk();
2216 for (i=wz1;i<=wz2;i++)
2219 imagedata=_mar->_experiment->getSliceImage(i);
2222 void *p_imagedata = imagedata->GetScalarPointer(0,0,0);
2223 void *p_vol = vol->GetScalarPointer(0,0,i-wz1);
2224 memcpy( p_vol, p_imagedata , sizeof(unsigned short)*dims[0]*dims[1] );
2230 //------------------------------------------------------------------------
2231 void wxQuantificationWidget::OnContourWall()
2235 //------------------------------------------------------------------------
2236 void wxQuantificationWidget::OnContourLumen()
2240 //------------------------------------------------------------------------
2241 void wxQuantificationWidget::OnContourHypo()
2245 //------------------------------------------------------------------------
2246 void wxQuantificationWidget::OnContourCalc()
2250 //------------------------------------------------------------------------
2251 void wxQuantificationWidget::OnReplaceContourWall()
2254 //------------------------------------------------------------------------
2255 void wxQuantificationWidget::OnReplaceContourLumen()
2258 //------------------------------------------------------------------------
2259 void wxQuantificationWidget::OnReplaceContourHypo()
2263 //------------------------------------------------------------------------
2264 void wxQuantificationWidget::OnReplaceContourCalc()
2269 //------------------------------------------------------------------------
2270 void wxQuantificationWidget::OnSliderDiscontinuityScroll(int percentage)
2274 //------------------------------------------------------------------------
2275 void wxQuantificationWidget::OnSliderLumenPercentageScroll(int percentage)
2279 //------------------------------------------------------------------------
2280 void wxQuantificationWidget::OnSliderCalcPercentageScroll(int percentage)
2284 //------------------------------------------------------------------------
2285 void wxQuantificationWidget::OnCalibration()
2288 //------------------------------------------------------------------------
2289 void wxQuantificationWidget::OnFile()
2293 //------------------------------------------------------------------------
2294 void wxQuantificationWidget::OnShowAll(bool value)
2298 //------------------------------------------------------------------------
2299 void wxQuantificationWidget::OnShowWall(bool value)
2302 //------------------------------------------------------------------------
2303 void wxQuantificationWidget::OnShowLumen(bool value)
2307 //------------------------------------------------------------------------
2308 void wxQuantificationWidget::OnShowCalc(bool value)
2312 //------------------------------------------------------------------------
2313 void wxQuantificationWidget::OnShowHypo(bool value)
2318 // EOF - wxQuantificationWidget.cxx