]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracasFrame.cxx
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / include / wxMaracasFrame.cxx
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 /*=========================================================================
27
28  Program:   wxMaracas
29  Module:    $RCSfile: wxMaracasFrame.cxx,v $
30  Language:  C++
31  Date:      $Date: 2012/11/15 14:14:56 $
32  Version:   $Revision: 1.2 $
33
34   Copyright: (c) 2002, 2003
35   License:
36
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.
40
41 =========================================================================*/
42
43 // PS -> #include "wxMaracasDataBrowser.h"
44 #include "wxMaracasParametersDialog.h"
45 #include "wxMaracasImageBrowser.h"
46 #include "wxMaracasHelpDialog.h"
47 #include "wxMaracasFrame.h"
48 #include "marDictionary.h"
49
50 #include <wx/panel.h>
51 #include <wx/toolbar.h>
52 #include <wx/dialog.h>
53 #include <wx/colordlg.h>
54 // ----------------------------------------------------------------------------
55 // Maracas "logic world" headers
56 // ----------------------------------------------------------------------------
57
58
59 //#ifndef __WXMSW__
60 #   include "res/bitmaps/connect.xpm"
61 #   include "res/bitmaps/params.xpm"
62 #   include "res/bitmaps/imagebrowser.xpm"
63 #   include "res/bitmaps/3D.xpm"
64 #   include "res/bitmaps/plans.xpm"
65 #   include "res/bitmaps/quant.xpm"
66 #   include "res/bitmaps/rotate.xpm"
67 #   include "res/bitmaps/bright.xpm"
68 #   include "res/bitmaps/pan.xpm"
69 #   include "res/bitmaps/zoom.xpm"
70 #   include "res/bitmaps/clear.xpm"
71 #   include "res/bitmaps/intensity.xpm"
72 #   include "res/bitmaps/help.xpm"
73 #   include "res/bitmaps/creatis_logo.xpm"
74 #   include "res/icons/maracas.xpm"
75 //#endif
76
77 BEGIN_EVENT_TABLE( wxMaracasFrame, wxFrame )
78         // PS -> EVT_MENU( ID_TOOLBAR_DATA_BROWSER, wxMaracasFrame::OnLoadPatientData )
79         EVT_MENU( ID_TOOLBAR_PARAMETERS, wxMaracasFrame::OnParameters )
80         // PS -> EVT_MENU( ID_TOOLBAR_IMAGE_BROWSER, wxMaracasFrame::OnLoadImageData )
81         EVT_MENU( ID_TOOLBAR_3D_BROWSER, wxMaracasFrame::OnStartExperiment )
82         // PS -> EVT_MENU( ID_TOOLBAR_HELP, wxMaracasFrame::OnHelp )
83         EVT_MENU( ID_TOOLBAR_PLANS, wxMaracasFrame::OnQuant )
84
85 // EED : This is not top  !!!!!!!!!!!
86         EVT_TOOL( 19999, wxMaracasFrame::OnRegenerateAll                )
87         EVT_TOOL( 19998, wxMaracasFrame::OnRegenerateSplineAxe  )
88         EVT_TOOL( 19997, wxMaracasFrame::OnCleanContours                )
89         EVT_TOOL( 19996, wxMaracasFrame::OnRegenerateSignal             )
90
91
92         EVT_CLOSE( wxMaracasFrame::OnQuit )
93
94         EVT_TOOL(wxSurfaceWidget::ID_BUTTON_NEW_AXIS, wxMaracasFrame::OnNewAxis )
95         EVT_TOOL(wxSurfaceWidget::ID_BUTTON_DELETE_AXIS, wxMaracasFrame::OnDeleteAxis )
96 END_EVENT_TABLE( );
97
98 //----------------------------------------------------------------------------
99 wxMaracasFrame::wxMaracasFrame( wxFrame *parent, wxWindowID id,
100                                                            marInterface *mar,marSimpleDicom *simpleDicom, char *dictionaryFileName,
101                                                            const wxString& title, const wxPoint& pos,
102                                                            const wxSize& size, long style)
103                                                            : wxFrame( parent, id, title, pos, size, style)
104 {
105     _mar                                                = mar;
106         _marSimpleDicom                         = simpleDicom;
107         _wxmaracasquantification        = NULL;
108         _wxmaracas3dbrowser                     = NULL;
109
110         marDictionary marDict;
111 //      marDict.LoadDictionary_French();
112         marDict.LoadDictionary_English();
113 //      marDict.LoadDictionary_Japanese();
114         
115
116 /*
117         if (!marDict.LoadDictionaryFile(dictionaryFileName)){
118                         wxMessageBox( "Error: File(s) marDict.txt not found...",
119                                           "DxMM : MARACAS", wxOK | wxCENTRE | wxICON_ERROR , this);
120         }
121 */
122
123     //good luck !
124     vtkObject *a = vtkObject::New();
125     a->GlobalWarningDisplayOff();
126     a->Delete();
127
128     // At the begining, there were nothing, just a window...
129     _actual_panel = NULL;
130
131     // And the programmer said: let there be a status bar
132     this->CreateStatusBar( );
133
134     this->GetStatusBar()->SetFieldsCount( 2 );
135     wxRect rect;
136     this->GetStatusBar()->GetFieldRect(1, rect);
137     //wxPoint pos;
138     //wxSize size;
139     //_progressGauge = new wxGauge( this->GetStatusBar(), -1, 100);
140         //    _progressGauge = new wxGauge( this->GetStatusBar(), -1, 50,
141         //    rect.GetPosition(), rect.GetSize());
142     this->GetStatusBar()->Show();
143     this->PositionStatusBar();
144
145     // And an icon (to be unique)
146     //TODO change the icon to the real one!
147     this->SetIcon( wxICON( maracas_icon ) );
148
149     // And a toolbar (for dummy users)
150     this->RecreateToolbar( );
151
152 }
153 //----------------------------------------------------------------------------
154 void wxMaracasFrame::RecreateToolbar( )
155 {
156     wxToolBar* toolBar = this->GetToolBar( );
157     delete toolBar;
158     this->SetToolBar( NULL );
159
160     toolBar = this->CreateToolBar( TOOLBAR_STYLE, ID_TOOLBAR );
161
162     // Set up toolbar
163     wxBitmap toolBarBitmaps[ 22+1 ];
164
165         /**
166         * wxBitmap vs. wxBITMAP -> add _xpm at the end of the file
167         */
168     toolBarBitmaps[  0 ] = wxBITMAP( toolbar_connect );
169     toolBarBitmaps[  4 ] = wxBITMAP( toolbar_params );
170     toolBarBitmaps[  7 ] = wxBITMAP( toolbar_imagebrowser );
171     toolBarBitmaps[  9 ] = wxBITMAP( toolbar_triD );
172
173     toolBarBitmaps[ 10 ] = wxBITMAP( toolbar_plans );
174     toolBarBitmaps[ 11 ] = wxBITMAP( toolbar_quant );
175     toolBarBitmaps[ 12 ] = wxBITMAP( toolbar_rotate );
176     toolBarBitmaps[ 13 ] = wxBITMAP( toolbar_bright );
177     toolBarBitmaps[ 14 ] = wxBITMAP( toolbar_pan );
178     toolBarBitmaps[ 15 ] = wxBITMAP( toolbar_zoom );
179     toolBarBitmaps[ 16 ] = wxBITMAP( toolbar_clear );
180     toolBarBitmaps[ 17 ] = wxBITMAP( toolbar_intensity );
181     toolBarBitmaps[ 20 ] = wxBITMAP( toolbar_help );
182     toolBarBitmaps[ 22 ] = wxBITMAP( creatis_logo );
183
184     /*
185         toolBarBitmaps[  1 ] = wxBitmap( toolbar_loadexp );
186         toolBarBitmaps[  2 ] = wxBitmap( toolbar_save );
187         toolBarBitmaps[  3 ] = wxBitmap( toolbar_excel );
188         toolBarBitmaps[  5 ] = wxBitmap( toolbar_wizard );
189         toolBarBitmaps[  6 ] = wxBitmap( toolbar_back );
190         toolBarBitmaps[  8 ] = wxBitmap( toolbar_subtract );
191
192          toolBarBitmaps[ 18 ] = wxBitmap( toolbar_linear );
193          toolBarBitmaps[ 19 ] = wxBitmap( toolbar_area );
194     */
195     // Set size & margins
196     toolBar->SetMargins( 4, 4 );
197 // PS -> #ifdef DXMM
198     toolBar->SetToolBitmapSize( wxSize( toolBarBitmaps[ 4 ].GetWidth( ), toolBarBitmaps[ 4 ].GetHeight( ) ) );
199 // PS -> #else
200 // PS ->     toolBar->SetToolBitmapSize( wxSize( toolBarBitmaps[ 0 ].GetWidth( ), toolBarBitmaps[ 0 ].GetHeight( ) ) );
201 // PS -> #endif
202
203     // Adding tools
204 // PS -> #ifndef DXMM
205 // PS ->     toolBar->AddTool( ID_TOOLBAR_DATA_BROWSER, toolBarBitmaps[ 0 ], "Patient data", "Load patient data: studies & series" );
206 // PS ->     toolBar->AddSeparator( );
207 // PS ->     toolBar->AddTool( ID_TOOLBAR_IMAGE_BROWSER, toolBarBitmaps[ 7 ], "Load image data", "Load DICOM images from disk" );
208 // PS ->     toolBar->AddSeparator( );
209 // PS -> #endif
210     toolBar->AddTool( ID_TOOLBAR_3D_BROWSER, toolBarBitmaps[ 9 ], _T("Start 3D"), _T("Load 3D representation") );
211     toolBar->AddSeparator( );
212     toolBar->AddTool( ID_TOOLBAR_PLANS, toolBarBitmaps[ 10 ], _T("Plan"), _T("Planes") );
213     toolBar->AddSeparator( );
214 //    toolBar->AddTool( ID_TOOLBAR_QUANT, toolBarBitmaps[ 11 ], "Quant", "Quant" );
215 //    toolBar->AddSeparator( );
216     //The following has been commented out temporarlily
217     /*
218     toolBar->AddTool( ID_TOOLBAR_ROTATE, toolBarBitmaps[ 12 ], "Rotate", "Rotate" );
219     toolBar->AddSeparator( );
220     toolBar->AddTool( ID_TOOLBAR_BRIGHT, toolBarBitmaps[ 13 ], "Bright", "Bright" );
221     toolBar->AddSeparator( );
222     toolBar->AddTool( ID_TOOLBAR_PAN, toolBarBitmaps[ 14 ], "Pan", "Pan" );
223     toolBar->AddSeparator( );
224     toolBar->AddTool( ID_TOOLBAR_ZOOM, toolBarBitmaps[ 15 ], "Zoom", "Zoom" );
225     toolBar->AddSeparator( );
226     toolBar->AddTool( ID_TOOLBAR_CLEAR, toolBarBitmaps[ 16 ], "Clear", "Clear" );
227     toolBar->AddSeparator( );
228     toolBar->AddTool( ID_TOOLBAR_INTENSITY, toolBarBitmaps[ 17 ], "Intensity", "Intensity" );
229     toolBar->AddSeparator( );*/
230     toolBar->AddTool( ID_TOOLBAR_PARAMETERS, toolBarBitmaps[ 4 ], _T("Parameters"), _T("Load parameters for modifying") );
231     //toolBar->AddTool( ID_TOOLBAR_HELP, toolBarBitmaps[ 20 ], "Help", "Help" );
232     toolBar->AddSeparator( );
233
234         wxBitmapButton *btnCreatisLogo = new wxBitmapButton(toolBar,-1,toolBarBitmaps[ 22 ] );
235         btnCreatisLogo->SetSize(81+10,20+10);
236         btnCreatisLogo->SetBackgroundColour(wxColour(0,0,153));
237         Connect(btnCreatisLogo->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxMaracasFrame::OnAboutCreatis );
238
239         toolBar->AddControl(btnCreatisLogo);
240
241
242
243     toolBar->Realize( );
244     toolBar->SetRows( 1 );
245     toolBar->EnableTool(ID_TOOLBAR_3D_BROWSER, true);
246     toolBar->EnableTool(ID_TOOLBAR_PLANS, false);
247     toolBar->EnableTool(ID_TOOLBAR_QUANT, false);
248 }
249
250 //----------------------------------------------------------------------------
251 void wxMaracasFrame::OnAboutCreatis( wxCommandEvent& event ){
252         wxMaracasHelpDialog *dlg = new wxMaracasHelpDialog(this, -1, "Creatis", wxPoint(200,200), wxDefaultSize, wxDEFAULT_DIALOG_STYLE);
253         dlg->ShowModal();
254         dlg->Close();
255 }
256
257 //----------------------------------------------------------------------------
258 void wxMaracasFrame::OnQuit( wxCloseEvent& event ){
259
260         DeletePanels();
261         if (_mar!=NULL) { delete _mar; }
262         _mar=NULL;
263         marDictionary marDict;
264         marDict.FreeDictionary();
265
266
267 //      this->Show(FALSE);
268         this->Destroy();
269         delete this;
270 }
271 //----------------------------------------------------------------------------
272 // PS -> void wxMaracasFrame::OnLoadPatientData( wxCommandEvent& event )
273 // PS -> {
274 // PS ->        wxBusyCursor wait;
275 // PS ->     wxToolBar* toolBar = this->GetToolBar( );
276 // PS ->     //Disabling tool
277 // PS ->     //wxToolBar::EnableTool This function should only be called after Realize.
278 // PS ->     toolBar->EnableTool(ID_TOOLBAR_IMAGE_BROWSER, false);
279 // PS ->     toolBar->EnableTool(ID_TOOLBAR_3D_BROWSER, true);
280 // PS ->     toolBar->EnableTool(ID_TOOLBAR_PLANS, true);
281 // PS ->     toolBar->EnableTool(ID_TOOLBAR_QUANT, false);
282 // PS -> 
283 // PS ->        //  Create panel
284 // PS ->        if( _actual_panel != NULL ) delete _actual_panel;
285 // PS ->        wxMaracasDataBrowser* pnl = new wxMaracasDataBrowser( this, _mar, -1 );
286 // PS -> 
287 // PS ->        _actual_panel = pnl;
288 // PS -> 
289 // PS ->        // cf.: http://www.wxwindows.org/manuals/2.4.0/wx490.htm
290 // PS ->        // Force a resize. This should probably be replaced by a call to a wxFrame
291 // PS ->        // function that lays out default decorations and the remaining content window.
292 // PS ->        wxSizeEvent myevent(wxSize(-1, -1), this->GetId());
293 // PS ->        this->OnSize(myevent);
294 // PS ->        this->Show(true);
295 // PS -> 
296 // PS ->        // Load panel data
297 // PS ->        pnl->LoadData( );
298 // PS ->        //this->GetToolBar()->EnableTool(ID_TOOLBAR_3D_BROWSER, false);
299 // PS -> }
300 //----------------------------------------------------------------------------
301 void wxMaracasFrame::OnParameters( wxCommandEvent& event )
302 {
303 /* EED Photo Maracas
304   //-- 
305         wxWindowDC *wxwindc =new wxWindowDC(this);
306         wxCoord w, h;
307         wxwindc->GetSize(&w, &h);
308         wxBitmap *wxbitmap =new wxBitmap(w, h);
309         wxMemoryDC *wxmemorydc = new wxMemoryDC();
310
311         wxmemorydc->SelectObject(*wxbitmap);
312         wxmemorydc->Blit(0,0,w,h,wxwindc,0,0);
313
314         wxbitmap->SaveFile("c:/tmp/MaracasPlamavic.bmp", wxBITMAP_TYPE_BMP  );
315         delete wxwindc;
316         delete wxbitmap;
317         delete wxmemorydc;
318   //--  
319 */
320         wxMaracasParametersDialog *d = new wxMaracasParametersDialog( this, _mar );
321         d->ShowModal( );
322         d->Close(true);
323 /*
324         if (d->IfInitContour()==true){
325         } else {
326         }
327         if (d->GetInitContour()==true){
328         }
329         wxmaracasquantification;
330         if (wxmaracas3dbrowser!=NULL){ 
331         }
332 */
333 }
334 //----------------------------------------------------------------------------
335 // PS -> void wxMaracasFrame::OnLoadImageData( wxCommandEvent& event )
336 // PS -> {
337 // PS ->        wxBusyCursor wait;
338 // PS -> 
339 // PS ->        //  Create panel
340 // PS ->        if( _actual_panel != NULL ) delete _actual_panel;
341 // PS ->        wxMaracasImageBrowser* pnl = new wxMaracasImageBrowser( this, _mar, -1 );
342 // PS -> 
343 // PS ->        // Resize
344 // PS ->        _actual_panel = pnl;
345 // PS -> 
346 // PS ->        // Load panel data
347 // PS ->        wxSizeEvent myevent(wxSize(-1, -1), this->GetId());
348 // PS ->        this->OnSize(myevent);
349 // PS ->        //this->Show(true);
350 // PS -> 
351 // PS ->        //wxDialog dialog(this, -1, "coucou");
352 // PS ->        //dialog.ShowModal();
353 // PS ->        //dialog.Show(true);
354 // PS ->        //wxGauge gauge( this, -1, 50);
355 // PS -> 
356 // PS ->     /**
357 // PS ->        AS a first step I'll pass a wxGauge as parameter this doesn't
358 // PS ->        sound very good, should use EVT_TIMER instead...
359 // PS ->     */
360 // PS ->     _mar->_dicom->loadActualSerie( this->_progressGauge );
361 // PS ->     vtkImageData *dummy = _mar->_dicom->getVolume( )->castVtk();
362 // PS ->     //float range[2];
363 // PS ->     //dummy->GetScalarRange( range );
364 // PS -> 
365 // PS ->     pnl->LoadData( dummy );
366 // PS ->     //_view_image->ConstructVTK(  (vtkImageData *)_mar->_dicom->getVolume( ));
367 // PS ->     //^ this is not working ??? I don't understand why, some VTK pipeline mystery
368 // PS -> 
369 // PS ->     this->GetToolBar()->EnableTool(ID_TOOLBAR_IMAGE_BROWSER, false);
370 // PS ->     this->GetToolBar()->EnableTool(ID_TOOLBAR_3D_BROWSER, true);
371 // PS ->        //Add patient name to the frame title
372 // PS ->     this->SetTitle( "Patient Name : " + _mar->_dicom->GetPatientName() );
373 // PS -> }
374 //----------------------------------------------------------------------------
375 void wxMaracasFrame::OnStartExperiment( wxCommandEvent& event )
376 {
377         
378         wxBusyCursor wait;
379
380         int voi[ 6 ];
381 // PS -> #ifndef DXMM
382 // PS ->     ((wxMaracasImageBrowser*)_actual_panel )->GetROI( voi );
383 // PS -> #else
384
385         _marSimpleDicom->loadActualSerie( this->_progressGauge );
386         _mar->_dicom->SetVolume( _marSimpleDicom->getVolume() );
387
388
389         voi[0] = 0;
390         voi[1] = (_mar->_dicom->getVolume( )->getXdim( ))-1;
391         voi[2] = 0;
392         voi[3] = (_mar->_dicom->getVolume( )->getYdim( ))-1;
393         voi[4] = 0;
394         voi[5] = (_mar->_dicom->getVolume( )->getZdim( ))-1;
395 // PS -> #endif
396
397         _mar->_experiment->setVOI( voi );
398         _mar->initExperiment( );
399
400         //  Create panel
401     DeletePanels();
402         _wxmaracas3dbrowser = new wxMaracas3DBrowser( this, _mar, -1 ,ID_TOOLBAR_PLANS);
403
404         // Resize
405         _actual_panel = _wxmaracas3dbrowser;
406
407         wxSizeEvent myevent(wxSize(-1, -1), this->GetId());
408         this->OnSize(myevent);
409         //this->Show(true);
410
411         // Load panel data
412         _wxmaracas3dbrowser->LoadData( );
413
414 // PS -> #ifndef DXMM
415 // PS ->        this->GetToolBar()->EnableTool(ID_TOOLBAR_IMAGE_BROWSER, true);
416 // PS ->        this->GetToolBar()->EnableTool(ID_TOOLBAR_3D_BROWSER, false);
417 // PS -> #else
418         this->GetToolBar()->EnableTool(ID_TOOLBAR_PLANS, false);
419         this->GetToolBar()->EnableTool(ID_TOOLBAR_3D_BROWSER, false);
420         this->GetToolBar()->EnableTool(ID_TOOLBAR_QUANT, false);
421 // PS -> #endif
422 }
423 //----------------------------------------------------------------------------
424 // PS -> void wxMaracasFrame::OnHelp (wxCommandEvent& event )
425 // PS -> {
426 // PS ->        wxMaracasHelpDialog* help = new wxMaracasHelpDialog(this, -1);
427 // PS -> 
428 // PS ->        help->ShowModal();
429 // PS -> }
430
431 //----------------------------------------------------------------------------
432 void wxMaracasFrame::DeletePanels ( ){
433         if (_wxmaracasquantification!=NULL){ 
434                 delete _wxmaracasquantification;
435                 _wxmaracasquantification=NULL;
436         }
437         if (_wxmaracas3dbrowser!=NULL){ 
438                 delete _wxmaracas3dbrowser;
439                 _wxmaracas3dbrowser=NULL;
440         }
441 }
442 //----------------------------------------------------------------------------
443 void wxMaracasFrame::OnQuant (wxCommandEvent& event ){
444         int isovalue = 50;
445         int opacity  = 50;
446
447         if (_wxmaracas3dbrowser!=NULL){ 
448                 isovalue = _wxmaracas3dbrowser->GetIsovalue();
449                 opacity  = _wxmaracas3dbrowser->GetOpacity();
450         }
451
452     DeletePanels();
453         _wxmaracasquantification = new wxMaracasQuantification( this, _mar, -1 );
454         _actual_panel = _wxmaracasquantification;
455
456         wxSizeEvent myevent(wxSize(-1, -1), this->GetId());
457         this->OnSize(myevent);
458         this->Show(true);
459
460         // Load panel data
461         _wxmaracasquantification->LoadData( );
462         _wxmaracasquantification->SetSlider_Isovalue_Opacity(isovalue,opacity);
463         this->GetToolBar()->EnableTool(ID_TOOLBAR_PLANS, false);
464         this->GetToolBar()->EnableTool(ID_TOOLBAR_3D_BROWSER, true);
465 }
466 //----------------------------------------------------------------------------
467 void wxMaracasFrame::OnNewAxis(wxCommandEvent &WXUNUSED(event))
468 {
469         this->GetToolBar()->EnableTool(ID_TOOLBAR_PLANS, true);
470         this->GetToolBar()->EnableTool(ID_TOOLBAR_3D_BROWSER, false);
471         this->GetToolBar()->EnableTool(ID_TOOLBAR_QUANT, true);
472 }
473 //----------------------------------------------------------------------------
474 void wxMaracasFrame::OnDeleteAxis(wxCommandEvent &WXUNUSED(event))
475 {
476         this->GetToolBar()->EnableTool(ID_TOOLBAR_PLANS, false);
477         this->GetToolBar()->EnableTool(ID_TOOLBAR_3D_BROWSER, false);
478         this->GetToolBar()->EnableTool(ID_TOOLBAR_QUANT, false);
479 }
480 //----------------------------------------------------------------------------
481 void wxMaracasFrame::OnRegenerateAll(  wxCommandEvent& event  ){
482         if (_wxmaracas3dbrowser!=NULL)          { _wxmaracas3dbrowser->RegenerateAll(true);             }
483         if (_wxmaracasquantification!=NULL) { _wxmaracasquantification->RegenerateAll(true);}
484 }
485 //----------------------------------------------------------------------------
486 void wxMaracasFrame::OnRegenerateSplineAxe(  wxCommandEvent& event  ){
487         if (_wxmaracas3dbrowser!=NULL)          { _wxmaracas3dbrowser->RegenerateAll(false);            }
488         if (_wxmaracasquantification!=NULL) { _wxmaracasquantification->RegenerateAll(false);   }
489 }
490 //----------------------------------------------------------------------------
491 void wxMaracasFrame::OnCleanContours(  wxCommandEvent& event  ){
492         if (_wxmaracasquantification!=NULL) { _wxmaracasquantification->CleanContours();        }
493 }
494 //----------------------------------------------------------------------------
495 void wxMaracasFrame::OnRegenerateSignal(  wxCommandEvent& event  ){
496         if (_wxmaracasquantification!=NULL) { _wxmaracasquantification->RegenerateSignal();     }
497 }
498 //----------------------------------------------------------------------------
499
500
501