]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.cxx
3472 TDx
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxPanelCuttingImageData.cxx
index f656c94742bae153779ad0e5866c354595881efc..7d39bdd9e5c229d5edc52171e116366edd111567 100644 (file)
 #  knowledge of the CeCILL-B license and that you accept its terms.
 # ------------------------------------------------------------------------ */
 
+#include <creaWx.h>
+#include <wx/tooltip.h>
+#include <wx/config.h>
+#include <stdlib.h>
+#include <iostream> // for std::cout
+
 
 #include "wxPanelCuttingImageData.h"
 
 wxPanelCuttingImageData::wxPanelCuttingImageData (wxWindow *parent)
 : wxPanel( parent, -1)
 {
-       _imageData=NULL;
-       _histogrammeVector=NULL;
-       _wxvtk3Dbaseview=NULL;
-       _wxvtkbaseView=NULL;
-       CreateInterface();
+       _imageData                      = NULL;
+       _histogrammeVector      = NULL;
+       _wxvtk3Dbaseview        = NULL;
+       _wxvtkbaseView          = NULL;
+       CreateInterface() ;
        CreateModel();
        Create3DViewObjects();
 }
@@ -277,24 +283,24 @@ void wxPanelCuttingImageData::CreateInterface()
 
        
        _typeFig        = new wxChoice(this,-1);
-       _opacityFig     = new wxSlider(this,-1,100,0,100, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _opacityFig     = new wxSlider(this,-1,100,0,100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
 
-       _scaleX         = new wxSlider(this,-1,6,0,500  , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _scaleY         = new wxSlider(this,-1,20,0,500 , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _scaleZ         = new wxSlider(this,-1,7,0,500  , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _scaleX         = new wxSlider(this,-1,6,0,500  , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _scaleY         = new wxSlider(this,-1,20,0,500 , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _scaleZ         = new wxSlider(this,-1,7,0,500  , wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
 
-       _rotationX      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _rotationY      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _rotationZ      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _rotationX      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _rotationY      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _rotationZ      = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
 
        _volIntern              = new wxRadioButton(this,-1, _T("Volume intern " ));
        _volExtern              = new wxRadioButton(this,-1, _T("Volume extern " ));
 
        _histogrammeAccumulated = new wxCheckBox(this,-1,_T("Histogramme accumulated"));
 
-       _isoValue                               = new wxSlider(this,-1, 200, 0,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _valueBeforeIsoValue    = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
-       _valueAfterIsoValue             = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
+       _isoValue                               = new wxSlider(this,-1, 200, 0,2000, wxDefaultPosition,wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _valueBeforeIsoValue    = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+       _valueAfterIsoValue             = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
 
        wxButton *btnExtract    = new wxButton(this, -1,_T("Extract"));
 
@@ -530,7 +536,12 @@ void wxPanelCuttingImageData::OnExtract(wxCommandEvent& event)
 
 //     _wxvtkbaseView->RefreshView();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }