3 /*=========================================================================
6 Module: $RCSfile: wxQuantificationWidget.cxx,v $
8 Date: $Date: 2008/10/31 16:32:43 $
9 Version: $Revision: 1.1 $
11 Copyright: (c) 2002, 2003
14 This software is distributed WITHOUT ANY WARRANTY; without even
15 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 PURPOSE. See the above copyright notice for more information.
18 =========================================================================*/
20 #include "wxQuantificationWidget.h"
21 #include "../marDictionary.h"
22 //#include "../wxMaracasMPR.h"
26 //#include <wx/notebook.h>
30 //------------------------------------------------------------------------
31 //------------------------------------------------------------------------
32 //------------------------------------------------------------------------
33 BEGIN_EVENT_TABLE( wxQuantificationWidget, wxPanel )
34 EVT_BUTTON(ID_BUTTON_CONTOUR , wxQuantificationWidget::OnContour_BT )
35 EVT_BUTTON(ID_BUTTON_CLEAN , wxQuantificationWidget::OnClean_BT )
36 EVT_BUTTON(ID_BUTTON_CLEAN_ALL , wxQuantificationWidget::OnCleanAll_BT )
37 EVT_BUTTON(ID_BUTTON_SAVE_CONTOURS3D, wxQuantificationWidget::OnSaveContours3D_BT )
39 // EVT_BUTTON(ID_BUTTON_HEALTHY, wxQuantificationWidget::OnHealthySlice_BT )
41 // PS -> EVT_BUTTON(ID_BUTTON_CALCULATED, wxQuantificationWidget::OnCalculated_BT )
42 // PS -> EVT_BUTTON(ID_BUTTON_PAUSE, wxQuantificationWidget::OnPause_BT )
43 // PS -> EVT_BUTTON(ID_BUTTON_DELETE, wxQuantificationWidget::OnDelete_BT )
44 // PS -> EVT_BUTTON(ID_BUTTON_POINT, wxQuantificationWidget::OnSetPoint_BT )
46 EVT_CHECKBOX(ID_CHECKBOX_HEALTHY, wxQuantificationWidget::OnHealthySlice_CB )
47 EVT_CHECKBOX(ID_CHECKBOX_SHOW_SURFACE, wxQuantificationWidget::OnShowSurface_CB )
48 EVT_CHECKBOX(ID_CHECKBOX_VISIBLE_RINGS, wxQuantificationWidget::OnVisibleRing_CB )
49 EVT_CHECKBOX(ID_CHECKBOX_PERPENDICULAR, wxQuantificationWidget::OnPerpendicular_CB )
51 EVT_RADIOBUTTON(ID_RADIOBUTTON_GREYSCALE, wxQuantificationWidget::OnGreyScale_RB )
52 EVT_RADIOBUTTON(ID_RADIOBUTTON_COLOR, wxQuantificationWidget::OnColor_RB )
54 EVT_COMMAND_SCROLL(ID_SLIDER_SLICE, wxQuantificationWidget::OnSliderSliceScroll )
56 EVT_COMMAND_SCROLL(ID_SLIDER_OPACITY, wxQuantificationWidget::OnSliderOpacityScroll )
57 EVT_COMMAND_SCROLL_THUMBRELEASE(ID_SLIDER_ISOVALUE, wxQuantificationWidget::OnSliderIsovalueScroll )
61 //--------------------------------------------------------------------------------
63 //--------------------------------------------------------------------------------
64 wxQuantificationWidget::wxQuantificationWidget(wxWindow* parent, wxWindowID id,
65 const wxPoint& pos, const wxSize& size, long style,
67 : wxQuantificationWidget_base( parent, id, pos, size, style, name )
69 panel_splitter = new wxSplitterWindow( this , -1, wxDefaultPosition, wxSize(400,400 ), wxSP_3D | wxSP_LIVE_UPDATE | wxCLIP_CHILDREN );
70 // panel_left = new wxPanel(panel_splitter , -1, wxDefaultPosition, wxSize(400,400));
71 panel_right = new wxPanel(panel_splitter , -1, wxDefaultPosition, wxSize(400,400));
73 panel_splitter_left = new wxSplitterWindow( panel_splitter , -1, wxDefaultPosition, wxSize(400,400 ), wxSP_3D | wxSP_LIVE_UPDATE | wxCLIP_CHILDREN );
74 panel_left_up = new wxPanel(panel_splitter_left , -1, wxDefaultPosition, wxSize(200,200));
75 panel_left_down = new wxPanel(panel_splitter_left , -1, wxDefaultPosition, wxSize(200,200));
78 panel_splitter_right = new wxSplitterWindow( panel_right , -1, wxDefaultPosition, wxSize(400,400 ), wxSP_3D | wxSP_LIVE_UPDATE | wxCLIP_CHILDREN );
79 panel_right_up = new wxPanel(panel_splitter_right , -1, wxDefaultPosition, wxSize(200,200));
80 panel_right_down = new wxPanel(panel_splitter_right , -1, wxDefaultPosition, wxSize(200,200));
86 SetSizeHealthyRegion( 5 );
89 // this->SetBackgroundColour(*wxLIGHT_GREY);
91 _3DWorld = new vtk3DQuantSurfaceWidget( panel_left_up, ID_QUANTIF3D );
92 _3DWorld->SetInterfaceVtkPanelWidgets(this);
94 _2DWorld = new vtk2DQuantSliceWidget( panel_right_up, -1 );
95 _2DWorld->SetSize(800,800);
96 _2DWorld->SetInterfaceVtkPanelWidgets(this);
107 //startTimeRI = clock();
112 //--------------------------------------------------------------------------------
114 // ----------------------------------------------------------------------------
115 wxQuantificationWidget::~wxQuantificationWidget( )
121 // ----------------------------------------------------------------------------
122 wxPanel* wxQuantificationWidget::CreateStenosisPanel(){
123 marDictionary marDict;
125 wxPanel* panel = new wxPanel(panel_right_down);
127 _st_Label100 = new wxStaticText(panel, -1, wxString(marDict.GetString(255), wxConvUTF8) ); // "Stenosis (area)"
128 _st_Label101 = new wxStaticText(panel, -1, wxString(marDict.GetString(260), wxConvUTF8) ); // "Stenosis (diameter)"
129 // _st_Label102 = new wxStaticText(panel, -1, " < Area (mm^2) > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
130 // _st_Label103 = new wxStaticText(panel, -1, " < Perimeter (mm) > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
131 // _st_Label104 = new wxStaticText(panel, -1, " < Diameter (mm) from Area > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
132 // _st_Label105 = new wxStaticText(panel, -1, " < Diameter (mm) from Perimeter > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
133 // _st_Label106 = new wxStaticText(panel, -1, " < Minimum Diameter (mm) > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
134 // _st_Label107 = new wxStaticText(panel, -1, " < Maximum Diameter (mm) > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
135 // _st_Label108 = new wxStaticText(panel, -1, " < Avarege Diameter (mm) > Stenosis : ",wxPoint(0,0),wxDefaultSize,wxALIGN_RIGHT );
137 _st_Value100 = new wxStaticText(panel, -1, _T("-- ") );
138 _st_Value101 = new wxStaticText(panel, -1, _T("-- ") );
139 // _st_Value102 = new wxStaticText(panel, -1, "--");
140 // _st_Value103 = new wxStaticText(panel, -1, "--");
141 // _st_Value104 = new wxStaticText(panel, -1, "--");
142 // _st_Value105 = new wxStaticText(panel, -1, "--");
143 // _st_Value106 = new wxStaticText(panel, -1, "--");
144 // _st_Value107 = new wxStaticText(panel, -1, "--");
145 // _st_Value108 = new wxStaticText(panel, -1, "--");
148 // wxStaticText *_st_LabelBlanc = new wxStaticText(panel, -1, " ");
149 // _st_LabelBlanc->SetBackgroundColour(*wxLIGHT_GREY);
152 // panel->SetBackgroundColour(wxColour(100,0,100));
153 // _st_Label100->SetBackgroundColour(*wxLIGHT_GREY);
154 // _st_Label101->SetBackgroundColour(*wxLIGHT_GREY);
159 // _st_Label102->SetBackgroundColour(*wxLIGHT_GREY);
160 // _st_Label103->SetBackgroundColour(*wxLIGHT_GREY);
161 // _st_Label104->SetBackgroundColour(*wxLIGHT_GREY);
162 // _st_Label105->SetBackgroundColour(*wxLIGHT_GREY);
163 // _st_Label106->SetBackgroundColour(*wxLIGHT_GREY);
164 // _st_Label107->SetBackgroundColour(*wxLIGHT_GREY);
165 // _st_Label108->SetBackgroundColour(*wxLIGHT_GREY);
169 // _st_Value100->SetBackgroundColour(*wxLIGHT_GREY);
170 // _st_Value101->SetBackgroundColour(*wxLIGHT_GREY);
173 // _st_Value102->SetBackgroundColour(*wxLIGHT_GREY);
174 // _st_Value103->SetBackgroundColour(*wxLIGHT_GREY);
175 // _st_Value104->SetBackgroundColour(*wxLIGHT_GREY);
176 // _st_Value105->SetBackgroundColour(*wxLIGHT_GREY);
177 // _st_Value106->SetBackgroundColour(*wxLIGHT_GREY);
178 // _st_Value107->SetBackgroundColour(*wxLIGHT_GREY);
179 // _st_Value108->SetBackgroundColour(*wxLIGHT_GREY);
181 wxFont font(14,wxDEFAULT ,wxNORMAL,wxBOLD);
182 // _st_Label100->SetFont(font);
183 // _st_Label101->SetFont(font);
184 _st_Value100->SetFont(font);
185 _st_Value101->SetFont(font);
189 wxGridSizer* gridSizer1 = new wxFlexGridSizer(1);
190 gridSizer1->Add( new wxStaticText(panel, -1, _T(" ")) ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
191 gridSizer1->Add(_st_Value100 ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
192 gridSizer1->Add(_st_Label100 ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
193 gridSizer1->Add( new wxStaticText(panel, -1, _T(" ")) ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
194 gridSizer1->Add(_st_Value101 ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
195 gridSizer1->Add(_st_Label101 ,15, wxALL|wxEXPAND|wxALIGN_CENTRE_HORIZONTAL, 0);
199 // gridSizer->Add(_st_LabelBlanc);
200 // gridSizer->Add(_st_LabelBlanc);
201 // gridSizer->Add(_st_LabelBlanc);
202 // gridSizer->Add(_st_LabelBlanc);
203 // gridSizer->Add(_st_Label102);
204 // gridSizer->Add(_st_Value102);
205 // gridSizer->Add(_st_LabelBlanc);
206 // gridSizer->Add(_st_LabelBlanc);
207 // gridSizer->Add(_st_Label103);
208 // gridSizer->Add(_st_Value103);
209 // gridSizer->Add(_st_LabelBlanc);
210 // gridSizer->Add(_st_LabelBlanc);
211 // gridSizer->Add(_st_Label104);
212 // gridSizer->Add(_st_Value104);
213 // gridSizer->Add(_st_LabelBlanc);
214 // gridSizer->Add(_st_LabelBlanc);
215 // gridSizer->Add(_st_Label105);
216 // gridSizer->Add(_st_Value105);
217 // gridSizer->Add(_st_LabelBlanc);
218 // gridSizer->Add(_st_LabelBlanc);
219 // gridSizer->Add(_st_Label106);
220 // gridSizer->Add(_st_Value106);
221 // gridSizer->Add(_st_LabelBlanc);
222 // gridSizer->Add(_st_LabelBlanc);
223 // gridSizer->Add(_st_Label107);
224 // gridSizer->Add(_st_Value107);
225 // gridSizer->Add(_st_LabelBlanc);
226 // gridSizer->Add(_st_LabelBlanc);
227 // gridSizer->Add(_st_Label108);
228 // gridSizer->Add(_st_Value108);
230 wxGridSizer* gridSizer = new wxFlexGridSizer(4);
231 gridSizer->Add( new wxStaticText(panel, -1, _T(" ")) ,15, wxALIGN_LEFT , 50);
232 gridSizer->Add( new wxStaticText(panel, -1, _T(" ")) ,15, wxALIGN_LEFT , 50);
233 gridSizer->Add( new wxStaticText(panel, -1, _T(" ")) ,15, wxALIGN_LEFT , 50);
234 gridSizer->Add(gridSizer1 ,15, wxALIGN_LEFT , 50);
236 panel->SetAutoLayout(true);
237 panel->SetSizer(gridSizer);
241 // panel->SetBackgroundColour(*wxLIGHT_GREY);
243 panel->SetSize(400,300);
244 panel->SetSize( gridSizer->GetMinSize() );
249 //--------------------------------------------------------
251 void wxQuantificationWidget::Set_control(){
252 marDictionary marDict;
257 //_Chart = new wxChart( this, ID_QUANTIF3D );
258 //_Chart->SetMaxWidthHeight(500,300);
259 //_Chart->SetBackgroundColour(*wxWHITE);
261 _wxStenosisPanel = CreateStenosisPanel();
264 // PS -> _bt_Point = new wxButton( this, ID_BUTTON_POINT, "Point...",
265 // PS -> wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
266 // _bt_Healthy = new wxButton( panel_left, ID_BUTTON_HEALTHY, "Healthy Slice",
267 // wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
271 // PS -> _bt_ContourCalculated = new wxButton( this, ID_BUTTON_CALCULATED, "Contour calculated",
272 // PS -> wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
273 // PS -> _bt_Pause = new wxButton( this, ID_BUTTON_PAUSE, "Pause",
274 // PS -> wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
275 // PS -> _bt_Delete = new wxButton( this, ID_BUTTON_DELETE, "Delete Quantification",
276 // PS -> wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
281 _cb_HealthySlice = new wxCheckBox( panel_left_down, ID_CHECKBOX_HEALTHY, wxString(marDict.GetString(205), wxConvUTF8)); // "Healthy slice"
282 _cb_HealthySlice->SetValue(true);
284 // _cb_HealthySlice->SetBackgroundColour(*wxLIGHT_GREY);
285 _cb_Perpendicular = new wxCheckBox( panel_left_down, ID_CHECKBOX_PERPENDICULAR, wxString(marDict.GetString(210), wxConvUTF8)); //"Perpendicular section"
286 _cb_Perpendicular->SetValue(true);
288 // _cb_Perpendicular->SetBackgroundColour(*wxLIGHT_GREY);
290 _rb_GreyScale = new wxRadioButton( panel_left_down, ID_RADIOBUTTON_GREYSCALE, wxString(marDict.GetString(230), wxConvUTF8), wxDefaultPosition,wxDefaultSize,wxRB_GROUP ); //"greyscale "
291 _rb_GreyScale->SetValue(true);
293 // _rb_GreyScale->SetBackgroundColour(*wxLIGHT_GREY);
295 _rb_Color = new wxRadioButton( panel_left_down, ID_RADIOBUTTON_COLOR, wxString(marDict.GetString(235), wxConvUTF8), wxDefaultPosition,wxDefaultSize );//"color "
296 _rb_Color->SetValue(false);
298 // _rb_Color->SetBackgroundColour(*wxLIGHT_GREY);
300 _cb_VisibleRings = new wxCheckBox( panel_left_down, ID_CHECKBOX_VISIBLE_RINGS, wxString(marDict.GetString(215), wxConvUTF8));//"Visible rings"
301 _cb_VisibleRings->SetValue(true);
303 // _cb_VisibleRings->SetBackgroundColour(*wxLIGHT_GREY);
304 _cb_ShowSurface = new wxCheckBox( panel_left_down, ID_CHECKBOX_SHOW_SURFACE, wxString(marDict.GetString(220), wxConvUTF8));//"Show Surface"
305 _cb_ShowSurface->SetValue(true);
307 // _cb_ShowSurface->SetBackgroundColour(*wxLIGHT_GREY);
310 _bt_AddContour3D = new wxButton( panel_left_down, ID_BUTTON_CONTOUR, wxString(marDict.GetString(245), wxConvUTF8) ,//"Add mark contour"
311 wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
312 _bt_CleanContour3D = new wxButton( panel_left_down, ID_BUTTON_CLEAN, wxString(marDict.GetString(250), wxConvUTF8) ,//"Erase mark contours"
313 wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
315 _bt_CleanAllContours3D = new wxButton( panel_left_down, ID_BUTTON_CLEAN_ALL, wxString(marDict.GetString(253), wxConvUTF8) ,//"Erase all mark contours"
316 wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
318 _bt_SaveContours3D = new wxButton( panel_left_down, ID_BUTTON_SAVE_CONTOURS3D, wxString(marDict.GetString(248), wxConvUTF8) ,//"Save contours 3D"
319 wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
322 _sl_Slice = new wxSlider( panel_left_down, ID_SLIDER_SLICE , 0, 0, 10000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS );
323 _sl_Isovalue = new wxSlider( panel_left_down, ID_SLIDER_ISOVALUE, 0, 0, 10000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS );
324 _sl_Opacity = new wxSlider( panel_left_down, ID_SLIDER_OPACITY , 0, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS );
326 // _sl_Slice->SetBackgroundColour(*wxLIGHT_GREY);
327 // _sl_Isovalue->SetBackgroundColour(*wxLIGHT_GREY);
328 // _sl_Opacity->SetBackgroundColour(*wxLIGHT_GREY);
331 _sl_Slice->SetSize(1800,16);
332 _sl_Isovalue->SetSize(300,16);
333 _sl_Opacity->SetSize(300,16);
336 _st_Slice = new wxStaticText(panel_left_down, -1, wxString(marDict.GetString(90), wxConvUTF8) ); //"Slice "
337 _st_Isovalue = new wxStaticText(panel_left_down, -1, wxString(marDict.GetString(240), wxConvUTF8) ); //"Isovalue"
338 _st_Opacity = new wxStaticText(panel_left_down, -1, wxString(marDict.GetString(225), wxConvUTF8) ); //"Opacity "
340 // _st_Slice->SetBackgroundColour(*wxLIGHT_GREY);
341 // _st_Isovalue->SetBackgroundColour(*wxLIGHT_GREY);
342 // _st_Opacity->SetBackgroundColour(*wxLIGHT_GREY);
345 // _st_Label0 = new wxStaticText(this, -1, "Partial Axis Lenght");
346 // _st_Value0 = new wxStaticText(this, -1, "0.00");
347 // _st_Label0->SetBackgroundColour(*wxLIGHT_GREY);
348 // _st_Value0->SetBackgroundColour(*wxLIGHT_GREY);
349 _st_Label1 = new wxStaticText(this, -1, wxString(marDict.GetString(380), wxConvUTF8) ); //"Total Axis Lenght"
350 _st_Value1 = new wxStaticText(this, -1, _T("0.00"));
353 // _st_Label1->SetBackgroundColour(*wxLIGHT_GREY);
354 // _st_Value1->SetBackgroundColour(*wxLIGHT_GREY);
356 _st_Label2 = new wxStaticText(this, -1, wxString(marDict.GetString(390), wxConvUTF8) );//"Area"
357 _st_Value2 = new wxStaticText(this, -1, _T("0.00"));
359 // _st_Label2->SetBackgroundColour(*wxLIGHT_GREY);
360 // _st_Value2->SetBackgroundColour(*wxLIGHT_GREY);
362 _st_Label3 = new wxStaticText(this, -1, wxString(marDict.GetString(400), wxConvUTF8) );//"Perimeter"
363 _st_Value3 = new wxStaticText(this, -1, _T("0.00") );
365 // _st_Label3->SetBackgroundColour(*wxLIGHT_GREY);
366 // _st_Value3->SetBackgroundColour(*wxLIGHT_GREY);
369 // _st_Label4 = new wxStaticText(this, -1, "Diameter from area");
370 // _st_Value4 = new wxStaticText(this, -1, "0.00");
371 // _st_Label4->SetBackgroundColour(*wxLIGHT_GREY);
372 // _st_Value4->SetBackgroundColour(*wxLIGHT_GREY);
373 // _st_Label5 = new wxStaticText(this, -1, "Diameter from perimeter");
374 // _st_Value5 = new wxStaticText(this, -1, "0.00");
375 // _st_Label5->SetBackgroundColour(*wxLIGHT_GREY);
376 // _st_Value5->SetBackgroundColour(*wxLIGHT_GREY);
377 _st_Label6 = new wxStaticText(this, -1, wxString(marDict.GetString(405), wxConvUTF8) );//"Minimum Diameter"
378 _st_Value6 = new wxStaticText(this, -1, _T("0.00"));
380 // _st_Label6->SetBackgroundColour(*wxLIGHT_GREY);
381 // _st_Value6->SetBackgroundColour(*wxLIGHT_GREY);
382 _st_Label7 = new wxStaticText(this, -1, wxString(marDict.GetString(410), wxConvUTF8) );//"Maximum Diameter"
383 _st_Value7 = new wxStaticText(this, -1, _T("0.00"));
385 // _st_Label7->SetBackgroundColour(*wxLIGHT_GREY);
386 // _st_Value7->SetBackgroundColour(*wxLIGHT_GREY);
387 _st_Label8 = new wxStaticText(this, -1, wxString(marDict.GetString(415), wxConvUTF8) );//"Average Diameter"
388 _st_Value8 = new wxStaticText(this, -1, _T("0.00"));
390 // _st_Label8->SetBackgroundColour(*wxLIGHT_GREY);
391 // _st_Value8->SetBackgroundColour(*wxLIGHT_GREY);
392 // EED -> _st_Label9 = new wxStaticText(this, -1, "Stenosis");
393 // EED -> _st_Value9 = new wxStaticText(this, -1, "0.00");
394 // EED -> _st_Label9->SetBackgroundColour(*wxLIGHT_GREY);
395 // EED -> _st_Value9->SetBackgroundColour(*wxLIGHT_GREY);
397 _st_LabelRef101 = new wxStaticText(this, -1, wxString(marDict.GetString(385), wxConvUTF8) );//"Seg. Length"
398 _st_ValueRef101 = new wxStaticText(this, -1, _T("--"));
400 // _st_LabelRef101->SetBackgroundColour(*wxLIGHT_GREY);
401 // _st_ValueRef101->SetBackgroundColour(*wxLIGHT_GREY);
402 _st_LabelRef102 = new wxStaticText(this, -1, wxString(marDict.GetString(395), wxConvUTF8) );//"Ref. Area"
403 _st_ValueRef102 = new wxStaticText(this, -1, _T("--"));
405 // _st_LabelRef102->SetBackgroundColour(*wxLIGHT_GREY);
406 // _st_ValueRef102->SetBackgroundColour(*wxLIGHT_GREY);
407 _st_LabelRef103 = new wxStaticText(this, -1, wxString(marDict.GetString(420), wxConvUTF8) );//"Ref. Average Diam."
408 _st_ValueRef103 = new wxStaticText(this, -1, _T("--"));
410 // _st_LabelRef103->SetBackgroundColour(*wxLIGHT_GREY);
411 // _st_ValueRef103->SetBackgroundColour(*wxLIGHT_GREY);
413 _pl_cntlHealthySick2 = new wxPanelControlsHealthySickSlice2(panel_right_down,this);
416 // panel_left->SetBackgroundColour(*wxLIGHT_GREY);
417 // panel_right_up->SetBackgroundColour(*wxLIGHT_GREY);
418 // panel_right_down->SetBackgroundColour(*wxLIGHT_GREY);
419 // panel_splitter_right->SetBackgroundColour(*wxLIGHT_GREY);
420 // panel_splitter->SetBackgroundColour(*wxLIGHT_GREY);
424 //--------------------------------------------------------
426 void wxQuantificationWidget::Do_layout()
431 wxBoxSizer *sizer_principal = new wxBoxSizer(wxVERTICAL);
432 wxBoxSizer *status = new wxBoxSizer(wxHORIZONTAL);
435 // wxFlexGridSizer *medium_right_up = new wxFlexGridSizer(1,0);
436 wxBoxSizer *medium_right_up = new wxBoxSizer(wxVERTICAL);
438 wxFlexGridSizer *medium_right_down = new wxFlexGridSizer(1,0);
441 wxBoxSizer *medium_left_up = new wxBoxSizer(wxVERTICAL);
442 wxBoxSizer *medium_right = new wxBoxSizer(wxVERTICAL);
443 // wxFlexGridSizer *autoQuantif = new wxFlexGridSizer(1,0);
446 // wxStaticBoxSizer *axe = new wxStaticBoxSizer(new wxStaticBox(panel_left_down, -1, _T("")), wxVERTICAL);
447 wxFlexGridSizer *axe = new wxFlexGridSizer(1);
448 axe->AddGrowableCol(0);
450 wxFlexGridSizer *axe1 = new wxFlexGridSizer(10,0);
451 wxBoxSizer *axe2 = new wxBoxSizer(wxHORIZONTAL);
452 wxFlexGridSizer *axe3 = new wxFlexGridSizer(10,0);
453 wxFlexGridSizer *axe4 = new wxFlexGridSizer(10,0);
454 wxBoxSizer *axe5 = new wxBoxSizer(wxHORIZONTAL);
455 wxBoxSizer *axe6 = new wxBoxSizer(wxHORIZONTAL);
457 wxBoxSizer *status0 = new wxBoxSizer(wxVERTICAL);
458 wxBoxSizer *status1 = new wxBoxSizer(wxVERTICAL);
459 wxBoxSizer *status2 = new wxBoxSizer(wxVERTICAL);
460 wxBoxSizer *status3 = new wxBoxSizer(wxVERTICAL);
461 // wxBoxSizer *status4 = new wxBoxSizer(wxVERTICAL);
462 // wxBoxSizer *status5 = new wxBoxSizer(wxVERTICAL);
463 wxBoxSizer *status6 = new wxBoxSizer(wxVERTICAL);
464 wxBoxSizer *status7 = new wxBoxSizer(wxVERTICAL);
465 wxBoxSizer *status8 = new wxBoxSizer(wxVERTICAL);
466 wxBoxSizer *status9 = new wxBoxSizer(wxVERTICAL);
467 wxBoxSizer *statusRef1 = new wxBoxSizer(wxVERTICAL);
468 wxBoxSizer *statusRef2 = new wxBoxSizer(wxVERTICAL);
469 wxBoxSizer *statusRef3 = new wxBoxSizer(wxVERTICAL);
472 axe1->Add(_st_Slice , 10, wxALL|wxEXPAND, 0);
473 axe1->Add(_sl_Slice , 10, wxALL|wxGROW, 0);
474 axe1->AddGrowableCol(1);
476 axe2->Add(_cb_HealthySlice , 10, wxALL|wxEXPAND, 0);
477 axe2->Add(_cb_Perpendicular , 10, wxALL|wxEXPAND, 0);
478 axe2->Add(_cb_VisibleRings , 10, wxALL|wxEXPAND, 0);
479 axe2->Add(_cb_ShowSurface , 10, wxALL|wxEXPAND, 0);
481 axe3->Add(_st_Opacity , 1, wxALL|wxEXPAND, 0);
482 axe3->Add(_sl_Opacity , 10, wxALL|wxGROW, 0);
483 axe3->Add(_rb_GreyScale , 10, wxALL|wxEXPAND, 0);
484 axe3->Add(_rb_Color , 10, wxALL|wxEXPAND, 0);
485 axe3->AddGrowableCol(1);
487 axe4->Add(_st_Isovalue , 1, wxALL|wxEXPAND, 0);
488 axe4->Add(_sl_Isovalue , 1, wxALL|wxGROW, 0);
489 axe4->AddGrowableCol(1);
491 axe5->Add(_bt_AddContour3D , 1 );
492 axe5->Add(_bt_CleanContour3D , 1 );
493 axe6->Add(_bt_CleanAllContours3D , 1 );
494 axe6->Add(_bt_SaveContours3D , 1 );
497 // status0->Add(_st_Label0, 1, wxALL|wxALIGN_CENTER, 5);
498 // status0->Add(_st_Value0, 1, wxALL|wxALIGN_CENTER, 5);
499 status1->Add(_st_Label1, 1, wxALL|wxALIGN_CENTER, 5);
500 status1->Add(_st_Value1, 1, wxALL|wxALIGN_CENTER, 5);
501 status2->Add(_st_Label2, 1, wxALL|wxALIGN_CENTER, 5);
502 status2->Add(_st_Value2, 1, wxALL|wxALIGN_CENTER, 5);
503 status3->Add(_st_Label3, 1, wxALL|wxALIGN_CENTER, 5);
504 status3->Add(_st_Value3, 1, wxALL|wxALIGN_CENTER, 5);
505 // status4->Add(_st_Label4, 1, wxALL|wxALIGN_CENTER, 5);
506 // status4->Add(_st_Value4, 1, wxALL|wxALIGN_CENTER, 5);
507 // status5->Add(_st_Label5, 1, wxALL|wxALIGN_CENTER, 5);
508 // status5->Add(_st_Value5, 1, wxALL|wxALIGN_CENTER, 5);
509 status6->Add(_st_Label6, 1, wxALL|wxALIGN_CENTER, 5);
510 status6->Add(_st_Value6, 1, wxALL|wxALIGN_CENTER, 5);
511 status7->Add(_st_Label7, 1, wxALL|wxALIGN_CENTER, 5);
512 status7->Add(_st_Value7, 1, wxALL|wxALIGN_CENTER, 5);
513 status8->Add(_st_Label8, 1, wxALL|wxALIGN_CENTER, 5);
514 status8->Add(_st_Value8, 1, wxALL|wxALIGN_CENTER, 5);
515 // EED -> status9->Add(_st_Label9, 1, wxALL|wxALIGN_CENTER, 5);
516 // EED -> status9->Add(_st_Value9, 1, wxALL|wxALIGN_CENTER, 5);
518 statusRef1->Add(_st_LabelRef101, 1, wxALL|wxALIGN_CENTER, 5);
519 statusRef1->Add(_st_ValueRef101, 1, wxALL|wxALIGN_CENTER, 5);
520 statusRef2->Add(_st_LabelRef102, 1, wxALL|wxALIGN_CENTER, 5);
521 statusRef2->Add(_st_ValueRef102, 1, wxALL|wxALIGN_CENTER, 5);
522 statusRef3->Add(_st_LabelRef103, 1, wxALL|wxALIGN_CENTER, 5);
523 statusRef3->Add(_st_ValueRef103, 1, wxALL|wxALIGN_CENTER, 5);
526 // status->Add(status0 , 1, wxALL|wxEXPAND, 0);
527 status->Add(status1 , 1, wxALL|wxEXPAND, 0);
528 status->Add(statusRef1 , 1, wxALL|wxEXPAND, 0);
529 status->Add(status2 , 1, wxALL|wxEXPAND, 0);
530 status->Add(statusRef2 , 1, wxALL|wxEXPAND, 0);
531 status->Add(status3 , 1, wxALL|wxEXPAND, 0);
532 // status->Add(status4 , 1, wxALL|wxEXPAND, 0);
533 // status->Add(status5 , 1, wxALL|wxEXPAND, 0);
534 status->Add(status6 , 1, wxALL|wxEXPAND, 0);
535 status->Add(status7 , 1, wxALL|wxEXPAND, 0);
536 status->Add(status8 , 1, wxALL|wxEXPAND, 0);
537 status->Add(statusRef3 , 1, wxALL|wxEXPAND, 0);
538 // EED -> status->Add(status9, 1, wxALL|wxEXPAND, 0);
540 axe->Add(axe1, 2, wxALL|wxEXPAND, 0);
541 axe->Add(axe2, 2, wxALL|wxEXPAND, 0); //wxALIGN_CENTER_HORIZONTAL
542 axe->Add(axe3, 2, wxALL|wxEXPAND, 0);
543 axe->Add(axe4, 2, wxALL|wxEXPAND, 0);
545 // axe->Add(axe5, 2, wxALL|wxEXPAND, 0);
546 // axe->Add(axe6, 2, wxALL|wxEXPAND, 0);
550 panel_left_down->SetAutoLayout(true);
551 panel_left_down->SetSizer(axe);
552 panel_left_down->Layout();
556 // medium_right_up->Add(_2DWorld , 1, wxALL|wxGROW, 5);
557 medium_right_up->Add(_2DWorld , 1, wxALL|wxEXPAND, 5);
559 medium_right_down->Add(_wxStenosisPanel , 1, wxALL, 5);
560 medium_right_down->Add(_pl_cntlHealthySick2 , 1, wxALL, 5);
563 //medium_right->Add(_Chart , 1, wxALL|wxEXPAND , 0);
565 // panel_left->SetAutoLayout(true);
566 // panel_left->SetSizer(medium_left);
567 // panel_left->Layout();
570 medium_left_up->Add(_3DWorld , 1, wxEXPAND, 0);
571 panel_left_up->SetAutoLayout(true);
572 panel_left_up->SetSizer(medium_left_up);
573 panel_left_up->Layout();
576 panel_splitter_left->SplitHorizontally( panel_left_up , panel_left_down );
577 panel_splitter_left->SetMinimumPaneSize( 50 );
581 panel_right_up->SetAutoLayout(true);
582 panel_right_up->SetSizer(medium_right_up);
583 panel_right_up->Layout();
585 panel_right_down->SetAutoLayout(true);
586 panel_right_down->SetSizer(medium_right_down);
587 panel_right_down->Layout();
592 while (pp->GetParent()!=NULL) pp=pp->GetParent();
593 pp->GetSize(&ww,&hh);
595 panel_splitter_right->SplitHorizontally( panel_right_up, panel_right_down, (int)(hh*0.4) );
596 panel_splitter_right->SetMinimumPaneSize( 50 );
600 // medium_right->Add(panel_splitter_right,1 ,wxGROW,0 );
601 medium_right->Add(panel_splitter_right,1 ,wxALL|wxEXPAND,0 );
602 panel_right->SetAutoLayout(true);
603 panel_right->SetSizer(medium_right);
604 panel_right->Layout();
605 // panel_right->FitInside();
608 panel_splitter->SplitVertically( panel_splitter_left , panel_right, (int)(ww*0.6) );
609 panel_splitter->SetMinimumPaneSize( 50 );
612 // sizer_principal->Add( panel_splitter , 1 , wxGROW );
613 // sizer_principal->Add( status , 0 , wxGROW );
614 sizer_principal->Add( panel_splitter , 1 , wxALL|wxEXPAND );
615 sizer_principal->Add( status , 0 , wxALL|wxEXPAND );
617 this->SetSizer(sizer_principal);
625 //--------------------------------------------------------
626 void wxQuantificationWidget::Set_Data( )
633 //EED _real_first_point_quant = -1;
634 //EED _real_last_point_quant = -1;
641 _actual_darea = 0.00;
642 _actual_dperi = 0.00;
647 _actual_partial = 0.00;
649 //_actual_total = _mar->_experiment->GetAxisLength();
650 //_st_Value1->SetLabel(_actual_total);
651 //return( maracas_data::experiment->get_work_axis( )->get_total_length( ) );
656 //--------------------------------------------------------
657 void wxQuantificationWidget::Positionate( )
665 //--------------------------------------------------------
666 void wxQuantificationWidget::Forget( )
671 // ----------------------------------------------------------------------------
672 void wxQuantificationWidget::ShowMARACASData( marInterface* mar )
675 vtkImageData* imagedata;
681 _mar->_experiment->prepareQuantification( );
682 nos = _mar->_experiment->getNumberOfSlices( );
683 actualQuant = (int) (nos-1)/2 ;
684 imagedata = _mar->_experiment->getSliceImage( actualQuant );
685 _mar->_experiment->getAxis()->setActualQuant( actualQuant ) ;
686 _mar->_experiment->getDynData( )->getVolume( )->getMinMax( min, max );
688 _3DWorld->ShowMARACASDataAndAxe( mar );
689 _3DWorld->InitCameraReset( );
690 _2DWorld->ConstructVTK( imagedata );
693 _sl_Isovalue->SetRange( (int)min, (int)max);
694 _sl_Isovalue->SetValue( (int)(max/4) );
695 _sl_Opacity->SetValue( 50 );
698 _pl_cntlHealthySick2->GetPnlSearStenosis()->GetPanelAutomatic()->SetRange(0,nos-1);
704 this->GetSize(&wwT,&hhT);
705 _wxStenosisPanel->GetSize(&ww1,&hh1);
706 _pl_cntlHealthySick2->GetSize(&ww2,&hh2);
709 panel_splitter_right->SetSashPosition(ss,true);
712 //----------------------------------------------------------------------------
713 void wxQuantificationWidget::Reset_sl_Slider()
715 int nos = _mar->_experiment->getNumberOfSlices( );
716 _sl_Slice->SetRange(0, nos-1);
717 _sl_Slice->SetValue( (nos-1)/2 );
718 // _pl_cntlHealthySick->Reset_sl_Slider(nos);
720 //----------------------------------------------------------------------------
721 void wxQuantificationWidget::SetSlider_Isovalue_Opacity(int isovalue,int opacity){
722 _sl_Isovalue->SetValue(isovalue);
723 _sl_Opacity->SetValue(opacity);
724 _3DWorld->SetSurfaceIsoValue( isovalue );
725 _3DWorld->SetSurfaceOpacity( opacity );
727 //----------------------------------------------------------------------------
728 void wxQuantificationWidget::OnShowSurface_CB(wxCommandEvent& event)
730 _3DWorld->SetSurfaceVisibility( _cb_ShowSurface->GetValue() );
732 // ---------------------------------------------------------------------------
733 void wxQuantificationWidget::ResetAxis(){
735 _mar->_experiment->getAxis()->setActualQuant( _sl_Slice->GetValue() );
737 _3DWorld->Hide3DHealthySliceActor();
738 _mar->_experiment->getAxis( )->setHealthySlice( 0,-1,0 );
740 // ---------------------------------------------------------------------------
741 void wxQuantificationWidget::RefreshAxis( ){
742 int acuatQuant = _mar->_experiment->getAxis()->getActualQuant();
743 vtkImageData* imagedata;
744 vtkProbeFilter* image3D;
745 vtkPolyData* vtkPolydata_2Dcontour;
746 vtkPoints* vtkPoints_2DDiameterMin;
747 vtkPoints* vtkPoints_2DDiameterMax;
749 image3D = _mar->_experiment->get3DSlice ( acuatQuant );
750 imagedata = _mar->_experiment->getSliceImage ( acuatQuant );
751 vtkPolydata_2Dcontour = _mar->_experiment->get2Dcontour ( acuatQuant );
752 vtkPoints_2DDiameterMin = _mar->_experiment->get2DDiameterMin ( acuatQuant );
753 vtkPoints_2DDiameterMax = _mar->_experiment->get2DDiameterMax ( acuatQuant );
755 _3DWorld->SetImage(image3D);
757 _2DWorld->SetImage(imagedata);
759 if (_cb_VisibleRings->GetValue()==true){
760 _2DWorld->SetContour( vtkPolydata_2Dcontour );
761 _2DWorld->SetDiameterMin( vtkPoints_2DDiameterMin , true );
762 _2DWorld->SetDiameterMax( vtkPoints_2DDiameterMax , true );
766 // PS -> marContour * tutu=_mar->_experiment->getAxis()->getContour( event.GetPosition() );
767 // cnt = _mar->_experiment->generateContour(event.GetPosition(), -1, -1, NULL);
768 // PS -> tutu=_mar->_experiment->getAxis()->getContour( event.GetPosition() );
769 // _2DWorld->SetContour( cnt );
773 // ----------------------------------------------------------------------------
774 void wxQuantificationWidget::MoveSlider(int actualQuant){
776 if (_bak_ActualSlice!=-1){
777 SetManualContour_ReplaceContour();
778 SetManualContour_2DWorld(false);
781 _mar->_experiment->getAxis()->setActualQuant( actualQuant );
784 // ----------------------------------------------------------------------------
785 void wxQuantificationWidget::OnSliderSliceScroll(wxScrollEvent& event){
786 MoveSlider( event.GetPosition() );
788 // ----------------------------------------------------------------------------
789 double wxQuantificationWidget::GetStenosisDiameter(int sickSlice){
790 double healthyAverageDiameter = _mar->_experiment->getReferenceAverDiam() ;
791 marContour *marcontourSick = _mar->_experiment->getContour( sickSlice );
792 return doubleStenosis( healthyAverageDiameter , marcontourSick->getMinimumDiameter() );
794 // ----------------------------------------------------------------------------
795 double wxQuantificationWidget::GetStenosisArea( int sickSlice){
796 double healthyArea = _mar->_experiment->getReferenceArea();
797 marContour *marcontourSick = _mar->_experiment->getContour( sickSlice );
798 return doubleStenosis( healthyArea , marcontourSick->getArea() );
800 // ----------------------------------------------------------------------------
804 // ----------------------------------------------------------------------------
805 double wxQuantificationWidget::GetStenosisTEST1(marContour *marcontourH, marContour *marcontour){
806 double healthy= marcontourH->getMinimumDiameter() * marcontourH->getMaximumDiameter();
807 double sick= marcontour->getMinimumDiameter() * marcontour->getMaximumDiameter();
808 return doubleStenosis( healthy , sick );
810 // ----------------------------------------------------------------------------
811 double wxQuantificationWidget::GetStenosisTEST2(marContour *marcontourH, marContour *marcontour){
812 double steA = GetStenosisArea(marcontourH,marcontour);
813 double steB = GetStenosisDiameter(marcontourH,marcontour);
814 return sqrt(steA + steB);
816 // ----------------------------------------------------------------------------
817 double wxQuantificationWidget::GetStenosisTEST3(marContour *marcontourH, marContour *marcontour){
818 return doubleStenosis( marcontourH->getAverageDiameter() , marcontour->getAverageDiameter() );
824 // ----------------------------------------------------------------------------
825 void wxQuantificationWidget::showVariables()
827 marContour* marcontour;
830 int healthySliceStart;
833 // healthySlice = _sl_Slice->GetValue();
834 // _mar->_experiment->getAxis( )->setHealthySlice( healthySlice );
835 // _3DWorld->Set3DHealthySliceActor( );
836 // _3DWorld->Show3DHealthySliceActor( );
837 actualQuant = _mar->_experiment->getAxis()->getActualQuant( );
838 marcontour=_mar->_experiment->getContour( actualQuant );
841 // tmpString.Printf( "%.2f mm" , marcontour->getPartialAxisLenght());
842 // _st_Value0->SetLabel(tmpString);
843 tmpString.Printf( _T("%.2f mm") , _mar->_experiment->getTotalLength() ); _st_Value1->SetLabel(tmpString);
846 tmpString.Printf( _T("%.2f mm^2") , marcontour->getArea()); _st_Value2->SetLabel(tmpString);
847 tmpString.Printf( _T("%.2f mm") , marcontour->getPerimeter()); _st_Value3->SetLabel(tmpString);
848 // tmpString.Printf( _T("%.2f mm") , marcontour->getDiameterFromArea()); _st_Value4->SetLabel(tmpString);
849 // tmpString.Printf( _T("%.2f mm") , marcontour->getDiameterFromPerimeter()); _st_Value5->SetLabel(tmpString);
850 tmpString.Printf( _T("%.2f mm") , marcontour->getMinimumDiameter()); _st_Value6->SetLabel(tmpString);
851 tmpString.Printf( _T("%.2f mm") , marcontour->getMaximumDiameter()); _st_Value7->SetLabel(tmpString);
852 tmpString.Printf( _T("%.2f mm") , marcontour->getAverageDiameter()); _st_Value8->SetLabel(tmpString);
854 healthySlice = _mar->_experiment->getAxis( )->getHealthySlice( );
855 healthySliceStart = _mar->_experiment->getAxis( )->getHealthySliceStart( );
856 healthySliceEnd = _mar->_experiment->getAxis( )->getHealthySliceEnd( );
857 if ( (healthySlice!=-1) ) {
858 _st_Value100->SetLabel( strStenosis( GetStenosisArea(actualQuant) ) );
859 _st_Value101->SetLabel( strStenosis( GetStenosisDiameter(actualQuant) ) );
860 tmpString.Printf( _T("%.2f mm^2") , _mar->_experiment->getReferenceArea() ); _st_ValueRef102->SetLabel(tmpString);
861 tmpString.Printf( _T("%.2f mm") , _mar->_experiment->getReferenceAverDiam() ); _st_ValueRef103->SetLabel(tmpString);
863 _st_Value100->SetLabel(_T("--"));
864 _st_Value101->SetLabel(_T("--"));
865 _st_ValueRef101->SetLabel(_T("--"));
866 _st_ValueRef102->SetLabel(_T("--"));
867 _st_ValueRef103->SetLabel(_T("--"));
870 int startSlice = _mar->_experiment->getAxis()->getStartQuant();
871 int finishSlice = _mar->_experiment->getAxis()->getFinishQuant();
872 if ((startSlice!=-1) && (finishSlice!=-1)){
873 tmpString.Printf( _T("%.2f mm") , _mar->_experiment->getSubAxisLength() ); _st_ValueRef101->SetLabel(tmpString);
875 _st_ValueRef101->SetLabel(_T("--"));
878 panel_splitter->SetSashPosition(panel_splitter->GetSashPosition() );
881 // ----------------------------------------------------------------------------
882 double wxQuantificationWidget::doubleStenosis(double healthy, double sick){
888 // result = (fabs(healthy-sick)/healthy) * 100 ;
889 result = ( (healthy-sick)/healthy) * 100 ;
894 // ----------------------------------------------------------------------------
895 wxString wxQuantificationWidget::strStenosis(double stenosis){
899 tmpString.Printf(_T("%d"),-1);
901 tmpString.Printf(_T("%.2f"), stenosis );
903 return tmpString + _T(" \%");
905 // ----------------------------------------------------------------------------
906 void wxQuantificationWidget::OnSliderIsovalueScroll(wxScrollEvent& event)
909 _3DWorld->SetSurfaceIsoValue( event.GetPosition() );
911 // ----------------------------------------------------------------------------
912 void wxQuantificationWidget::OnSliderOpacityScroll(wxScrollEvent& event)
914 _3DWorld->SetSurfaceOpacity( event.GetPosition() );
916 //----------------------------------------------------------------------------
917 void wxQuantificationWidget::AddAxisActors(){
919 marAxis *maraxis = _mar->_experiment->getAxis( );
920 if (maraxis!=NULL) _3DWorld->SetAxis( maraxis->Draw( ) );
924 //----------------------------------------------------------------------------
925 void wxQuantificationWidget::Clean3D( bool eraseAxe )
929 //EED _real_first_point_quant = -1;
930 //EED _real_last_point_quant = -1;
932 _quant_shown = false;
934 _3DWorld->InitListContourActor( -1,_mar->_experiment->getNumberOfSlices() );
935 if (eraseAxe==true) { _3DWorld->RemoveAxis(); }
938 _3DWorld->Hide3DSliceActor( );
939 _3DWorld->Hide3DContourActor( );
940 _3DWorld->Hide3DHealthySliceActor();
944 if (_pRenderer3D != 0) _pRenderer3D->RemoveActor(hs_actor);
945 if (_hs_actor != 0) hs_actor->delete();
946 if (_hs_mapper != 0) hs_mapper->delete();
947 if (_hs_grid != 0) hs_grid->delete();
948 if (_hs_points != 0) hs_points->delete();
949 if (_hs_poly_line != 0) hs_poly_line->delete();
954 int max = _rings_index->GetCount();
957 if (_pRenderer3D != 0)
958 _pRenderer3D->RemoveActor(_cont3DActor(hs_actor[i]));
959 if (_cont3DActor[i] != 0)
960 _cont3DActor[i]->Delete();
961 if (_cont3DMapper[i] != 0)
962 _cont3DMapper[i]->Delete();
963 if (_cont3DGrid[i] != 0)
964 _cont3DGrid[i]->Delete();
965 if (_cont3DPolyLine[i] != 0)
966 _cont3DPolyLine[i]->Delete();
967 if (_cont3DPoints[i] != 0)
968 _cont3DPoints[i]->Delete();
972 //_rings_index = _list;
978 void wxQuantificationWidget::Reload_Axis(bool mask , bool step )
981 this->redoAxisSpline();
982 if ( pRenderer3D != 0 ) {
983 _pRenderer3D->RemoveActor(GetSphereActorName(sphere_quant1));
984 _pRenderer3D->RemoveActor(GetSphereActorName(sphere_quant2));
986 this->DeleteSphere(sphere_quant1);
987 this->DeleteSphere(sphere_quant2);
991 this->recalculeAxisSignal()
994 if ( ( mask || step ) && _shown ) {
995 tk_messageBox -icon info -message "$string_table::str_quant_will_be_erased" -type ok
996 catch { renderer_$widgets(work3D) RemoveActor hs_actor_$widgets(work3D) }
997 catch { hs_actor_$widgets(work3D) Delete }
998 catch { hs_mapper_$widgets(work3D) Delete }
999 catch { hs_grid_$widgets(work3D) Delete }
1000 catch { hs_points_$widgets(work3D) Delete }
1001 catch { hs_poly_line_$widgets(work3D) Delete }
1002 foreach i $rings_index {
1003 catch { renderer_$widgets(work3D) RemoveActor cont3DActor_{$widgets(work3D)}_{$i} }
1004 catch { cont3DActor_{$widgets(work3D)}_{$i} Delete }
1005 catch { cont3DMapper_{$widgets(work3D)}_{$i} Delete }
1006 catch { cont3DGrid_{$widgets(work3D)}_{$i} Delete }
1007 catch { cont3DPolyLine_{$widgets(work3D)}_{$i} Delete }
1008 catch { cont3DPoints_{$widgets(work3D)}_{$i} Delete }
1020 _quant_shown = false;
1021 this->clean_graph(); // old BLT
1024 _range(getIntensityRange());
1025 _resample(getVTKSource());
1026 _bounds(resample(GetBounds());
1029 set points [ getAxis_dll ]
1030 set nP [ expr [ llength $points ] / 3 ]
1031 $widgets(sclSlice) configure \
1033 -to [ expr [ getNumberOfAxisPoints_dll ] - 1 ] \
1036 // Poly-line actor construction...
1037 catch { renderer_$widgets(work3D) RemoveActor axisActor_$widgets(work3D) }
1038 catch { axisActor_$widgets(work3D) Delete }
1039 catch { axisMapper_$widgets(work3D) Delete }
1040 catch { axisGrid_$widgets(work3D) Delete }
1041 catch { axisPolyLine_$widgets(work3D) Delete }
1042 catch { axisPoints_$widgets(work3D) Delete }
1044 axisPoints = vtkPoints::New();
1045 axisPolyLine = vtkPolyLine::New();
1046 axisPolyLine->GetPointIds()->SetNumberOfIds( nP);
1047 vox_size = getActualVoxelSize();
1049 for { set i 0 } { $i < $nP } { incr i } {
1051 [ axisPolyLine_$widgets(work3D) GetPointIds ] SetId $i $i
1054 [ lindex $points [ expr $i * 3 + 0 ] ] \
1055 [ lindex $points [ expr $i * 3 + 1 ] ] \
1056 [ lindex $points [ expr $i * 3 + 2 ] ] \
1057 [ lindex $bounds 0 ] \
1058 [ lindex $bounds 2 ] \
1059 [ lindex $bounds 4 ] \
1060 $vox_size $vox_size $vox_size \
1062 axisPoints->InsertNextPoint( lindex $p 0 ] [ lindex $p 1 ] [ lindex $p 2 ]
1066 axisGrid = vtkUnstructuredGrid::New();
1067 axisGrid->Allocate( 1, 1);
1068 axisGrid->InsertNextCell( [ axisPolyLine->GetCellType(), ] \
1069 [ axisPolyLine_$widgets(work3D) GetPointIds ]
1070 axisGrid->SetPoints(axisPoints);
1072 axisMapper = vtkDataSetMapper::New();
1073 axisMapper->SetInput(axisGrid);
1074 axisMapper->ImmediateModeRenderingOn();
1076 axisActor = vtkActor::New();
1077 axisActor->SetMapper(axisMapper);
1078 axisActor->GetProperty()->BackfaceCullingOn();
1079 axisActor->GetProperty()->SetDiffuseColor(1, 0, 0);
1081 _pRenderer3D->AddActor(axisActor);
1083 _pRenderWindow3D->Render();
1084 _pRenderWindow2D->Render();
1086 _pRenderer3D->AddActor(outlineActor));
1091 if ( _given_points == 1 )
1095 this->update_blt_all_meassures();
1100 void wxQuantificationWidget::Show_Max_Min_Diameters()
1104 slice = widgets(sclSlice);
1105 wxList *lmax = this->getMaximumLine();
1106 wxList *lmin = this->getMinimumLine();
1108 if ( _pRenderer2D != 0 )
1110 _pRenderer2D->RemoveActor(dMin_actor);
1111 _pRenderer2D->RemoveActor(dMax_actor);
1113 if ( dMax_actor != 0 ) dMax_actor->Delete();
1114 if ( dMax_mapper != 0 ) dMax_mapper->Delete();
1115 if ( dMax_line != 0 ) dMax_line->Delete();
1116 if ( dMin_actor != 0 ) dMin_actor->Delete();
1117 if ( dMin_mappe != 0 ) dMin_mappe->Delete();
1118 if ( dMax_actor != 0 ) dMax_actor->Delete();
1119 if ( dMin_line != 0 ) dMin_line->Delete();
1122 dMax_line = vtkLineSource::New();
1123 dMax_line->SetPoint1( lmax->Getfirst() , lmax->item(1), 0.0 );
1124 dMax_line->SetPoint2( lmax->Item(2), lmax->Item(3), 0.0 );
1126 dMax_mapper = vtkPolyDataMapper::New();
1127 dMax_mapper->SetInput(dMax_line->GetOutput());
1128 dMax_mapper->ImmediateModeRenderingOn();
1130 dMax_actor = vtkActor::New();
1131 dMax_actor->SetMapper(dMax_mapper));
1132 dMax_actor->GetProperty()->SetColor(1.00, 0.00, 0.00);
1134 dMin_line = vtkLineSource::New();
1135 dMin_line->SetPoint1( lmin->GetFirst(), lmin->Item(1), 0.0);
1136 dMin_line->SetPoint2( lmin->Item(2), lmin->Item(3), 0.0);
1138 dMin_mapper = vtkPolyDataMapper::New();
1139 dMin_mapper->SetInput(dMin_line->GetOutput());
1140 dMin_mapper->ImmediateModeRenderingOn();
1142 dMin_actor = vtkActor::New();
1143 dMin_actor->SetMapper(dMin_mapper);
1144 dMin_actor->GetProperty()->SetColor(0.00, 0.00, 1.00);
1146 array set arr( params(), 0 )
1147 if ( arr(e_debug_diameters) == 1 )
1149 _prenderer2D->AddActor(dMax_actor);
1150 _prenderer2D->AddActor(dMin_actor);
1154 //GetRenderWindow Render
1160 int wxQuantificationWidget::Back( )
1170 void wxQuantificationWidget::Set_plane_3D( double x, double y )
1173 _pRenderer3D->IsInViewport(0, 0);
1178 if ( _tmp_world_picker3D != 0) tmp_world_picker3D->Delete();
1180 y =[ [ lindex [ $widgets(work3D) configure - height ] 4 ] - y - 1 ]
1182 _pickWPPos = Pick_point_local_actor $x $y _pRenderer3D _isoActor3D 0.001 ]
1184 _xc = _pickWPPos->item(1);
1185 _yc = _pickWPPos->item(2);
1186 _zc = _pickWPPos->item(3);
1187 #Chercher le point de l'axe le plus proche au point choisi sur la surface
1188 _indP = axisGrid3D->FindPoint(_xc, _yc, _zc);
1189 _coordsP = axisGrid3D->GetPoint(_indP);
1190 _xc =[lindex _coordsP 0]
1191 _yc =[lindex _coordsP 1]
1192 _zc =[lindex _coordsP 2]
1196 $widgets(sclSlice) set $indP
1203 _pRenderWindow3D->Render();
1209 void wxQuantificationWidget::Refresh_Quant( )
1211 if ( _real_first_point_quant != -1 && _real_last_point_quant != -1 &&
1212 _quant_sten->GetCount() > 0) {
1213 //_quant_sten = GetStenosisQuant();
1214 //_sten = _quant_sten->Item(_widgets(sclSlice)->get() -
1215 // _real_first_point_quant )
1217 //this->update_blt_all_meassures();
1222 void wxQuantificationWidget::Point_Intensity(double x, double y)
1224 //y = [ lindex [ _pRenderWindow3D->Configure(height) ] ->Item(4) ] - y - 1;
1226 //if ( _tmp_picker != 0 ) _tmp_picker->Delete();
1227 //_tmp_picker = vtkWorldPointPicker::New();
1228 //_pickWP = tmp_picker2D->Pick(x, y, 0) _pRenderer2D
1229 //_pickWPPos = tmp_picker2D->GetPickPosition();
1231 //x = [ lindex [ split [ lindex $pickWPPos 0 ] . ] 0 ]
1232 //y = [ lindex [ split [ lindex $pickWPPos 1 ] . ] 0 ]
1233 //y = GetCutSize() - y - 1;
1234 //_intensity = GetIntensityCut(x, y);
1238 void wxQuantificationWidget::CleanContour()
1240 /* if ( _pRenderer2D != 0 ) {
1241 _pRenderer2D->RemoveActor(_debug2Actor3D);
1242 _pRenderer2D->RemoveActor(_debug1Actor3D);
1244 if ( _debug2Actor3D != 0 )
1245 _debug2Actor3D->Delete();
1246 //if ( _connMapper3D != 0 ) _connMapper3D->Delete();
1247 //if ( _isoStrips3D != 0 ) _isoStrips3D->Delete();
1248 //if ( _cpd23D != 0 ) _cpd23D->Delete();
1249 //if ( _conn3D != 0 ) _conn3D->Delete();
1250 //if ( _cpd3D != 0 ) _cpd3D->Delete();
1251 if ( _debug1Actor3D != 0 )
1252 _debug1Actor3D->Delete();
1253 //if ( _cntVTKMapper3D != 0 ) _cntVTKMapper3D->Delete();
1254 //if ( _cntVTK3D != 0 ) _cntVTK3D->Delete();
1256 if ( _pRenderer2D != 0 ) {
1257 _pRenderer2D->RemoveActor(_aPolyLineActor2D);
1258 _pRenderer2D->RemoveActor(_aPolygonActor2D);
1261 if ( _aPolyLineActor2D != 0 )
1262 _aPolyLineActor2D->Delete();
1263 //if ( _aPolyLineMapper2D != 0 ) _aPolyLineMapper2D->Delete();
1264 //if ( _aPolyLineGrid2D != 0 ) _aPolyLineGrid2D->Delete();
1265 //if ( _aPolyLine2D != 0 ) _aPolyLine2D->Delete();
1266 //if ( _PointsContour2D != 0 ) _PointsContour2D->Delete();
1267 if ( _aPolygonActor2D != 0 )
1268 _aPolygonActor2D->Delete();
1269 //if ( _aPolygonMapper2D != 0 ) _aPolygonMapper2D->Delete();
1270 //if ( _aPolygonGrid2D != 0 ) _aPolygonGrid2D->Delete();
1271 //if ( _aPolygon2D != 0 ) _aPolygon2D->Delete();
1273 if ( _pRenderer2D != 0 ) {
1274 _pRenderer2D->RemoveActor(_dMaxActor2D);
1275 _pRenderer2D->RemoveActor(_dMinActor2D);
1278 if ( _dMaxActor2D != 0 )
1279 _dMaxActor2D->Delete();
1280 //if ( _dMaxMapper2D != 0 ) _dMaxMapper2D->Delete();
1281 //if ( _dMaxLine2D != 0 ) _dMaxLine2D->Delete();
1282 if ( _dMinActor2D != 0 )
1283 _dMinActor2D->Delete();
1284 //if ( _dMinMapper2D != 0 ) _dMinMapper2D->Delete();
1285 //if ( _dMinLine2D != 0 ) _dMinLine2D->Delete();
1287 _pRenderWindow3D->Render();
1288 _pRenderWindow2D->Render();*/
1292 //-----------------------------------------------------------------
1294 void wxQuantificationWidget::Do_Quant()
1297 if ( _quantifing == 0 )
1299 this->Clean_Graph();
1304 int f = ( _first_point_quant < _last_point_quant ) ? _first_point_quant : _last_point_quant;
1305 int l = ( _first_point_quant > _last_point_quant ) ? _first_point_quant : _last_point_quant;
1310 _quant_area = _list;
1311 _quant_peri = _list;
1312 _quant_darea = _list;
1313 _quant_dperi = _list;
1314 _quant_dmax = _list;
1315 _quant_dmin = _list;
1316 _quant_davg = _list;
1318 for ( int i = f; i <= l; i++ )
1319 lappend _quant_x->Append(i);
1321 update_blt_all_meassures();
1327 wxMessageDialog* Q_recalculate = new wxDialog(this,
1328 _str_recalculate_contours,
1330 wxYES_NO|wxNO_DEFAULT|wxCENTRE,
1334 if (Q_recalculate->ShowModal() == wxID_OK)
1337 delete Q_recalculate;
1339 this->Clean_Contour();
1340 $widgets(sclSlice) set cont ;
1341 planes_window::set_plane
1343 _params = GetContourParams();
1344 this->Generate_IsoContour( (GetCutSize() / 2) (GetCutSize() / 2)
1347 while ( NextQuant(recal,IsoStrips3D) == 1 && cont <= l )
1349 if ( _quantifing == 1 )
1351 if ( _pRenderer2D != 0 )
1353 _pRenderer2D->RemoveActor(_aPolygonActor2D);
1354 _pRenderer2D->RemoveActor(_aPolyLineActor2D);
1356 if ( _aPolygonActor2D != 0 ) _aPolygonActor2D->Delete();
1357 if ( _aPolygonGrid2D != 0 ) _aPolygonGrid2D->Delete();
1358 if ( _aPolyLineActor2D != 0 ) _aPolyLineActor2D->Delete();
1359 if ( _aPolyLineMapper2D != 0 ) _aPolyLineMapper2D->Delete();
1360 if ( _aPolyLineGrid2D != 0 ) _aPolyLineGrid2D->Delete();
1361 if ( _aPolyLine2D != 0 ) _aPolyLine2D->Delete();
1362 if ( _PointsContour2D != 0 ) _PointsContour2D->Delete();
1363 if ( _aPolygon2D != 0 ) _aPolygon2D->Delete();
1365 _points = GetContourPoints();
1366 _taille = _points->GetLength() / 2;
1368 aPolygon2D = vtkPolygon::New();
1369 PointsContour2D = vtkPoints::New();
1371 aPolyLine2D = vtkPolyLine::New();
1372 _PointIds = aPolyLine2D->GetPointIds();
1373 _PointIds->SetNumberOfIds(_taille);
1374 _PointIdsPolygon = aPolygon2D->GetPointIds();
1375 _PointIdsPolygon->SetNumberOfIds( _taille);
1377 for ( int i =0; i < _taille ; i++ )
1379 _PointIds->SetId(i, i);
1380 _PointIdsPolygon->SetId(i, i);
1381 PointsContour2D->InsertNextPoint( _points->Item( i * 2 ) + 0 ,
1382 _points->Item(i * 2) + 1, 0);
1385 aPolyLineGrid2D = vtkUnstructuredGrid::New();
1386 aPolyLineGrid2D->Allocate(1, 1);
1387 _param1 = aPolyLine2D->GetCellType();
1388 _param2 = aPolyLine2D->GetPointIds();
1389 aPolyLineGrid2D->InsertNextCell(_param1, _param2);
1390 aPolyLineGrid2D->SetPoints(PointsContour2D)
1392 aPolyLineMapper2D = vtkDataSetMapper::New();
1393 aPolyLineMapper2D->SetInput(aPolyLineGrid2D);
1395 aPolyLineActor2D = vtkActor::New();
1396 aPolyLineActor2D->SetMapper(aPolyLineMapper2D);
1397 _Property1 = aPolyLineActor2D->GetProperty();
1398 _Property1->SetColor(0, 1, 0);
1399 _Property1->SetLineWidth(2);
1400 _Property1->SetPointSize(2);
1401 _Property1->BackfaceCullingOff();
1403 _pRenderer2D->AddActor(aPolyLineActor2D);
1405 aPolygonGrid2D = vtkUnstructuredGrid::New();
1406 aPolygonGri2D->Allocate(1, 1);
1407 _param1 = aPolygon2D->GetCellType();
1408 _param2 = aPolygon2D->GetPointIds();
1409 aPolygonGrid2D->InsertNextCell(_param1, _param2);
1410 aPolygonGrid2D->SetPoints(PointsContour2D);
1412 aPolygonMapper2D = vtkDataSetMapper::New();
1413 aPolygonMapper2->SetInput(aPolygonGrid2D);
1415 aPolygonActor2D = vtkActor::New();
1416 aPolygonActor2D->SetMapper(aPolygonMapper2D);
1417 _Property1 = aPolygonActor2D->GetProperty();
1418 _Property1->SetColor(0, 1, 0);
1419 _Property1->SetLineWidth(2);
1420 _Property1->SetPointSize(2);
1421 _Property1->BackfaceCullingOff();
1423 int arr[] = Params(0);
1424 if ( arr(e_debug_fill_area) == 1 )
1425 _pRenderer2D->AddActor(aPolygonActor2D)
1427 this->Show_Max_Min_Diameters();
1429 _pRenderWindow2D->Render();
1431 this->Draw3D_Contour(cont);
1433 _values = GetValues(cont);
1435 _quant_area->Append(_values->Item(1));
1436 _quant_peri->Append(_values->Item(2));
1437 _quant_darea->Append(_values->Item(3));
1438 _quant_dperi->Append(_values->Item(4));
1439 _quant_dmax->Append(_values->Item(5));
1440 _quant_dmin->Append(_values->Item(6));
1441 _quant_davg->Append(_values->Item(7));
1443 this->update_blt_all_meassures();
1445 _area = _values->Item(1);
1446 _peri = _values->Item(2);
1447 _darea = _values->Item(3);
1448 _dperi = _values->Item(4);
1449 _dmax = _values->Item(5);
1450 _dmin = _values->Item(6);
1451 _davg = _values->Item(7);
1455 this->Clean_contour();
1457 $widgets(sclSlice) set $cont;
1459 _params = GetContourParams();
1460 this->Generate_IsoContour [ [ GetCutSize() / 2 ]
1461 [ GetCutSize() / 2 ]
1462 [ _params->Item(5) ]
1463 [ _params->Item(6) ];
1467 else if ( _quantifing == 2 )
1469 while ( _quantifing == 2 )
1472 else if ( _quantifing == 3 )
1474 $widgets(btnPause) configure -text $string_table::str_pause
1480 this->Clean_contour();
1487 wxMessageDialog* Q_stop = new wxDialog(this,
1488 _str_stop_quantification,
1490 wxYES_NO|wxNO_DEFAULT|wxCENTRE,
1494 if (Q_stop->ShowModal() == wxID_OK)
1502 //-----------------------------------------------------------------
1503 void wxQuantificationWidget::OnContour_BT(wxCommandEvent& event){
1504 int slice=_sl_Slice->GetValue();
1505 _3DWorld->Set3DContourActor( slice , _mar->_experiment->get3Dcontour(slice) , _cb_VisibleRings->GetValue() ,0 );
1507 //-----------------------------------------------------------------
1508 void wxQuantificationWidget::OnClean_BT(wxCommandEvent& event){
1509 int slice=_sl_Slice->GetValue();
1510 _3DWorld->Erase3DContourActor( slice );
1513 //-----------------------------------------------------------------
1514 void wxQuantificationWidget::OnCleanAll_BT(wxCommandEvent& event){
1515 marDictionary marDict;
1518 wxMessageDialog *wxdiag;
1519 strcpy( tmp , marDict.GetString(870) ); strcat(tmp,"\n"); strcat(tmp,marDict.GetString(875));
1520 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"
1521 if ( wxdiag->ShowModal() == wxID_OK ) {
1522 _3DWorld->InitListContourActor( 0, _mar->_experiment->getNumberOfSlices() );
1527 //-----------------------------------------------------------------
1528 void wxQuantificationWidget::OnSaveContours3D_BT(wxCommandEvent& event)
1531 wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas_contour3D"), wxSAVE );
1532 if (dialog.ShowModal() == wxID_OK)
1534 std::string pathfilename( (const char *)(dialog.GetPath().mb_str()) );
1535 // std::string directory( (const char *)(dialog.GetDirectory().mb_str()) );
1536 // std::string filename( (const char *)(dialog.GetFilename().mb_str()) );
1537 // std::string pathfilename = directory + "/" + filename;
1538 // printf("EED> wxQuantificationWidget::OnSaveContours3D_BT > %s\n",pathfilename.c_str());
1540 ff=fopen(pathfilename.c_str(), "w+");
1541 _mar->_experiment->getAxis()->SaveExisting3DContours(ff);
1547 // PS -> void wxQuantificationWidget::OnContour_BT(wxCommandEvent& event)
1553 // PS -> vtkPolyData* cnt;
1554 // PS -> //marContour* cnt;
1555 // PS -> // vtkUnstructuredGrid* allData;
1557 // PS -> index = _sl_Slice->GetValue( );
1558 // PS -> // this->CleanContour( );
1559 // PS -> cnt = _mar->_experiment->generateContour(index, -1, -1, NULL);
1560 // PS -> // allData = cnt->Draw( );
1561 // PS -> // _2DWorld->SetContour( allData );
1562 // PS -> _2DWorld->SetContour( cnt );
1564 // PS -> _first_quant = 0;
1566 // PS -> /*planes_window::show_max_min_diameters
1568 // PS -> [ $widgets(image2D) GetRenderWindow ] Render
1570 // PS -> planes_window::draw3D_contour $index
1572 // PS -> set quant_data [ getValues_dll $index ]
1573 // PS -> set actual_area [ change_float_precision [ lindex $quant_data 0 ] 2 ]
1574 // PS -> set actual_peri [ change_float_precision [ lindex $quant_data 1 ] 2 ]
1575 // PS -> set actual_darea [ change_float_precision [ lindex $quant_data 2 ] 2 ]
1576 // PS -> set actual_dperi [ change_float_precision [ lindex $quant_data 3 ] 2 ]
1577 // PS -> set actual_dmax [ change_float_precision [ lindex $quant_data 4 ] 2 ]
1578 // PS -> set actual_dmin [ change_float_precision [ lindex $quant_data 5 ] 2 ]
1579 // PS -> set actual_davg [ change_float_precision [ lindex $quant_data 6 ] 2 ]
1580 // PS -> set i [ lsearch -exact $actual_quant_x $index ]
1581 // PS -> if { $i != -1 } {
1583 // PS -> set actual_quant_area [ lreplace $actual_quant_area $i $i $actual_area ]
1584 // PS -> set actual_quant_peri [ lreplace $actual_quant_peri $i $i $actual_peri ]
1585 // PS -> set actual_quant_darea [ lreplace $actual_quant_darea $i $i $actual_darea ]
1586 // PS -> set actual_quant_dperi [ lreplace $actual_quant_dperi $i $i $actual_dperi ]
1587 // PS -> set actual_quant_dmax [ lreplace $actual_quant_dmax $i $i $actual_dmax ]
1588 // PS -> set actual_quant_dmin [ lreplace $actual_quant_dmin $i $i $actual_dmin ]
1589 // PS -> set actual_quant_davg [ lreplace $actual_quant_davg $i $i $actual_davg ]
1590 // PS -> if { [ llength $actual_quant_sten ] > 0 } {
1592 // PS -> set actual_quant_sten [ getStenosisQuant_dll ]
1593 // PS -> set actual_sten [ change_float_precision [ lindex $actual_quant_sten [ expr $index - $real_first_point_quant ] ] 2 ]
1598 // PS -> planes_window::update_blt_all_meassures*/
1602 // PS -> void wxQuantificationWidget::OnClean_BT(wxCommandEvent& event)
1604 // PS -> /* this->CleanContour();*/
1609 //------------------------------------------------------------------------
1610 void wxQuantificationWidget::DetectHealthySickSlice( bool minSurf , bool maxSurf ){
1617 double maxStenosis = -9999999;
1618 double maxArea = -9999999;
1620 int healthySlice = 0;
1621 int sizeHealthyRegion = GetSizeHealthyRegion();
1622 int analysisTypeStenosis= GetAnalysisTypeStenosis();
1626 //ff = fopen("c:/temp/MaracasStadistics.txt","a+");
1627 //long int endtime = clock();
1628 //double sg = (double)(endtime-startTimeRI) / (double)CLK_TCK;
1629 //fprintf(ff,"EED %p wxQuantificationWidget::DetectHealthySickSlice > RI_t = %f \n",this,sg);
1633 //startTimeCalcule = clock();
1635 GetSliceLimites(0,startslice,endslice);
1637 if (startslice>endslice){
1639 endslice=startslice;
1644 if (minSurf==false) { backSlice = _sl_Slice->GetValue(); }
1646 for (iSlice=startslice; iSlice<=endslice;iSlice++){
1649 // this is equal to the minimum surface/diameter
1650 if (analysisTypeStenosis==1 ){ stenosis = GetStenosisDiameter(iSlice); }
1651 if (analysisTypeStenosis==2 ){ stenosis = GetStenosisArea(iSlice); }
1655 areaB = _mar->_experiment->getAverageArea(iSlice-sizeHealthyRegion,iSlice+sizeHealthyRegion);
1658 if ((stenosis>maxStenosis) &&(minSurf==true)){
1659 maxStenosis=stenosis;
1662 if ((areaB>maxArea) && (maxSurf==true)){
1664 healthySlice=iSlice;
1666 MoveSlider( iSlice );
1667 _sl_Slice->SetValue( iSlice );
1670 //ff = fopen("c:/temp/MaracasStadistics.txt","a+");
1671 //endtime = clock();
1672 //sg = (double)(endtime-startTimeCalcule) / (double)CLK_TCK;
1673 //fprintf(ff,"EED %p wxQuantificationWidget::DetectHealthySickSlice > t = %f ( %d , %d , %d )\n",this,sg,startslice,endslice, endslice-startslice);
1677 MoveSlider( sickSlice );
1678 _sl_Slice->SetValue( sickSlice );
1682 MoveSlider( healthySlice );
1683 _sl_Slice->SetValue( healthySlice );
1690 //------------------------------------------------------------------------
1691 void wxQuantificationWidget::AutoQuantification(){
1692 int analysisTypeStenosis = GetAnalysisTypeStenosis();
1693 int slice = _sl_Slice->GetValue();
1694 int healthySlice = _mar->_experiment->getAxis()->getHealthySlice( );
1695 int healthySliceStart = _mar->_experiment->getAxis()->getHealthySliceStart( );
1696 int healthySliceEnd = _mar->_experiment->getAxis()->getHealthySliceEnd( );
1697 double maxStenosis = -9999999;
1700 if (healthySlice !=-1 ) {
1701 int iSickSlice,startslice,endslice;
1702 GetSliceLimites(0,startslice,endslice);
1703 if (startslice>endslice){
1705 endslice=startslice;
1708 for (iSickSlice=startslice; iSickSlice<=endslice;iSickSlice++){
1709 if (analysisTypeStenosis==1 ){ ste = GetStenosisDiameter(iSickSlice); }
1710 if (analysisTypeStenosis==2 ){ ste = GetStenosisArea(iSickSlice); }
1711 if (ste>maxStenosis){
1715 MoveSlider( iSickSlice );
1716 _sl_Slice->SetValue( iSickSlice );
1718 MoveSlider( slice );
1719 _sl_Slice->SetValue( slice );
1721 wxMessageBox( "Set an healthy slice.\n \n ","DxMM : MARACAS", wxOK | wxCENTRE | wxICON_INFORMATION, this);
1726 //------------------------------------------------------------------------
1727 int wxQuantificationWidget::GetHealthySlice(){
1728 return _mar->_experiment->getAxis()->getHealthySlice( );
1730 //------------------------------------------------------------------------
1731 void wxQuantificationWidget::SetHealthySlice(int healthySlice){
1732 if (healthySlice==-1) {
1733 healthySlice=_sl_Slice->GetValue();
1735 int sizeHealthyRegion = GetSizeHealthyRegion();
1736 int maxSlider = GetMaxActualSlice();
1737 int healthySliceStart = healthySlice - sizeHealthyRegion;
1738 int healthySliceEnd = healthySlice + sizeHealthyRegion;
1739 if (healthySliceStart < 0) { healthySliceStart = 0; }
1740 if (healthySliceEnd < 0) { healthySliceEnd = 0; }
1741 if (healthySliceStart > maxSlider) { healthySliceStart = maxSlider; }
1742 if (healthySliceEnd > maxSlider) { healthySliceEnd = maxSlider; }
1743 _mar->_experiment->getAxis()->setHealthySlice( healthySliceStart, healthySlice , healthySliceEnd);
1745 _3DWorld->Set3DHealthySliceActor( );
1746 _3DWorld->Show3DHealthySliceActor();
1747 _cb_HealthySlice->SetValue(true);
1748 _3DWorld->InitListContourActor( 1, _mar->_experiment->getNumberOfSlices() );
1750 for ( iHealthySlice=healthySliceStart ; iHealthySlice<=healthySliceEnd ; iHealthySlice++){
1751 _3DWorld->Set3DContourActor( iHealthySlice , _mar->_experiment->get3Dcontour(iHealthySlice) , true ,1);
1757 //------------------------------------------------------------------------
1758 void wxQuantificationWidget::OnHealthySlice_BT(wxCommandEvent& event){
1759 SetHealthySlice( _sl_Slice->GetValue() );
1763 // PS -> void wxQuantificationWidget::OnCalculated_BT(wxCommandEvent& event)
1766 // PS -> _index = ( $widgets(sclSlice) get )
1768 // PS -> this->Clean_Contour();
1769 // PS -> _points = GetContourPoints();
1770 // PS -> _taille = _points->Item(2) / 2;
1772 // PS -> if ( _taille > 0 )
1774 // PS -> aPolygon2D = vtkPolygon::New();
1775 // PS -> PointsContour2D = vtkPoints::New();
1776 // PS -> aPolyLine2D = vtkPolyLine::New();
1778 // PS -> _PointIds = aPolyLine2D->GetPointIds();
1779 // PS -> _PointIds->SetNumberOfIds(_taille);
1780 // PS -> _PointIdsPolygon = aPolygon2D->GetPointIds();
1781 // PS -> _PointIdsPolygon->SetNumberOfIds(_taille);
1783 // PS -> for (int i=0; i< _taille ; i++ )
1785 // PS -> _PointIds->SetId(i, i);
1786 // PS -> _PointIdsPolygon->SetId(i, i);
1787 // PS -> PointsContour2D->InsertNextPoint( _points->Item(i * 2 + 0),
1788 // PS -> _points->Item(i * 2 + 1), 0 );
1792 // PS -> aPolyLineGrid2D = vtkUnstructuredGrid::New();
1793 // PS -> aPolyLineGrid2D->Allocate(1, 1);
1794 // PS -> _param1 = aPolyLine2D->GetCellType();
1795 // PS -> _param2 = aPolyLine2D->GetPointIds();
1796 // PS -> aPolyLineGrid2D->InsertNextCell(_param1, _param2);
1797 // PS -> aPolyLineGrid2D->SetPoints(PointsContour2D);
1799 // PS -> aPolyLineMapper2D = vtkDataSetMapper::New();
1800 // PS -> aPolyLineMapper2D->SetInput(aPolyLineGrid2D);
1802 // PS -> aPolyLineActor2D = vtkActor::New();
1803 // PS -> aPolyLineActor2D->SetMapper(aPolyLineMapper2D);
1804 // PS -> _Property1 = aPolyLineActor2D->GetProperty();
1805 // PS -> _Property1->SetColor(0, 1, 0);
1806 // PS -> _Property1->SetLineWidth(2);
1807 // PS -> _Property1->SetPointSize(2);
1808 // PS -> _Property1->BackfaceCullingOff();
1810 // PS -> _pRenderer2D->AddActor(aPolyLineActor2D);
1812 // PS -> aPolygonGrid2D = vtkUnstructuredGrid::New();
1813 // PS -> aPolygonGrid2D->Allocate(1, 1);
1814 // PS -> _param1 = aPolygon2D->GetCellType();
1815 // PS -> _param2 = aPolygon2D->GetPointIds();
1816 // PS -> aPolygonGrid2D->InsertNextCell(_param1, _param2);
1817 // PS -> aPolygonGrid2D->SetPoints(PointsContour2D);
1819 // PS -> aPolygonMapper2D = vtkDataSetMapper::New();
1820 // PS -> aPolygonMapper2D->SetInput(aPolygonGrid2D);
1822 // PS -> aPolygonActor2D = vtkActor::New();
1823 // PS -> aPolygonActor2D->SetMapper(aPolygonMapper2D);
1824 // PS -> _Property1 = aPolygonActor2D->GetProperty();
1825 // PS -> _Property1->SetColor(0, 1, 0);
1826 // PS -> _Property1->SetLineWidth(2);
1827 // PS -> _Property1->SetPointSize(2);
1828 // PS -> _Property1->BackfaceCullingOff();
1830 // PS -> int arr[] = this->Params(0);
1831 // PS -> if ( arr(_e_debug_fill_area) == 1 )
1832 // PS -> _pRenderer2D->AddActor(aPolygonActor2D);
1834 // PS -> _pRenderWindow3D->Render();
1835 // PS -> _pRenderWindow2D->Render();
1843 // PS -> void wxQuantificationWidget::OnPause_BT(wxCommandEvent& event)
1845 // PS -> if ( _quantifing == 1 ) {
1846 // PS -> _quantifing = 2;
1847 // PS -> _bt_Pause->SetLabel("Play");
1848 // PS -> _mar->_experiment->backQuant();
1850 // PS -> else if ( _quantifing == 2 )
1852 // PS -> _quantifing = 1;
1853 // PS -> _bt_Pause->SetLabel("Pause");
1858 // PS -> void wxQuantificationWidget::OnDelete_BT(wxCommandEvent& event)
1861 // PS -> wxMessageDialog* Q_erase = new wxDialog(this,
1862 // PS -> _str_erase_quant_q,
1863 // PS -> "Question",
1864 // PS -> wxYES_NO|wxNO_DEFAULT|wxCENTRE,
1865 // PS -> wxPoint(100, 100));
1867 // PS -> if (Q_erase->ShowModal() == wxID_OK)
1869 // PS -> _first_quant = 1;
1870 // PS -> _real_first_point_quant = -1;
1871 // PS -> _real_last_point_quant = -1;
1872 // PS -> this->controls(1);
1873 // PS -> _quant_shown = false;
1875 // PS -> this->clean_graph();
1877 // PS -> if (_pRenderer3D != 0) _pRenderer3D->RemoveActor(hs_actor);
1878 // PS -> if (_hs_actor != 0) hs_actor->delete();
1879 // PS -> if (_hs_mapper != 0) hs_mapper->delete();
1880 // PS -> if (_hs_grid != 0) hs_grid->delete();
1881 // PS -> if (_hs_points != 0) hs_points->delete();
1882 // PS -> if (_hs_poly_line != 0) hs_poly_line->delete();
1884 // PS -> foreach i $rings_index
1887 // PS -> catch { renderer_$widgets(work3D) RemoveActor cont3DActor_{$widgets(work3D)}_{$i} }
1888 // PS -> catch { cont3DActor_{$widgets(work3D)}_{$i} Delete }
1889 // PS -> catch { cont3DMapper_{$widgets(work3D)}_{$i} Delete }
1890 // PS -> catch { cont3DGrid_{$widgets(work3D)}_{$i} Delete }
1891 // PS -> catch { cont3DPolyLine_{$widgets(work3D)}_{$i} Delete }
1892 // PS -> catch { cont3DPoints_{$widgets(work3D)}_{$i} Delete }
1895 // PS -> _rings_index = _list;
1896 // PS -> _quant_x = _list;
1897 // PS -> _quant_area = _list;
1898 // PS -> _quant_peri = _list;
1899 // PS -> _quant_darea = _list;
1900 // PS -> _quant_dperi = _list;
1901 // PS -> _quant_dmax = _list;
1902 // PS -> _quant_dmin = _list;
1903 // PS -> _quant_davg = _list;
1904 // PS -> _quant_sten = _list;
1906 // PS -> _area = 0.00;
1907 // PS -> _peri = 0.00;
1908 // PS -> _darea = 0.00;
1909 // PS -> _dperi = 0.00;
1910 // PS -> _dmax = 0.00;
1911 // PS -> _dmin = 0.00;
1912 // PS -> _davg = 0.00;
1913 // PS -> _sten = 0.00;
1914 // PS -> _shown = false;
1916 // PS -> _pRenderWindow3D->Render();
1917 // PS -> this->clean_contour();
1919 // PS -> wxMessageDialog* Q_extract = new wxDialog(this,
1920 // PS -> _str_erase_extracted_contours,
1921 // PS -> "Question",
1922 // PS -> wxYES_NO|wxNO_DEFAULT|wxCENTRE,
1923 // PS -> wxPoint(100, 100));
1925 // PS -> if (Q_extract->ShowModal() == wxID_OK)
1926 // PS -> this->cleanData();
1928 // PS -> delete Q_extract;
1931 // PS -> delete Q_erase;
1938 // PS -> void wxQuantificationWidget::OnSetPoint_BT(wxCommandEvent& event)
1940 // PS -> //set slice = [ $widgets(sclSlice) get ]
1941 // PS -> //this->select_axis_point( 0, 0, $slice
1946 //--------------------------------------------------------------------
1948 void wxQuantificationWidget::OnHealthySlice_CB(wxCommandEvent& event)
1951 /* if ( _show_hs == 1 ) {
1952 if ( _pRenderer3D != 0 )
1953 _pRenderer3D->AddActor(_hsActor3D);
1957 if ( _pRenderer3D != 0 )
1958 _pRenderer3D->RemoveActor(_hsActor3D);
1961 _pRenderWindow3D->Render(); // Maj*/
1964 int healthySlice = _mar->_experiment->getAxis( )->getHealthySlice( );
1965 if (healthySlice!=-1) {
1966 if ( _cb_HealthySlice->GetValue() )
1967 _3DWorld->Show3DHealthySliceActor();
1969 _3DWorld->Hide3DHealthySliceActor();
1974 //--------------------------------------------------------------------
1975 void wxQuantificationWidget::OnVisibleRing_CB(wxCommandEvent& event){
1976 if ( _cb_VisibleRings->GetValue() ){
1977 _3DWorld->Show3DContourActor();
1978 _2DWorld->Show2DContourDiameters();
1981 _3DWorld->Hide3DContourActor();
1982 _2DWorld->Hide2DContourDiameters();
1985 // GetNumberOfAxisPoints()
1986 /* int noap = _mar->_experiment->getNumberOfAxes();
1987 for (int i= 0; i < noap; i++ ) {
1988 if ( _show_rings == 0 ) {
1989 if ( _pRenderer3D != 0 )
1990 _pRenderer3D->RemoveActor(_contActor3D[i]);
1993 if ( _pRenderer3D != 0 )
1994 _pRenderer3D->AddActor(_contActor3D[i]);
1997 _pRenderWindow3D->Render(); // Maj*/
1999 //--------------------------------------------------------------------
2000 void wxQuantificationWidget::OnPerpendicular_CB(wxCommandEvent& event)
2002 if ( _cb_Perpendicular->GetValue() )
2003 _3DWorld->Show3DSliceActor();
2005 _3DWorld->Hide3DSliceActor();
2007 //--------------------------------------------------------------------
2009 void wxQuantificationWidget::OnGreyScale_RB(wxCommandEvent& event){
2010 if ( _rb_GreyScale->GetValue() ){
2011 _3DWorld->SetBWLookUp();
2014 //--------------------------------------------------------------------
2015 void wxQuantificationWidget::OnColor_RB(wxCommandEvent& event){
2016 if ( _rb_Color->GetValue() ){
2017 _3DWorld->SetColorLookUp();
2020 //--------------------------------------------------------------------
2021 void wxQuantificationWidget::CallBackOnLeftDClick( wxMouseEvent& event ){
2023 double pp[3], cp[3];
2024 _3DWorld->GetLast3DClickPoint(pp,cp);
2026 int i,iback,maxPoints;
2028 double dist,distMin=-1;
2031 marAxis *maraxis = _mar->_experiment->getAxis( );
2032 maxPoints = maraxis->getNumberOfSplinePoints();
2033 for ( i=0 ; i<maxPoints ; i++ ){
2034 c = maraxis->getSplinePoint(i);
2038 dist=sqrt( cc[0]*cc[0] + cc[1]*cc[1] + cc[2]*cc[2] );
2039 if ((distMin==-1) || (dist<distMin)) {
2044 _sl_Slice->SetValue(iback);
2049 //--------------------------------------------------------------------
2050 void wxQuantificationWidget::CallBackOnMouseWheel( wxMouseEvent& event ){
2051 int slice=_sl_Slice->GetValue();
2052 if (event.GetWheelRotation()>0){ slice++; }
2053 if (event.GetWheelRotation()<0){ slice--; }
2054 if (slice < _sl_Slice->GetMin() ) { slice=_sl_Slice->GetMin(); }
2055 if (slice > _sl_Slice->GetMax() ) { slice=_sl_Slice->GetMax(); }
2056 _sl_Slice->SetValue(slice);
2059 //--------------------------------------------------------------------
2060 int wxQuantificationWidget::GetActualSlice(){
2061 return _sl_Slice->GetValue();
2063 //--------------------------------------------------------------------
2064 int wxQuantificationWidget::GetMaxActualSlice(){
2065 return _sl_Slice->GetMax();
2067 //--------------------------------------------------------------------
2068 int wxQuantificationWidget::GetSizeHealthyRegion(){
2069 return _sizeHealthyRegion;
2071 //--------------------------------------------------------------------
2072 void wxQuantificationWidget::SetSizeHealthyRegion(int size){
2073 _sizeHealthyRegion = size;
2075 //--------------------------------------------------------------------
2076 void wxQuantificationWidget::GetHealthySliceRange(int &healthySliceStart,int &healthySliceEnd){
2077 healthySliceStart = _mar->_experiment->getAxis()->getHealthySliceStart( );
2078 healthySliceEnd = _mar->_experiment->getAxis()->getHealthySliceEnd( );
2080 //--------------------------------------------------------------------
2081 void wxQuantificationWidget::Set3DRegionSliceActor( int type, int k1,int k2 ){
2082 _3DWorld->Set3DRegionSliceActor(type,k1,k2);
2084 //--------------------------------------------------------------------
2085 void wxQuantificationWidget::Set3DStartRegionSliceActor( int type, int k){
2086 _3DWorld->Set3DStartRegionSliceActor(type,k);
2088 //--------------------------------------------------------------------
2089 void wxQuantificationWidget::Set3DEndRegionSliceActor( int type, int k){
2090 _3DWorld->Set3DEndRegionSliceActor(type,k);
2092 //--------------------------------------------------------------------
2093 void wxQuantificationWidget::Show3DRegionSliceActor( int type ){
2094 _3DWorld->Show3DRegionSliceActor(type);
2096 //--------------------------------------------------------------------
2097 void wxQuantificationWidget::Show3DStartRegionSliceActor( int type ){
2098 _3DWorld->Show3DStartRegionSliceActor(type);
2100 //--------------------------------------------------------------------
2101 void wxQuantificationWidget::Show3DEndRegionSliceActor( int type ){
2102 _3DWorld->Show3DEndRegionSliceActor(type);
2104 //--------------------------------------------------------------------
2105 void wxQuantificationWidget::Hide3DRegionSliceActor( int type ){
2106 _3DWorld->Hide3DRegionSliceActor(type);
2108 //--------------------------------------------------------------------
2109 void wxQuantificationWidget::Hide3DStartRegionSliceActor( int type ){
2110 _3DWorld->Hide3DStartRegionSliceActor(type);
2112 //--------------------------------------------------------------------
2113 void wxQuantificationWidget::Hide3DEndRegionSliceActor( int type ){
2114 _3DWorld->Hide3DEndRegionSliceActor(type);
2116 //--------------------------------------------------------------------
2117 void wxQuantificationWidget::GetSliceLimites(int type, int &sliceStart, int &sliceEnd){
2118 _3DWorld->GetSliceLimites(type,sliceStart,sliceEnd);
2120 //--------------------------------------------------------------------
2121 int wxQuantificationWidget::GetAnalysisTypeStenosis(){
2122 return _3DWorld->GetAnalysisTypeStenosis();
2124 //--------------------------------------------------------------------
2125 void wxQuantificationWidget::SetAnalysisTypeStenosis(int analysisTypeStenosis){
2126 _3DWorld->SetAnalysisTypeStenosis(analysisTypeStenosis);
2128 //--------------------------------------------------------------------
2129 void wxQuantificationWidget::SetManualContour_2DWorld(bool ok){
2132 _2DWorld->SetState(1);
2133 _2DWorld->EraseManualContour();
2136 _2DWorld->SetState(2);
2137 _2DWorld->CreateNewManualContour();
2143 //--------------------------------------------------------------------
2144 void wxQuantificationWidget::SetManualContour_AddPoint_2DWorld(){
2145 _bak_ActualSlice = _sl_Slice->GetValue();
2146 _2DWorld->Hide2DContourDiameters();
2147 _mar->_experiment->getAxis()->EraseContour(_bak_ActualSlice);
2148 _3DWorld->Erase3DContourActor( _bak_ActualSlice );
2150 _2DWorld->SetStateManualContour(0);
2152 //--------------------------------------------------------------------
2153 void wxQuantificationWidget::SetManualContour_InsertPoint_2DWorld(){
2154 _2DWorld->SetStateManualContour(2);
2156 //--------------------------------------------------------------------
2157 void wxQuantificationWidget::SetManualContour_ErasePoint_2DWorld(){
2158 _2DWorld->SetStateManualContour(3);
2160 //--------------------------------------------------------------------
2161 void wxQuantificationWidget::SetManualContour_MovePoint_2DWorld(){
2162 _2DWorld->SetStateManualContour(4);
2164 //--------------------------------------------------------------------
2165 void wxQuantificationWidget::SetManualContour_ReplaceContour(){
2166 if (_bak_ActualSlice!=-1){
2167 int size = _2DWorld->GetNumberOfPointsSplineManualContour();
2168 double *vx = _2DWorld->GetVectorPointsXManualContour();
2169 double *vy = _2DWorld->GetVectorPointsYManualContour();
2170 _mar->_experiment->getAxis()->replaceContour2D(_bak_ActualSlice,size,vx,vy);
2174 _bak_ActualSlice=-1;
2177 //------------------------------------------------------------------------
2178 kVolume* wxQuantificationWidget::GetVolumeAxisExtended(int wz1,int wz2)
2181 vtkImageData *imagedata;
2182 imagedata=_mar->_experiment->getSliceImage(wz1);
2184 imagedata->GetDimensions (dims);
2188 kVolume *kvol =new kVolume( kVolume::USHORT, wx, wy, wz,1, 1, 1, malloc(sizeof(unsigned short)*wx*wy*wz ) );
2189 vtkImageData *vol = kvol->castVtk();
2193 for (i=wz1;i<=wz2;i++)
2196 imagedata=_mar->_experiment->getSliceImage(i);
2199 void *p_imagedata = imagedata->GetScalarPointer(0,0,0);
2200 void *p_vol = vol->GetScalarPointer(0,0,i-wz1);
2201 memcpy( p_vol, p_imagedata , sizeof(unsigned short)*dims[0]*dims[1] );
2207 //------------------------------------------------------------------------
2208 void wxQuantificationWidget::OnContourWall()
2212 //------------------------------------------------------------------------
2213 void wxQuantificationWidget::OnContourLumen()
2217 //------------------------------------------------------------------------
2218 void wxQuantificationWidget::OnContourHypo()
2222 //------------------------------------------------------------------------
2223 void wxQuantificationWidget::OnContourCalc()
2227 //------------------------------------------------------------------------
2228 void wxQuantificationWidget::OnReplaceContourWall()
2231 //------------------------------------------------------------------------
2232 void wxQuantificationWidget::OnReplaceContourLumen()
2235 //------------------------------------------------------------------------
2236 void wxQuantificationWidget::OnReplaceContourHypo()
2240 //------------------------------------------------------------------------
2241 void wxQuantificationWidget::OnReplaceContourCalc()
2246 //------------------------------------------------------------------------
2247 void wxQuantificationWidget::OnSliderDiscontinuityScroll(int percentage)
2251 //------------------------------------------------------------------------
2252 void wxQuantificationWidget::OnSliderLumenPercentageScroll(int percentage)
2256 //------------------------------------------------------------------------
2257 void wxQuantificationWidget::OnSliderCalcPercentageScroll(int percentage)
2261 //------------------------------------------------------------------------
2262 void wxQuantificationWidget::OnCalibration()
2265 //------------------------------------------------------------------------
2266 void wxQuantificationWidget::OnFile()
2270 //------------------------------------------------------------------------
2271 void wxQuantificationWidget::OnShowAll(bool value)
2275 //------------------------------------------------------------------------
2276 void wxQuantificationWidget::OnShowWall(bool value)
2279 //------------------------------------------------------------------------
2280 void wxQuantificationWidget::OnShowLumen(bool value)
2284 //------------------------------------------------------------------------
2285 void wxQuantificationWidget::OnShowCalc(bool value)
2289 //------------------------------------------------------------------------
2290 void wxQuantificationWidget::OnShowHypo(bool value)
2295 // EOF - wxQuantificationWidget.cxx