]> Creatis software - creaMaracasVisu.git/commitdiff
#3138 creaMaracasVisu Feature New Normal - branch vtk7itk4wx3
authorEduardo DAVILA <davila@localhost.localdomain>
Wed, 4 Oct 2017 12:45:41 +0000 (14:45 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Wed, 4 Oct 2017 12:45:41 +0000 (14:45 +0200)
50 files changed:
bbtk/src/bbmaracasvisuContourVOI.cxx
lib/GUI/Wx/SurfaceRenderer/wxMaracasSurfaceRendering.cxx
lib/GUI/Wx/VolumeRenderer/wxMaracasMultipleVolumeRendererView.cxx
lib/maracasVisuLib/src/CutModule/kernel/CutModelManager.h
lib/maracasVisuLib/src/interface/wxWindows/CMakeLists.txt
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/include/wxImageViewerWidget.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualBaseModel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContour3DControler.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoint.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/vtkInteractorManualPaint.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/wxManualPaintPanel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialog.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramWidget.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mathplot.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mathplot.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotter.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractor.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyle3DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleMPRView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleSphere.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkPlane2DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget2.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRenderTabbedPanel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasRendererView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxPanelCuttingImageData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSTLWidget_03.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx [deleted file]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.h [deleted file]
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorEditContour.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractorPlus.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewVolCntrlPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx
lib/maracasVisuLib/src/kernel/marParameters.cpp

index 536d67833e6ab35e184e288bcecc4b682c668bef..5ed739c404743cfc4bf63649f7641d0b08e93f42 100644 (file)
@@ -64,13 +64,21 @@ END_EVENT_TABLE( );
                        initializeVOIWidget();
                }                       
   }
-   void wxWidgetVOI::initializeVOIWidget(){
+
+   void wxWidgetVOI::initializeVOIWidget()
+       {
           wxSizer* sizer = this->GetSizer();
 
 
 /// \TODO fix deprecated warning: virtual bool wxSizer::Remove(wxWindow*) is deprecated (declared at /usr/include/wx-2.8/wx/sizer.h:513)               
-               if(mcontourvoiwidget!=NULL){
-                       sizer->Remove(  mcontourvoiwidget );    
+               if(mcontourvoiwidget!=NULL)
+               {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                       sizer->Remove( mcontourvoiwidget );     
+#else
+                       sizer->Detach( mcontourvoiwidget );     
+#endif
                        mcontourvoiwidget->Destroy();
                }
 
@@ -84,10 +92,13 @@ END_EVENT_TABLE( );
                this->Refresh();
   }
 
-  void wxWidgetVOI::setBaseView(wxVtkBaseView * wxvtkbaseview){
+  void wxWidgetVOI::setBaseView(wxVtkBaseView * wxvtkbaseview)
+       {
          this->wxvtkbaseview = wxvtkbaseview;
   }
-  void wxWidgetVOI::setImageData(vtkImageData * imagedata){
+
+  void wxWidgetVOI::setImageData(vtkImageData * imagedata)
+       {
          this->imagedata = imagedata;
   }
 
index 4f544318ab6a6e849e08548cce97345543886759..8f969e4dd679ed95e2a7ff4babb68960d7abd921 100644 (file)
@@ -289,7 +289,14 @@ ToolBar::ToolBar(wxWindow * parent,std::string iconsdir)
        //iconfil+= "/OpenImage.png";
        //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
        wxBitmap bitmap0(OpenImage_xpm);
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
+#else
+       this->AddTool(1, wxString(_T("test")),bitmap0,  wxString(_T("Open File")),  wxITEM_NORMAL );
+#endif
+
        
        /*iconfil+= "/Open.png";
        wxBitmap* bitmap2 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
index c70043ebd797040fa2d5a00368fad2dc44666228..4560348f8f9a405b25dd3677e7be15de2e6f7bb7 100644 (file)
@@ -230,7 +230,15 @@ ToolBarMultipleVolumeRenderer::ToolBarMultipleVolumeRenderer(wxWindow * parent,s
        //iconfil+= "/OpenImage.png";
        //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
        wxBitmap bitmap0(OpenImage_xpm);
+
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
+#else
+       this->AddTool(1, wxString(_T("test")),bitmap0 , wxString(_T("Open File")), wxITEM_NORMAL );
+#endif
+
 
        /*iconfil+= "/Open.png";
        wxBitmap* bitmap2 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
index 88553021b0a32023622e76e65d49af8b03614aeb..674bde438914a2c60eb7bf1546bb2e58c39a2a0e 100644 (file)
@@ -65,7 +65,7 @@ PURPOSE.  See the above copyright notice for more information.
 #include "CutModelPolygon.h"
 #include "vtkInteractorStyleTrackballCamera.h"
 #include "vtkInteractorStyleCutter.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 #include "vtkImplicitSelectionLoop.h"
 #include "vtkPolyDataMapper.h"
 #include "vtkSampleFunction.h"
index 23449a77213fb9e47189a527576fc322a68bcd2e..fb4cbf4f2de6c57caee320faec5d7da8a144af99 100644 (file)
@@ -85,8 +85,8 @@ SET(MARACAS_LIB_SRCS
   
   
        
-  widgets/wxVTKRenderWindowInteractor.cxx
-  widgets/wxVTKRenderWindowInteractor.h
+##  widgets/wxVTKRenderWindowInteractor.cxx
+##  widgets/wxVTKRenderWindowInteractor.h
   widgets/wxVTKRenderWindowInteractorEditContour.cxx
   widgets/wxVTKRenderWindowInteractorEditContour.h
   widgets/vtk3DSurfaceWidget.cxx
@@ -177,8 +177,8 @@ SET(MARACAS_LIB_SRCS_02
   wxMaracasHelpDialog.h
   wxMaracasQuantification.cxx
   wxMaracasQuantification.h
-  widgets/wxVTKRenderWindowInteractor.cxx
-  widgets/wxVTKRenderWindowInteractor.h
+##  widgets/wxVTKRenderWindowInteractor.cxx
+##  widgets/wxVTKRenderWindowInteractor.h
   widgets/wxVTKRenderWindowInteractorEditContour.cxx
   widgets/wxVTKRenderWindowInteractorEditContour.h
   widgets/vtk3DSurfaceWidget.cxx
index 77a55799d4d1ff92dfc53ef8cbf3440c68fe413c..316f7851eb5561ed15c7bd9fed4fd6abb2378a97 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "wxMPRBaseData.h"
 #include "wxVtk2DBaseView.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 #include "vtkTextProperty.h"
 
 
index 02d3f4324bf1453f0deac9414299bef52aa11759..2953844359ef8ae225d078ba9985b0fb0083e5c4 100644 (file)
@@ -361,6 +361,9 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT
 //------------------------------------------------------------------------
        void WidgetShowNPoints::OnSavePoints(wxCommandEvent& event)
        {
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                wxFileDialog* FD = new wxFileDialog( 0,
                                             _T("Save points .."),
                                             _T(""),
@@ -368,7 +371,17 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT
                                             _T("(*.xls)|*.xls"),
                                             wxSAVE | wxOVERWRITE_PROMPT,
                                             wxDefaultPosition);
-               //EED
+#else
+               wxFileDialog* FD = new wxFileDialog( 0,
+                                            _T("Save points .."),
+                                            _T(""),
+                                            _T(""),
+                                            _T("(*.xls)|*.xls"),
+                                            wxFD_SAVE | wxFD_OVERWRITE_PROMPT,
+                                            wxDefaultPosition);
+#endif
+
+
 
                int result_FD = FD->ShowModal();
                
@@ -386,6 +399,9 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT
 //------------------------------------------------------------------------
        void WidgetShowNPoints::OnLoadPoints(wxCommandEvent& event)
        {
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                wxFileDialog* FD = new wxFileDialog( 0,
                                              _T("Load points .."),
                                              _T(""),
@@ -393,6 +409,15 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT
                                              _T("(*.xls)|*.xls"),
                                              wxOPEN | wxFILE_MUST_EXIST,
                                              wxDefaultPosition);
+#else
+               wxFileDialog* FD = new wxFileDialog( 0,
+                                             _T("Load points .."),
+                                             _T(""),
+                                             _T(""),
+                                             _T("(*.xls)|*.xls"),
+                                             wxFD_OPEN | wxFD_FILE_MUST_EXIST,
+                                             wxDefaultPosition);
+#endif
                int i;
                //EED
                int result_FD = FD->ShowModal();
index ea2808be1fdd6bae7712287db1c347dc166640fc..932e1c7c6d10cb3d2e947a5fe0534a15399870b1 100644 (file)
@@ -113,7 +113,7 @@ void wxVtk2DView_TMP::Configure() // virtual
        interactorstylebaseview = vtkInteractorStyleBaseView2D::New();
 
     SetInteractorStyleBaseView(interactorstylebaseview);
-       wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+       crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
        interactorstylebaseview->SetInteractor ( iren );
        iren->SetInteractorStyle(interactorstylebaseview);
        interactorstylebaseview->SetwxVtkBaseView(this);  
@@ -124,7 +124,7 @@ void wxVtk2DView_TMP::SetWxVTKRenderWindowInteractor( wxVTKRenderWindowInteracto
        _wxVTKiren = wxVTKiren;
 }
 //----------------------------------------------------------------------------
-wxVTKRenderWindowInteractor *wxVtk2DView_TMP::GetWxVTKRenderWindowInteractor() // virtual
+crea::wxVTKRenderWindowInteractor *wxVtk2DView_TMP::GetWxVTKRenderWindowInteractor() // virtual
 {
        return _wxVTKiren;
 }
@@ -526,9 +526,10 @@ void wxImageViewerWidgetRoi::ExecuteEvent(vtkObject *wdg, unsigned long event, v
         _pts->SetPoint(2, XX   , YY    , p0[2]);
         _pts->SetPoint(3, p0[0]        , YY    , p0[2]);
         _imageViewer->Render();
-      }
+      } // if
     }
-  if ( event == vtkCommand::LeftButtonReleaseEvent ){
+  if ( event == vtkCommand::LeftButtonReleaseEvent )
+       {
        _bboxEnabled = false;
     //EED} else if ( event == vtkCommand::MouseWheelForwardEvent ){
     } else if ( event == wxEVT_MOUSEWHEEL+10000 ){
@@ -545,7 +546,7 @@ void wxImageViewerWidgetRoi::ExecuteEvent(vtkObject *wdg, unsigned long event, v
         } else {
           //neither ctrl nor shift has been pressed:
           slice += 5;
-        }
+        } // if
 
         slice = slice > min ? slice : min;
         slice = slice < max ? slice : max;
@@ -571,7 +572,8 @@ void wxImageViewerWidgetRoi::ExecuteEvent(vtkObject *wdg, unsigned long event, v
     } else if ( event == wxEVT_MOUSEWHEEL+10001 ){
 
 //      _sliceEnabled = false;
-        if( _wxVTKiren->GetControlKey () ){
+        if( _wxVTKiren->GetControlKey () )
+               {
           slice -= 10;
         } else if( _wxVTKiren->GetShiftKey () ) {
           slice--;
@@ -579,35 +581,33 @@ void wxImageViewerWidgetRoi::ExecuteEvent(vtkObject *wdg, unsigned long event, v
           //neither ctrl nor shift has been pressed:
           slice -= 5;
                  slice = (slice /5) * 5;
-        }
+        } // if
 
         slice = slice > min ? slice : min;
         slice = slice < max ? slice : max;
 
-
 #if (VTK_MAJOR_VERSION >= 5)
                _imageViewer->SetSlice( slice );
 #else
                _imageViewer->SetZSlice( slice );
 #endif
 
-
         //This is not nedeed any more since vtkImageViewer2.cxx -r1.9
         //imageViewer->GetRenderer()->ResetCameraClippingRange();
 
                wxMouseEvent mouseEvent;
                mouseEvent.m_wheelRotation=-130;
-               if (_intVtkPanWid!=NULL) { 
+               if (_intVtkPanWid!=NULL) 
+               { 
                        _intVtkPanWid->CallBackOnMouseWheel(mouseEvent);
-               }
+               } // if
         _imageViewer->Render();
-
     }
-
 }
-//----------------------------------------------------------------------------
-void wxImageViewerWidgetRoi::ConstructVTK(vtkImageData *imageData){
 
+//----------------------------------------------------------------------------
+void wxImageViewerWidgetRoi::ConstructVTK(vtkImageData *imageData)
+{
   wxImageViewerWidget::ConstructVTK(imageData);
   _interactorStyle2DMaracas->SetObserver(_Observer);
 
@@ -619,7 +619,6 @@ void wxImageViewerWidgetRoi::ConstructVTK(vtkImageData *imageData){
   _pts->SetPoint(2,  1000      ,  1000 ,  1000 );
   _pts->SetPoint(3, -1000      ,  1000 ,     0 );
 
-
   vtkCellArray *lines = vtkCellArray::New();
   lines->InsertNextCell(5);
   lines->InsertCellPoint(0);
@@ -633,7 +632,6 @@ void wxImageViewerWidgetRoi::ConstructVTK(vtkImageData *imageData){
   _pd->SetLines( lines );
   lines->Delete();  //do not delete lines ??
 
-
        _bboxActor                                              =       vtkActor::New();
     _bboxMapper                                                =       vtkPolyDataMapper::New();
 
@@ -650,6 +648,7 @@ void wxImageViewerWidgetRoi::ConstructVTK(vtkImageData *imageData){
 }
 
 //----------------------------------------------------------------------------
-bool wxImageViewerWidgetRoi::GetRoiSelected(){
+bool wxImageViewerWidgetRoi::GetRoiSelected()
+{
        return _RoiSelected;
 }
index abcaa02ba16b1e6d306b656c7675f3fde2272593..10d1bcb0f56fcbecba51758e7c51cf9808a53217 100644 (file)
@@ -66,11 +66,11 @@ class wxVtk2DView_TMP : public wxVtkBaseView{
 public:
        wxVtk2DView_TMP(vtkImageViewer2 *imageviewer2);
        ~wxVtk2DView_TMP();
-       virtual vtkRenderer             *GetRenderer(); 
-       virtual vtkRenderWindow *GetRenWin();
-       virtual void                    Configure();
-       void                                    SetWxVTKRenderWindowInteractor( wxVTKRenderWindowInteractor *wxVTKiren);
-       virtual wxVTKRenderWindowInteractor *GetWxVTKRenderWindowInteractor();
+       virtual vtkRenderer                     *GetRenderer(); 
+       virtual vtkRenderWindow         *GetRenWin();
+       virtual void                            Configure();
+       void                                            SetWxVTKRenderWindowInteractor( wxVTKRenderWindowInteractor *wxVTKiren);
+       virtual crea::wxVTKRenderWindowInteractor *GetWxVTKRenderWindowInteractor();
 
 private:
        wxVTKRenderWindowInteractor *_wxVTKiren;
index a82afc9645190281efa07aa7ba7150cf07e54891..5815971523b9cb04a3334465ef87b9722e6e3145 100644 (file)
@@ -42,7 +42,7 @@
 #include <vtkDataSetMapper.h>
 #include <vtkUnstructuredGrid.h>
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 #include <vector>
 #include "wxVtkBaseView.h"
index 8bf041127c9eeafcce1336488f22711392fd6986..2682cae3a4beeaf1e0686173790226e8c0924525 100644 (file)
@@ -58,7 +58,7 @@ void manualContour3DControler::CopyAttributesTo( manualContour3DControler * clon
 bool  manualContour3DControler::OnLeftButtonDown()
 {
        int X,Y;
-       wxVTKRenderWindowInteractor *wxVTKiren;
+       crea::wxVTKRenderWindowInteractor *wxVTKiren;
        wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
        wxVTKiren->GetEventPosition(X,Y);
        MouseClickLeft(X,Y);
index 4475960f5df055a4f823c84e8f2842fc1ee698ee..5b561fb3b15a4dd4b29f354821d28f41191a0c0d 100644 (file)
@@ -87,7 +87,7 @@ bool manualContourBaseControler::OnChar()
                char keyCode = _vtkInteractorStyleBaseView->GetInteractor()-> GetKeyCode();
 
                int X,Y;
-               wxVTKRenderWindowInteractor *_wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *_wxVTKiren;
                _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                _wxVTKiren->GetEventPosition(X, Y);
                //int Z = GetZ(); // JPRx
@@ -169,7 +169,7 @@ bool manualContourBaseControler::OnMouseMove()
        if ( _vtkInteractorStyleBaseView!=NULL)
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *_wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *_wxVTKiren;
                _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                _wxVTKiren->GetEventPosition( X , Y );
 
@@ -187,7 +187,7 @@ bool manualContourBaseControler::OnLeftButtonDown()
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition(X,Y);
 
@@ -201,7 +201,7 @@ bool manualContourBaseControler::OnLeftButtonUp()
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition(X,Y);
                MouseReleaseLeft(X,Y);
@@ -214,7 +214,7 @@ bool manualContourBaseControler::OnLeftDClick()
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition(X,Y);
 
@@ -229,7 +229,7 @@ bool manualContourBaseControler::OnMiddleButtonDown()
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition(X,Y);
                GetManualViewBaseContour()->InitMove( X, Y,GetZ());
@@ -247,7 +247,7 @@ bool manualContourBaseControler::OnRightButtonDown()
        if( _vtkInteractorStyleBaseView!= NULL )
        {
                int X,Y;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition(X, Y);
 
index fedb9de69276fbce8448c77ed36671b165112b20..8020cc4a89ea98cab414e5560e83cbc5e7979592 100644 (file)
@@ -61,7 +61,7 @@
 //#include "widgets/InteractorStyleMaracas.h"
 #include "InteractorStyleMaracas.h"
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 
 //--
index d021a3212746f5d6b3f421181864d78d73a04847..2beb5ae2ce37ecbd1f91745321c977f51fab3340 100644 (file)
@@ -46,7 +46,7 @@
 #include <vtkDataSetMapper.h>
 #include <vtkUnstructuredGrid.h>
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 
 //--
index 2a8a7588e493cbe8acdf0ca10f334b5d22f836f7..800e47b1f124c72f21a0ac5818ae317e97f50c87 100644 (file)
@@ -57,7 +57,7 @@
 #include <vtkDataSetMapper.h>
 #include <vtkUnstructuredGrid.h>
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 
 //--
index e0a8f8209324c8617455d8a53e7630aeffa8835f..84e2b95e6d2e71780d51e460cc0e5e8751f6f5cd 100644 (file)
@@ -44,7 +44,7 @@
 #include <vtkDataSetMapper.h>
 #include <vtkUnstructuredGrid.h>
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 #include <vector>
 #include "wxVtkBaseView.h"
index f058df7f60adf1a9693f76a39a496d44c7c3609f..9e0945604c29068e0e5a131b2d70cace9c7f3aa4 100644 (file)
@@ -52,7 +52,7 @@ bool manualInteractorWindowLevel::OnMouseMove()                       // virtual
        if (_stateWindowLevel==true)
        {
                int tmpPx,tmpPy;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition( tmpPx , tmpPy );
 
@@ -127,7 +127,7 @@ bool manualInteractorWindowLevel::OnMiddleButtonDown()      // virtual
        if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) &&
                (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ){
                _stateWindowLevel       = true;
-               wxVTKRenderWindowInteractor *wxVTKiren;
+               crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition( _backPx , _backPy );
                _backWindow = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorWindow();
index b6af3ea5366170be78d96c35361e72fbba9e7eca..ae4e8b99052e791c09db49f633c8495dcdcb2dfe 100644 (file)
 #include "vtkInteractorManualPaint.h"
 
 #include "wxVtk2DBaseView.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
-vtkInteractorManualPaint::vtkInteractorManualPaint(ManualPaintControler* mpc) {
-       _manualPaintControler = mpc;
-       _state          = false;
-       _stateKey       = false;
-       _stateMouse = false;
+vtkInteractorManualPaint::vtkInteractorManualPaint(ManualPaintControler* mpc) 
+{
+       _manualPaintControler   = mpc;
+       _state                                  = false;
+       _stateKey                               = false;
+       _stateMouse                     = false;
 }
 
 //---------------------------------------------------------------------------
-vtkInteractorManualPaint::~vtkInteractorManualPaint() {
+vtkInteractorManualPaint::~vtkInteractorManualPaint() 
+{
 }
 
 //---------------------------------------------------------------------------
-bool vtkInteractorManualPaint::OnChar() {
+bool vtkInteractorManualPaint::OnChar() 
+{
        vtkRenderWindowInteractor *interactor = _vtkInteractorStyleBaseView->GetInteractor();
-       if (interactor->GetKeyCode() == 97) {
+       if (interactor->GetKeyCode() == 97) 
+       {
                _stateKey = !_stateKey;
        }
        return true;
 }
 
 //---------------------------------------------------------------------------
-bool vtkInteractorManualPaint::OnLeftButtonDown() {
+bool vtkInteractorManualPaint::OnLeftButtonDown() 
+{
        vtkRenderWindowInteractor *interactor =
                        _vtkInteractorStyleBaseView->GetInteractor();
        if (interactor->GetControlKey() == 1) {
@@ -61,9 +66,12 @@ bool vtkInteractorManualPaint::OnLeftButtonDown() {
 }
 
 //---------------------------------------------------------------------------
-bool vtkInteractorManualPaint::OnLeftButtonUp() {
+bool vtkInteractorManualPaint::OnLeftButtonUp() 
+{
     if((_state == true) || (_stateKey == true))
+       {
        _manualPaintControler->SetImageUndo();
+       }
        _state = false;
        return true;
 }
@@ -75,7 +83,7 @@ bool vtkInteractorManualPaint::OnMouseMove()
        {
                wxVtk2DBaseView *wxvtk2Dbaseview =
                                (wxVtk2DBaseView*) _vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
-               wxVTKRenderWindowInteractor *wxVTKiren =
+               crea::wxVTKRenderWindowInteractor *wxVTKiren =
                                wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor();
                int px, py;
                wxVTKiren->GetEventPosition(px, py);
index ab311ae392aaa469c0c690c4ff9dbfe323cd7c26..57fd497a452561a4a12581e93187cf765dd599f6 100644 (file)
@@ -72,7 +72,14 @@ wxManualPaintPanel::wxManualPaintPanel( wxWindow * parent )
        this->_gConfigSizer->Add( _mBarSlices, 1, wxGROW );
        //GrayLevel Slider
        this->_gConfigSizer->Add( _txtGrayLevel );
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFlexGridSizer *sizerGrayLevel = new wxFlexGridSizer( 2, wxHORIZONTAL );
+#else
+       wxFlexGridSizer *sizerGrayLevel = new wxFlexGridSizer( 2 );
+#endif
+
        sizerGrayLevel->Add( _sldGrayLevel, 1, wxGROW );
        sizerGrayLevel->Add( _graylevelCtrl, 1,
                wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
@@ -87,7 +94,14 @@ wxManualPaintPanel::wxManualPaintPanel( wxWindow * parent )
                new wxStaticText( this, -1, _T("Brush Settings") ) );
        //BrushSize Slider
        this->_brushSizer->Add( _txtBrushSize );
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFlexGridSizer *sizersdlBrushSize = new wxFlexGridSizer( 2, wxHORIZONTAL );
+#else
+       wxFlexGridSizer *sizersdlBrushSize = new wxFlexGridSizer( 2 );
+#endif
+
        sizersdlBrushSize->Add( _sldBrushSize, 1, wxGROW );
        sizersdlBrushSize->Add( _BrushSizeCtrl, 1,
                wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
index bd2d1e4559b1f29ab1625b294707a4911461671a..082c05b6083fbe62639ec070485c30f6ba1293cf 100644 (file)
@@ -359,7 +359,14 @@ wxSizer* HistogramDialog::getControls(bool extracontrols){
 
 void HistogramDialog::OnSaveData(wxCommandEvent& event)
 {
-       wxString nameF=wxFileSelector(_T("Save Data"), _T(" "),_T(""),_T(""),_T("*.*"),wxSAVE, NULL, -1,  -1);//wxFileSelector(_T("Save Data"),wxSAVE);
+       //wxFileSelector(_T("Save Data"),wxSAVE);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+       wxString nameF=wxFileSelector(_T("Save Data"), _T(" "),_T(""),_T(""),_T("*.*"),wxSAVE, NULL, -1,  -1);
+#else
+       wxString nameF=wxFileSelector(_T("Save Data"), _T(" "),_T(""),_T(""),_T("*.*"),wxFD_SAVE, NULL, -1,  -1);
+#endif
+
        std::ofstream file;
        if(nameF.CompareTo( _T("/0") )>0)
                file.open( (const char*)(nameF.mb_str()) );
index cd5cc1aad15edd364fcfb17057ad77042f4f82c6..e55575c2bfab2f6f11d6b6827c78f49fbe2c2d6a 100644 (file)
@@ -185,9 +185,9 @@ private:
        
         pHistogram*    histogram;
         pPlotter*              plotter;
-        int                            idTransferenceFunction;
-        int                            histogramSize;
-        int                            idHistogram;
+        int                    idTransferenceFunction;
+        int                    histogramSize;
+        int                    idHistogram;
         /*
          if the image has already a transference
          function and color defines to that function
index af3e86591c91280d11a42fa6a1869c3fdfb7df18..738cae1a18c679ffc58824cb6c176891870dfde2 100644 (file)
@@ -368,12 +368,10 @@ void mpScaleY::Plot(wxDC & dc, mpWindow & w, int orgy)
        if (tmp>=1)
        {
                fmt = wxT("%.f");
-       }
-       else
-       {
+       } else {
                tmp=8-tmp;
                fmt.Printf(wxT("%%.%df"), tmp >= -1 ? 2 : -tmp);
-       }
+       } // if temp
 
        double n = floor( (w.GetPosY() - (double)extend / w.GetScaleY()) / step ) * step ;
 
@@ -389,8 +387,8 @@ void mpScaleY::Plot(wxDC & dc, mpWindow & w, int orgy)
                {
                        dc.DrawText( s, orgx+4, GetYTranslated(sizedc,p-ty/2));
                        tmp=p-ty/2;
-               }
-       }
+               } // if
+       } // for
 
        dc.GetTextExtent(m_name, &tx, &ty);
        dc.DrawText( m_name, orgx-tx-4, GetYTranslated(sizedc,-extend + ty + 4));
@@ -400,7 +398,13 @@ void mpScaleY::Plot(wxDC & dc, mpWindow & w, int orgy)
 // mpWindow
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(mpWindow, wxScrolledWindow)
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+       IMPLEMENT_DYNAMIC_CLASS(mpWindow, wxScrolledWindow)
+#else
+       wxIMPLEMENT_DYNAMIC_CLASS(mpWindow, wxScrolledWindow);
+#endif
+
 
 BEGIN_EVENT_TABLE(mpWindow, wxScrolledWindow)
 EVT_PAINT    ( mpWindow::OnPaint)
@@ -421,24 +425,24 @@ END_EVENT_TABLE()
 mpWindow::mpWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag )
 : wxScrolledWindow( parent, id, wxDefaultPosition, wxDefaultSize, flag, wxT("wxPlotter") )
 {
-       m_scaleX = m_scaleY = 1.0;
-       m_posX   = m_posY   = 0;
-       m_scrX   = m_scrY   = 64;
-       m_minX   = m_minY   = 0;
-       m_maxX   = m_maxY   = 0;
-       maxScrX = maxScrY   = 200;
-       minScrX = minScrY   = 0;
-       m_clickedX  0;
-       m_clickedY = 5000;
-       m_lockaspect = FALSE;
-       offsetX = offsetY = 0;
-       offsetPixelX = offsetPixelY= 0;
-       _bitmap_functions=NULL;
-
-       real_guideLine_X = -1;
-       real_guideLine_Y = -1;
-       drawGuides = true;
-       type=1;
+       m_scaleX                        = m_scaleY              = 1.0;
+       m_posX                          = m_posY                = 0;
+       m_scrX                          = m_scrY                = 64;
+       m_minX                          = m_minY                = 0;
+       m_maxX                          = m_maxY                = 0;
+       maxScrX                         = maxScrY       = 200;
+       minScrX                         = minScrY       = 0;
+       m_clickedX                      = 0;
+       m_clickedY                      = 5000;
+       m_lockaspect            = FALSE;
+       offsetX                         = offsetY               = 0;
+       offsetPixelX            = offsetPixelY  = 0;
+       _bitmap_functions       = NULL;
+
+       real_guideLine_X        = -1;
+       real_guideLine_Y        = -1;
+       drawGuides                      = true;
+       type                            = 1;
 
        m_popmenu.Append( mpID_CENTER,     _("Center"),      _("Center plot view to this position"));
        m_popmenu.Append( mpID_FIT,        _("Fit"),         _("Set plot view to show all items"));
@@ -511,16 +515,13 @@ void mpWindow::ZoomOut()
 void mpWindow::LockAspect(bool enable)
 {
        m_lockaspect = enable;
-
        m_popmenu.Check(mpID_LOCKASPECT, enable);
-
        if (m_lockaspect)
        {
                double s = (m_scaleX + m_scaleY)/2;
                m_scaleX = s;
                m_scaleY = s;
        }
-
        UpdateAll();
 }
 
index a55e7b0d1c4b8256395920a05ca98082c6f75822..743bc54d5cca32ab867b1995d1ce8dce58493a1f 100644 (file)
@@ -465,6 +465,7 @@ public:
                int flags = 0);
        ~mpWindow();
 
+
        /** Get reference to context menu of the plot canvas.
        @return Pointer to menu. The menu can be modified.
        */
@@ -917,13 +918,22 @@ protected:
        */
         int type;
 
+
  private:
        //bitmap of functions
        wxBitmap        *_bitmap_functions;
 
 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        DECLARE_CLASS(mpWindow)
+#else
+       wxDECLARE_DYNAMIC_CLASS(mpWindow);
+#endif
+
        DECLARE_EVENT_TABLE()
+
+
 };
 
 #endif // _MP_MATHPLOT_H_
index 1e80597db847ec10a8969e9f9cd9a0de58152e87..c6d803e05e23014b2513cfbe8f2c00c944754fb8 100644 (file)
@@ -229,10 +229,20 @@ void pPlotter::setAll()
                text.Clear();
                text = _T("minX=");
                double realMin_X = actualFunction->getMinX();
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                text = text + realMin_X;        
+#else
+               text = text + wxString::FromDouble( realMin_X );        
+#endif
                text = text + _T(" maxX=");
                double realMax_X = actualFunction->getMaxX();
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                text = text + realMax_X;
+#else
+               text = text + wxString::FromDouble( realMax_X );        
+#endif
                int minShowed = actualFunction->getMinXShowed();
                int maxShowed = actualFunction->getMaxXShowed();
                barrange -> setRepresentedValues (realMin_X, realMax_X);
index 2bb224a131626bae6ce5231a87d4475c32066e0b..41026ca30e344f02c3dc595149cb785712cd3e3a 100644 (file)
@@ -51,7 +51,7 @@ void vtkInfoTextImageInteractor::SetModelVtkInfoTextImage(vtkInfoTextImage *vtki
 bool vtkInfoTextImageInteractor::OnMouseMove()
 {
        int X,Y;
-       wxVTKRenderWindowInteractor *wxVTKiren;
+       crea::wxVTKRenderWindowInteractor *wxVTKiren;
        wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
        wxVTKiren->GetEventPosition(X,Y);
 
index a6339c18d034ec534a0b30af985935834b2cae92..479c30cd1740e2946368a03a6aa265d808756da5 100644 (file)
@@ -39,7 +39,7 @@ vtkInfoTextImageInteractorPlane2D::~vtkInfoTextImageInteractorPlane2D()
 bool vtkInfoTextImageInteractorPlane2D::OnMouseMove()
 {
        int X,Y;
-       wxVTKRenderWindowInteractor *wxVTKiren;
+       crea::wxVTKRenderWindowInteractor *wxVTKiren;
        wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
        wxVTKiren->GetEventPosition(X,Y);
 
index 044d49a521c56f72add8885f6ecacb1c5698c4ef..ef444aa2f969ea00d4f1cd4cd59ebe3c78780893 100644 (file)
@@ -109,7 +109,13 @@ bool vtkInteractorStyle3DView::SelectMarchibCubePoint()
                                this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY(xc(1)/spc[1]);
                                this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ(xc(2)/spc[2]);
                                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                                this->_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                               this->_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
                                ok=true;
                        }
                }
index 7de94728684a266196798e1dec5366e55a94741b..d7c6b6843aca7ba420ab5742f9bce08f551f3ffb 100644 (file)
@@ -373,7 +373,13 @@ void vtkInteractorStyleBaseView::EvaluateToRefresh()
                        _parent_refresh_waiting = false;
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
 //CPR 13/01/2010
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        this->_wxvtkbaseview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                       this->_wxvtkbaseview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
                        int i;
                        int size = _lstParentToReport.size();
                        for(i = 0; i<size; i++)
index af13f650e4cd9d33b252fec4ec467eedeeb131c0..3dacf1a2d5da1b07097a18be875aaab499c17c04 100644 (file)
@@ -51,9 +51,18 @@ bool  vtkInteractorStyleMPRView::OnLeftDClick () // virtual
        wxvtkmpr2Dview->MoveY(x,y,z);
        wxvtkmpr2Dview->MoveZ(x,y,z);
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
        wxCommandEvent newevent2(wxEVT_COMMAND_MENU_SELECTED,12122);  // Doble click
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
        wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent2);
+#else
+       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+       wxvtkmpr2Dview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent2);
+#endif
+
+
 
        return true;
 }
index 54a7f734443491413e64d40eb3f7aab0e7f2aa67..177534ef86ba40be2ff8733c87feee97b1881007 100644 (file)
@@ -93,7 +93,13 @@ bool  vtkInteractorStyleSphere::OnLeftButtonUp()
                        _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z);            
                        wxsphereview->SetXYZtoParent(x,y);
                        wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        wxsphereview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent);
+#else
+                       wxsphereview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent);
+#endif
+
                } else {
                        wxsphereview->RotationEnd();
                }
index 5d2b63cc8f926f5846b9e1b8ccf34078a6072e7b..3c715ae038aa09f20939c2d2a435b0050d3a7a76 100644 (file)
@@ -382,7 +382,7 @@ void vtkPlane2DView::Configure( )
        _stPoints        = vtkStructuredPoints::New( );
        _change          = vtkImageChangeInformation::New();
 
-       wxVTKRenderWindowInteractor *iren               = GetWxVTKRenderWindowInteractor();
+       crea::wxVTKRenderWindowInteractor *iren         = GetWxVTKRenderWindowInteractor();
        ExtractPlane();
 //     SetActive(false);
        _imageViewer2XYZ -> GetVtkImageViewer2()        -> SetupInteractor ( iren );
index bdbf0b50573dfc6513386a5699c9c0c0d6702032..67606299255f14f666ae5337dec6a3314de33f35 100644 (file)
@@ -81,7 +81,7 @@
 
 
 #include "wxMPRWidget.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 #include "UtilVtk3DGeometriSelection.h"
 #include "../kernel/marDicomBase.h"
 
@@ -510,17 +510,17 @@ wxPanel* wxMPRWidget::CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkm
        // view 0
        _vtkmpr2Dview[0] = new wxVtkMPR2DView(panel,0);
        _vtkmpr2Dview[0]->SetVtkBaseData(vtkmprbasedata);
-       wxVTKRenderWindowInteractor *iren0 = _vtkmpr2Dview[0]->GetWxVTKRenderWindowInteractor();        
+       crea::wxVTKRenderWindowInteractor *iren0 = _vtkmpr2Dview[0]->GetWxVTKRenderWindowInteractor();  
 
        // view 1
        _vtkmpr2Dview[1] = new wxVtkMPR2DView(panel,1);
        _vtkmpr2Dview[1]->SetVtkBaseData(vtkmprbasedata);
-       wxVTKRenderWindowInteractor *iren1 = _vtkmpr2Dview[1]->GetWxVTKRenderWindowInteractor();        
+       crea::wxVTKRenderWindowInteractor *iren1 = _vtkmpr2Dview[1]->GetWxVTKRenderWindowInteractor();  
 
        // view 2
        _vtkmpr2Dview[2] = new wxVtkMPR2DView(panel,2);
        _vtkmpr2Dview[2]->SetVtkBaseData(vtkmprbasedata);
-       wxVTKRenderWindowInteractor *iren2 = _vtkmpr2Dview[2]->GetWxVTKRenderWindowInteractor();        
+       crea::wxVTKRenderWindowInteractor *iren2 = _vtkmpr2Dview[2]->GetWxVTKRenderWindowInteractor();  
 
        // view 3
        wxNotebook *notebook = new wxNotebook( panel, -1 );
@@ -539,7 +539,7 @@ wxPanel* wxMPRWidget::CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkm
 // EED
 //     _wxsphereview = new wxSphereView( notebook , vtkmprbasedata, vtkmprbasedata->GetImageData());
        _wxsphereview = new wxSphereView( notebook , vtkmprbasedata );
-       wxVTKRenderWindowInteractor *iren3B = _wxsphereview->GetWxVTKRenderWindowInteractor();  
+       crea::wxVTKRenderWindowInteractor *iren3B = _wxsphereview->GetWxVTKRenderWindowInteractor();    
        notebook->AddPage( iren3B, _T("Sphere") );
 
         // view 3.2
@@ -560,21 +560,16 @@ wxPanel* wxMPRWidget::CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkm
        _wxvtkclipping3Dview->SetVtkClipping3DDataViewer(vtkclipping3Ddataviewer);
 
 
-       wxWindow        *window3D                               = _wxvtk3Dbaseview_MPRClipping3D->GetWxVTKRenderWindowInteractor();
-
+       wxWindow        *window3D                       = _wxvtk3Dbaseview_MPRClipping3D->GetWxVTKRenderWindowInteractor();
        wxPanel         *panelControl                   = new wxPanel(panelMPR3D,-1);
        wxPanel         *controlPanelMPR3D              = _wxvtkmpr3Dview->CreateControlPanel(panelControl, false);
        wxPanel         *controlPanelClipping3D = _wxvtkclipping3Dview->CreateSurfControlPanel(panelControl);
 
-
-
-
 //    wxBoxSizer        *sizerCtrol             = new wxBoxSizer(wxVERTICAL);
        wxFlexGridSizer  *sizerCtrol             = new wxFlexGridSizer(1);
        sizerCtrol->Add(controlPanelMPR3D               , 1, wxALL|wxEXPAND, 2);
        sizerCtrol->Add(controlPanelClipping3D  , 1, wxALL|wxEXPAND, 2);
 
-
        panelControl->SetAutoLayout(true);
        panelControl->SetSizer(sizerCtrol);
        panelControl->SetSize(400,150);
@@ -585,12 +580,8 @@ wxPanel* wxMPRWidget::CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkm
        //RaC Nov2012 Correctly resize internal panels with the window resize event
        panelMPR3D->SetSashGravity(0.5);
        panelMPR3D      -> SplitHorizontally( panelControl,window3D,200  );
-
        notebook->AddPage( panelMPR3D, _T("MPR 3D - Clipping") );
-
-
        Connect(notebook->GetId()       , wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED  , (wxObjectEventFunction) &wxMPRWidget::OnPageBChanged   );
-
        wxBoxSizer *sizerV = new wxBoxSizer(wxVERTICAL);
        wxBoxSizer *sizerH1= new wxBoxSizer(wxHORIZONTAL);
        wxBoxSizer *sizerH2= new wxBoxSizer(wxHORIZONTAL);
index 7e698c3abdbedcf552db2cec7162c28d28ba4946..a4d48213f71bc5927c1131904384588743f370f7 100644 (file)
@@ -42,5 +42,11 @@ wxMPRWidget2::~wxMPRWidget2()
 void wxMPRWidget2::OnRefreshView(wxCommandEvent & event) // Virtual
 {      
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     this->GetParent()->ProcessEvent(newevent1);
+#else
+    this->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
 }
index 267745798abceb7b19bdc6ef20c2811de909693c..1b562be52b2cde1ed4ddf424102ed8ff0e260a2e 100644 (file)
@@ -230,7 +230,12 @@ ToolBarMultipleVolumeRenderer::ToolBarMultipleVolumeRenderer(wxWindow * parent,s
        //iconfil+= "/OpenImage.png";
        //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
        wxBitmap bitmap0(OpenImage_xpm);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
+#else
+       this->AddTool(1, wxString(_T("test")),bitmap0, wxString(_T("Open File")), wxITEM_NORMAL );
+#endif
 
        /*iconfil+= "/Open.png";
        wxBitmap* bitmap2 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
index 69538a803325c1ed55e479c7fcbc3ad52d1bedb6..68db204e99233335b6324a97b1d43d853e487539 100644 (file)
@@ -483,28 +483,20 @@ void wxMaracasRenderTabbedPanel::addRemoveActorMPR(bool addremove)
        if(addremove)
        {
                wxtabs->GetPage(id)->Enable();
-
                bool valueX = ((wxVtkMPR3DViewCntrlPanel*) controlPanelMPR3D)->GetVisibleX();
                bool valueY = ((wxVtkMPR3DViewCntrlPanel*) controlPanelMPR3D)->GetVisibleY();
                bool valueZ = ((wxVtkMPR3DViewCntrlPanel*) controlPanelMPR3D)->GetVisibleZ();
                bool valueXYZ = ((wxVtkMPR3DViewCntrlPanel*) controlPanelMPR3D)->GetVisibleXYZ();
                bool valuePlane = ((wxVtkMPR3DViewCntrlPanel*) controlPanelMPR3D)->GetVisiblePlane();
-
                mwxvtkmpr3Dview->VisibleImageActor( 0, valueX );
                mwxvtkmpr3Dview->VisibleImageActor( 1, valueY );
                mwxvtkmpr3Dview->VisibleImageActor( 2, valueZ );
                mwxvtkmpr3Dview->VisiblePointWidget(valueXYZ);
                mwxvtkmpr3Dview->VisiblePlaneWidget(valuePlane);
                mwxvtkmpr3Dview->showOutlineActor(true);
-               
                mwxvtkmpr3Dview->Refresh();
-
-
-       }
-       else
-       {
+       } else {
                wxtabs->GetPage(id)->Disable();
-
                mwxvtkmpr3Dview->VisiblePointWidget(false);
                mwxvtkmpr3Dview->VisiblePlaneWidget(false);
                mwxvtkmpr3Dview->VisibleImageActor(0, false );
@@ -512,10 +504,14 @@ void wxMaracasRenderTabbedPanel::addRemoveActorMPR(bool addremove)
                mwxvtkmpr3Dview->VisibleImageActor(2, false );
                mwxvtkmpr3Dview->showOutlineActor(false);
                mwxvtkmpr3Dview->Refresh();
-
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                mwxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               mwxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+       } // if
 }
 
 
@@ -823,13 +819,18 @@ void wxMaracasRenderTabbedPanel::onMPROptions(wxCommandEvent& event)
        }*/
 }
 
+
 void wxMaracasRenderTabbedPanel::OnRefreshView(wxCommandEvent & event) 
 {
        printf("CPR wxMaracasRenderTabbedPanel::OnRefreshView \n");
        mwxvtkmpr3Dview->RefreshView();
-
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        mwxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       mwxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 /**
index 108944d96e8e4bfddc5b56d4bfeb8a613c314bc7..1098be22fb20f2e379681de9d2a96791c92a1d6d 100644 (file)
@@ -209,7 +209,14 @@ ToolBarRenderer::ToolBarRenderer(wxWindow * parent,std::string iconsdir)
        //iconfil+= "/OpenImage.png";
        //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
        wxBitmap bitmap0(OpenImage_xpm);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
+#else
+       this->AddTool(1, wxString(_T("test")),bitmap0, wxString(_T("Open File")), wxITEM_NORMAL );
+#endif
+
+
 
        this->Realize();
 
index f656c94742bae153779ad0e5866c354595881efc..af20535fb7f48826e81c29c70ae9c2ab110c9360 100644 (file)
 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();
 }
@@ -530,7 +530,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
 }
 
 
index 94735f1d7d0c8f1a6ac6b0ef7bfe3550d6d18857..5d376a3d95a304eb92d3b9ffaa62330274eff087 100644 (file)
@@ -1122,7 +1122,14 @@ void wxSTLWidget_03::OnBtnCreateFileSTL(wxCommandEvent& event)
 
        
 //     wxDirDialog dialog( this, "Choose a directory...", ( !dirSTL.IsEmpty( ) )?dirSTL: wxGetHomeDir( ) );
+
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
+#else
+       wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxFD_SAVE );
+#endif
 
 
        if( dialog.ShowModal( ) == wxID_OK ) 
index 1e0b93665bb2314a4134400a5f2a83ea8292b041..8b1af9aae7fb5a429bd3c3f4d9b889727e73a82c 100644 (file)
@@ -40,7 +40,7 @@
 #include <vtkImageSeedConnectivity.h>
 #include <vtkImageCast.h>
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 //#include "wxSurfaceWidget.h"
 #include "wxVtkBaseView.h"
 
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.cxx
deleted file mode 100644 (file)
index 29fd7c1..0000000
+++ /dev/null
@@ -1,808 +0,0 @@
-/*# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and
-#  abiding by the rules of distribution of free software. You can  use,
-#  modify and/ or redistribute the software under the terms of the CeCILL-B
-#  license as circulated by CEA, CNRS and INRIA at the following URL
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability.
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
-
-/*=========================================================================
-
-  Program:   Visualization Toolkit
-  Module:    $RCSfile: wxVTKRenderWindowInteractor.cxx,v $
-  Language:  C++
-  Date:      $Date: 2012/11/15 14:14:35 $
-  Version:   $Revision: 1.7 $
-
-  Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
-  All rights reserved.
-  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
-
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
-     PURPOSE.  See the above copyright notice for more information.
-
-=========================================================================*/
-
-#include <assert.h>
-
-#include "wxVTKRenderWindowInteractor.h"
-
-//This is needed for vtk 3.1 :
-#ifndef VTK_MAJOR_VERSION
-#  include "vtkVersion.h"
-#endif
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-#  include "vtkCommand.h"
-#else
-#  include "vtkInteractorStyle.h"
-#endif
-#include "vtkDebugLeaks.h"
-
-#ifdef __WXMAC__
-#include "vtkCarbonRenderWindow.h"
-#endif
-
-//Keep this for compatibilty reason, this was introduced in wxGTK 2.4.0
-#if (!wxCHECK_VERSION(2, 4, 0))
-wxWindow* wxGetTopLevelParent(wxWindow *win)
-{
-    while ( win && !win->IsTopLevel() )
-         win = win->GetParent();
-    return win;
-}
-#endif
-
-// To access objc calls on cocoa
-#ifdef __WXCOCOA__
-#ifdef VTK_USE_COCOA
-#import <Cocoa/Cocoa.h>
-// This trick is no longer need in VTK CVS, should get rid of that:
-#define id Id
-#else
-#error Build mismatch you need both wxWidgets and VTK to be configure against Cocoa to work
-#endif //VTK_USE_COCOA
-#endif //__WXCOCOA__
-
-#ifdef __WXGTK__
-#    include <gdk/gdkx.h> // GDK_WINDOW_XWINDOW is found here in wxWidgets 2.8.0
-#    include "gdk/gdkprivate.h"
-#if wxCHECK_VERSION(2, 8, 0)
-#ifdef __WXGTK20__
-#include <wx/gtk/win_gtk.h>
-#else
-#include <wx/gtk1/win_gtk.h>
-#endif
-#else
-#include <wx/gtk/win_gtk.h>
-#endif
-#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
-                          GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \
-                          GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
-#endif
-
-#ifdef __WXX11__
-#include "wx/x11/privx.h"
-#define GetXWindow(wxwin)   ((Window)(wxwin)->GetHandle())
-#endif
-
-
-//For more info on this class please go to:
-//http://wxvtk.sf.net
-//This hack is for some buggy wxGTK version:
-#if wxCHECK_VERSION(2, 3, 2) && !wxCHECK_VERSION(2, 4, 1) && defined(__WXGTK__)
-#  define WX_USE_X_CAPTURE 0
-#else
-#  define WX_USE_X_CAPTURE 1
-#endif
-
-#define ID_wxVTKRenderWindowInteractor_TIMER 1001
-
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-IMPLEMENT_DYNAMIC_CLASS(wxVTKRenderWindowInteractor, wxGLCanvas)
-#else
-IMPLEMENT_DYNAMIC_CLASS(wxVTKRenderWindowInteractor, wxWindow)
-#endif  //__WXGTK__
-
-//---------------------------------------------------------------------------
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxGLCanvas)
-#else
-BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxWindow)
-#endif //__WXGTK__
-  //refresh window by doing a Render
-  EVT_PAINT       (wxVTKRenderWindowInteractor::OnPaint)
-  EVT_ERASE_BACKGROUND(wxVTKRenderWindowInteractor::OnEraseBackground)
-  EVT_MOTION      (wxVTKRenderWindowInteractor::OnMotion)
-
-  //Bind the events to the event converters
-  EVT_LEFT_DOWN   (wxVTKRenderWindowInteractor::OnButtonDown)
-  EVT_MIDDLE_DOWN (wxVTKRenderWindowInteractor::OnButtonDown)
-  EVT_RIGHT_DOWN  (wxVTKRenderWindowInteractor::OnButtonDown)
-  EVT_LEFT_UP     (wxVTKRenderWindowInteractor::OnButtonUp)
-  EVT_MIDDLE_UP   (wxVTKRenderWindowInteractor::OnButtonUp)
-  EVT_RIGHT_UP    (wxVTKRenderWindowInteractor::OnButtonUp)
-#if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
-  EVT_ENTER_WINDOW(wxVTKRenderWindowInteractor::OnEnter)
-  EVT_LEAVE_WINDOW(wxVTKRenderWindowInteractor::OnLeave)
-  EVT_MOUSEWHEEL  (wxVTKRenderWindowInteractor::OnMouseWheel)
-  EVT_KEY_DOWN    (wxVTKRenderWindowInteractor::OnKeyDown)
-  EVT_KEY_UP      (wxVTKRenderWindowInteractor::OnKeyUp)
-  EVT_CHAR        (wxVTKRenderWindowInteractor::OnChar)
-#endif
-  EVT_TIMER       (ID_wxVTKRenderWindowInteractor_TIMER, wxVTKRenderWindowInteractor::OnTimer)
-  EVT_SIZE        (wxVTKRenderWindowInteractor::OnSize)
-END_EVENT_TABLE()
-
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
-vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.7 $")
-#else
-  //...
-#endif
-vtkInstantiatorNewMacro(wxVTKRenderWindowInteractor)
-
-//---------------------------------------------------------------------------
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-#if (wxCHECK_VERSION(2, 8, 0))
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : wxGLCanvas(0, -1, wxDefaultPosition), vtkRenderWindowInteractor()
-#else
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : wxGLCanvas(), vtkRenderWindowInteractor()
-#endif
-#else
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : wxWindow(), vtkRenderWindowInteractor()
-#endif //__WXGTK__
-      , timer(this, ID_wxVTKRenderWindowInteractor_TIMER)
-      , ActiveButton(wxEVT_NULL)
-      , RenderAllowed(0)
-      , Stereo(0)
-      , Handle(0)
-      , Created(true)
-      , RenderWhenDisabled(1)
-      , UseCaptureMouse(0)
-{
-#ifdef VTK_DEBUG_LEAKS
-  vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor");
-#endif
-  this->RenderWindow = NULL;
-  this->SetRenderWindow(vtkRenderWindow::New());
-  this->RenderWindow->Delete();
-  this->SetBackgroundStyle( wxBG_STYLE_COLOUR );
-  this->SetBackgroundColour( wxColor(0,0,0,0) );
-}
-//---------------------------------------------------------------------------
-wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor(wxWindow *parent,
-                                                         wxWindowID id,
-                                                         const wxPoint &pos,
-                                                         const wxSize &size,
-                                                         long style,
-                                                         const wxString &name)
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-      : wxGLCanvas(parent, id, pos, size, style, name), vtkRenderWindowInteractor()
-#else
-      : wxWindow(parent, id, pos, size, style, name), vtkRenderWindowInteractor()
-#endif //__WXGTK__
-      , timer(this, ID_wxVTKRenderWindowInteractor_TIMER)
-      , ActiveButton(wxEVT_NULL)
-      , RenderAllowed(0)
-      , Stereo(0)
-      , Handle(0)
-      , Created(true)
-      , RenderWhenDisabled(1)
-      , UseCaptureMouse(0)
-{
-#ifdef VTK_DEBUG_LEAKS
-  vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor");
-#endif
-  this->RenderWindow = NULL;
-  this->SetRenderWindow(vtkRenderWindow::New());
-  this->RenderWindow->Delete();
-#ifdef __WXMAC__
-  // On Mac (Carbon) we don't get notified of the initial window size with an EVT_SIZE event,
-  // so we update the size information of the interactor/renderwindow here
-  this->UpdateSize(size.x, size.y);
-#endif
-  this->SetBackgroundStyle( wxBG_STYLE_COLOUR );
-  this->SetBackgroundColour( wxColor(0,0,0,0) );
-}
-//---------------------------------------------------------------------------
-wxVTKRenderWindowInteractor::~wxVTKRenderWindowInteractor()
-{
-  SetRenderWindow(NULL);
-  SetInteractorStyle(NULL);
-}
-//---------------------------------------------------------------------------
-wxVTKRenderWindowInteractor * wxVTKRenderWindowInteractor::New()
-{
-  // we don't make use of the objectfactory, because we're not registered
-  return new wxVTKRenderWindowInteractor;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Initialize()
-{
-  int *size = RenderWindow->GetSize();
-  // enable everything and start rendering
-  Enable();
-  //RenderWindow->Start();
-
-  // set the size in the render window interactor
-  Size[0] = size[0];
-  Size[1] = size[1];
-
-  // this is initialized
-  Initialized = 1;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Enable()
-{
-  // if already enabled then done
-  if (Enabled)
-    return;
-
-  // that's it
-  Enabled = 1;
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-  SetCurrent();
-#endif
-  Modified();
-}
-//---------------------------------------------------------------------------
-bool wxVTKRenderWindowInteractor::Enable(bool enable)
-{
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-  return wxGLCanvas::Enable(enable);
-#else
-  return wxWindow::Enable(enable);
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Disable()
-{
-  // if already disabled then done
-  if (!Enabled)
-    return;
-
-  // that's it (we can't remove the event handler like it should be...)
-  Enabled = 0;
-  Modified();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Start()
-{
-  // the interactor cannot control the event loop
-  vtkErrorMacro( << "wxVTKRenderWindowInteractor::Start() "
-    "interactor cannot control event loop.");
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::UpdateSize(int x, int y)
-{
-  if( RenderWindow )
-  {
-    // if the size changed tell render window
-    if ( x != Size[0] || y != Size[1] )
-    {
-      // adjust our (vtkRenderWindowInteractor size)
-      Size[0] = x;
-      Size[1] = y;
-      // and our RenderWindow's size
-      RenderWindow->SetSize(x, y);
-    }
-  }
-}
-//---------------------------------------------------------------------------
-int wxVTKRenderWindowInteractor::CreateTimer(int WXUNUSED(timertype))
-{
-  // it's a one shot timer
-  if (!timer.Start(10, TRUE))
-    assert(false);
-
-  return 1;
-  
-}
-//---------------------------------------------------------------------------
-int wxVTKRenderWindowInteractor::DestroyTimer()
-{
-  // do nothing
-  return 1;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnTimer(wxTimerEvent& WXUNUSED(event))
-{
-  if (!Enabled)
-    return;
-    
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::TimerEvent, NULL);
-#else
-    // old style
-    InteractorStyle->OnTimer();
-#endif
-}
-
-//---------------------------------------------------------------------------
-// NOTE on implementation:
-// Bad luck you ended up in the only tricky place of this code.
-// A few note, wxWidgets still refuse to provide such convenient method
-// so I have to maintain it myself, eventhough this is completely integrated
-// in wxPython...
-// Anyway if this happen to break for you then compare to a recent version of wxPython
-// and look for the function long wxPyGetWinHandle(wxWindow* win)
-// in wxPython/src/helpers.cpp
-long wxVTKRenderWindowInteractor::GetHandleHack()
-{
-  //helper function to hide the MSW vs GTK stuff
-  long handle_tmp = 0;
-
-// __WXMSW__ is for Win32
-//__WXMAC__ stands for using Carbon C-headers, using either the CarbonLib/CFM or the native Mach-O builds (which then also use the latest features available)
-// __WXGTK__ is for both gtk 1.2.x and gtk 2.x
-#if defined(__WXMSW__) || defined(__WXMAC__)
-    handle_tmp = (long)this->GetHandle();
-#endif //__WXMSW__
-
-//__WXCOCOA__ stands for using the objective-c Cocoa API
-#ifdef __WXCOCOA__
-   // Here is how to find the NSWindow
-   wxTopLevelWindow* toplevel = dynamic_cast<wxTopLevelWindow*>(
-     wxGetTopLevelParent( this ) );
-   if (toplevel != NULL )    
-   {
-     handle_tmp = (long)toplevel->GetNSWindow();
-   }
-   // The NSView will be deducted from 
-   // [(NSWindow*)Handle contentView]
-   // if only I knew how to write that in c++
-#endif //__WXCOCOA__
-
-    // Find and return the actual X-Window.
-#if defined(__WXGTK__) || defined(__WXX11__)
-    return (long)GetXWindow(this);
-#endif
-
-//#ifdef __WXMOTIF__
-//    handle_tmp = (long)this->GetXWindow();
-//#endif
-
-  return handle_tmp;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnPaint(wxPaintEvent& WXUNUSED(event))
-{
-  //must always be here
-  wxPaintDC pDC(this);
-
-  //do it here rather than in the cstor: this is safer.
-  if(!Handle)
-  {
-    Handle = GetHandleHack();
-    RenderWindow->SetWindowId(reinterpret_cast<void *>(Handle));
-#ifdef __WXMSW__
-    RenderWindow->SetParentId(reinterpret_cast<void *>(this->GetParent()->GetHWND()));
-#endif //__WXMSW__
-  }
-  // get vtk to render to the wxWindows
-  Render();
-#ifdef __WXMAC__
-  // This solves a problem with repainting after a window resize
-  // See also: http://sourceforge.net/mailarchive/forum.php?thread_id=31690967&forum_id=41789
-  vtkCarbonRenderWindow* rwin = vtkCarbonRenderWindow::SafeDownCast(RenderWindow);
-  if( rwin )
-  {
-    rwin->UpdateGLRegion();
-  }
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnEraseBackground(wxEraseEvent &event)
-{
-  //turn off background erase to reduce flickering on MSW
-  event.Skip(false);
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnSize(wxSizeEvent& WXUNUSED(event))
-{
-  int w, h;
-  GetClientSize(&w, &h);
-  UpdateSize(w, h);
-
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  InvokeEvent(vtkCommand::ConfigureEvent, NULL);
-#endif
-  //this will check for Handle
-  //Render();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnMotion(wxMouseEvent &event)
-{
- if (!Enabled) 
-    {
-    return;
-    }
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-    event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
-  InvokeEvent(vtkCommand::MouseMoveEvent, NULL);
-#else
-  InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(),
-    event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-}
-//---------------------------------------------------------------------------
-#if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
-void wxVTKRenderWindowInteractor::OnEnter(wxMouseEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-      event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
-  InvokeEvent(vtkCommand::EnterEvent, NULL);
-#else
-    // old style
-  InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);  
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnLeave(wxMouseEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-      event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
-  InvokeEvent(vtkCommand::LeaveEvent, NULL);
-#else
-    // old style
-  InteractorStyle->OnLeave(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);  
-#endif
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnKeyDown(wxKeyEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  int keycode = event.GetKeyCode();
-  char key = '\0';
-  if (((unsigned int)keycode) < 256)
-  {
-    // TODO: Unicode in non-Unicode mode ??
-    key = (char)keycode;
-  }
-
-  // we don't get a valid mouse position inside the key event on every platform
-  // so we retrieve the mouse position explicitly and pass it along
-  wxPoint mousePos = ScreenToClient(wxGetMousePosition());
-  SetEventInformationFlipY(mousePos.x, mousePos.y, 
-                           event.ControlDown(), event.ShiftDown(), key, 0, NULL);
-  InvokeEvent(vtkCommand::KeyPressEvent, NULL);
-#else
-  InteractorStyle->OnKeyDown(event.ControlDown(), event.ShiftDown(), 
-    event.GetKeyCode(), 1);
-#endif
-  event.Skip();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnKeyUp(wxKeyEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-  int keycode = event.GetKeyCode();
-  char key = '\0';
-  if (((unsigned int)keycode) < 256)
-  {
-    // TODO: Unicode in non-Unicode mode ??
-    key = (char)keycode;
-  }
-
-  // we don't get a valid mouse position inside the key event on every platform
-  // so we retrieve the mouse position explicitly and pass it along
-  wxPoint mousePos = ScreenToClient(wxGetMousePosition());
-  SetEventInformationFlipY(mousePos.x, mousePos.y, 
-                           event.ControlDown(), event.ShiftDown(), key, 0, NULL);
-  InvokeEvent(vtkCommand::KeyReleaseEvent, NULL);
-#else
-  InteractorStyle->OnKeyUp(event.ControlDown(), event.ShiftDown(), 
-    event.GetKeyCode(), 1);
-#endif
-  event.Skip();
-}
-#endif //!(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
- //---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnChar(wxKeyEvent &event)
-{
-  if (!Enabled) 
-    {
-    return;
-    }
-    
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  // new style
-  int keycode = event.GetKeyCode();
-  char key = '\0';
-  if (((unsigned int)keycode) < 256)
-    {
-    // TODO: Unicode in non-Unicode mode ??
-    key = (char)keycode;
-    }
-
-  // we don't get a valid mouse position inside the key event on every platform
-  // so we retrieve the mouse position explicitly and pass it along
-  wxPoint mousePos = ScreenToClient(wxGetMousePosition());
-  SetEventInformationFlipY(mousePos.x, mousePos.y, 
-                           event.ControlDown(), event.ShiftDown(), key, 0, NULL);
-  InvokeEvent(vtkCommand::CharEvent, NULL);
-#endif
-  event.Skip();
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnButtonDown(wxMouseEvent &event)
-{
-  if (!Enabled || (ActiveButton != wxEVT_NULL))
-    {
-    return;
-    }
-  ActiveButton = event.GetEventType();
-
-    // On Mac (Carbon) and Windows we don't automatically get the focus when
-    // you click inside the window
-    // we therefore set the focus explicitly
-    // Apparently we need that on linux (GTK) too:
-    this->SetFocus();
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-    event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-#endif
-
-  if(event.RightDown())
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::RightButtonPressEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnRightButtonDown(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(event.LeftDown())
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnLeftButtonDown(event.ControlDown(),  event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(event.MiddleDown())
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::MiddleButtonPressEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnMiddleButtonDown(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  //save the button and capture mouse until the button is released
-  //Only if :
-  //1. it is possible (WX_USE_X_CAPTURE)
-  //2. user decided to.
-  if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse)
-  {
-    CaptureMouse();
-  }
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnButtonUp(wxMouseEvent &event)
-{
-  //EVT_xxx_DOWN == EVT_xxx_UP - 1
-  //This is only needed if two mouse buttons are pressed at the same time.
-  //In wxWindows 2.4 and later: better use of wxMOUSE_BTN_RIGHT or 
-  //wxEVT_COMMAND_RIGHT_CLICK
-  if (!Enabled || (ActiveButton != (event.GetEventType()-1))) 
-    {
-    return;
-    }
-
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-  SetEventInformationFlipY(event.GetX(), event.GetY(), 
-    event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-#endif
-  
-  if(ActiveButton == wxEVT_RIGHT_DOWN)
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::RightButtonReleaseEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnRightButtonUp(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(ActiveButton == wxEVT_LEFT_DOWN)
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::LeftButtonReleaseEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnLeftButtonUp(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  else if(ActiveButton == wxEVT_MIDDLE_DOWN)
-  {
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-    // new style
-    InvokeEvent(vtkCommand::MiddleButtonReleaseEvent, NULL);
-#else            
-    // old style
-    InteractorStyle->OnMiddleButtonUp(event.ControlDown(), event.ShiftDown(),
-      event.GetX(), Size[1] - event.GetY() - 1);
-#endif
-  }
-  //if the ActiveButton is realeased, then release mouse capture
-  if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse)
-  {
-    ReleaseMouse();
-  }
-  ActiveButton = wxEVT_NULL;
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::OnMouseWheel(wxMouseEvent& event)
-{
-// Mouse wheel was only added after VTK 4.4 (I think...)
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2)
-  // new style
-  //Set vtk event information ... The numebr of wheel rotations is stored in
-  //the x varible.  y varible is zero
-  SetEventInformationFlipY(event.GetWheelRotation() / event.GetWheelDelta(), 0, 
-                           event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-  if(event.GetWheelRotation() > 0)
-    {
-      //Send event to VTK
-      InvokeEvent(vtkCommand::MouseWheelForwardEvent, NULL);
-    }
-  else
-    {
-      //Send event to VTK
-      InvokeEvent(vtkCommand::MouseWheelBackwardEvent, NULL);
-    }
-#endif
-    
-}
-
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::Render()
-{
-  RenderAllowed = 1;
-  if (!RenderWhenDisabled)
-    {
-    //the user doesn't want us to render when the toplevel frame
-    //is disabled - first find the top level parent
-    wxWindow *topParent = wxGetTopLevelParent(this);
-    if (topParent)
-      {
-      //if it exists, check whether it's enabled
-      //if it's not enabeld, RenderAllowed will be false
-      RenderAllowed = topParent->IsEnabled();
-      }
-    }
-
-  if (RenderAllowed)
-    {
-    if(Handle && (Handle == GetHandleHack()) )
-      {
-      RenderWindow->Render();
-      }
-#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2)
-    else if(GetHandleHack())
-      {
-      //this means the user has reparented us; let's adapt to the
-      //new situation by doing the WindowRemap dance
-      //store the new situation
-      Handle = GetHandleHack();
-      RenderWindow->SetNextWindowId(reinterpret_cast<void *>(Handle));
-      RenderWindow->WindowRemap();
-      RenderWindow->Render();
-      }
-#endif
-    }
-}
-//---------------------------------------------------------------------------
-void wxVTKRenderWindowInteractor::SetRenderWhenDisabled(int newValue)
-{
-  //Change value of __RenderWhenDisabled ivar.
-  //If __RenderWhenDisabled is false (the default), this widget will not
-  //call Render() on the RenderWindow if the top level frame (i.e. the
-  //containing frame) has been disabled.
-
-  //This prevents recursive rendering during wxSafeYield() calls.
-  //wxSafeYield() can be called during the ProgressMethod() callback of
-  //a VTK object to have progress bars and other GUI elements updated -
-  //it does this by disabling all windows (disallowing user-input to
-  //prevent re-entrancy of code) and then handling all outstanding
-  //GUI events.
-        
-  //However, this often triggers an OnPaint() method for wxVTKRWIs,
-  //resulting in a Render(), resulting in Update() being called whilst
-  //still in progress.
-
-  RenderWhenDisabled = (bool)newValue;
-}
-//---------------------------------------------------------------------------
-//
-// Set the variable that indicates that we want a stereo capable window
-// be created. This method can only be called before a window is realized.
-//
-void wxVTKRenderWindowInteractor::SetStereo(int capable)
-{
-  if (Stereo != capable)
-    {
-    Stereo = capable;
-    RenderWindow->StereoCapableWindowOn();
-    RenderWindow->SetStereoTypeToCrystalEyes();
-    Modified();
-    }
-}
-
-//---------------------------------------------------------------------------
-//
-//
-void wxVTKRenderWindowInteractor::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
-
diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVTKRenderWindowInteractor.h
deleted file mode 100644 (file)
index b8eb9ac..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-/*# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-#                        pour la Sant�)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and
-#  abiding by the rules of distribution of free software. You can  use,
-#  modify and/ or redistribute the software under the terms of the CeCILL-B
-#  license as circulated by CEA, CNRS and INRIA at the following URL
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability.
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
-
-/*=========================================================================
-
-  Program:   Visualization Toolkit
-  Module:    $RCSfile: wxVTKRenderWindowInteractor.h,v $
-  Language:  C++
-  Date:      $Date: 2012/11/15 14:14:35 $
-  Version:   $Revision: 1.5 $
-
-  Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
-  All rights reserved.
-  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
-
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
-     PURPOSE.  See the above copyright notice for more information.
-
-=========================================================================*/
-
-// .NAME  wxVTKRenderWindowInteractor - class to enable VTK to render to 
-// and interact with wxWindow.
-// .SECTION Description
-//  wxVTKRenderWindowInteractor provide a VTK widget for wxWindow. This class
-// was completely rewrote to have the 'Look & Feel' of the python version:
-// wxVTKRenderWindowInteractor.py
-// .SECTION Caveats 
-//  - There is a know bug that prevent this class to works for more info see 
-// WX_USE_X_CAPTURE. This bug only affect wxGTK from 2.3.2 to wxGTK 2.4.0.
-//  - Furthermore this class is tempated over either wxWindows or wxGLCanvas,
-// in wxWindows 2.3.1 and earlier, the wxGLCanvas had scroll bars, you can avoid
-// this effect by playing with WX_BASE_CLASS at your risk (you might end up with
-// lot of flickering.)
-//  - This class might not be easily readable as it tried to work with VTK 3.2
-//  and 4.x. This class doesn't support reparenting with VTK 4.2 and earlier.
-// .SECTION see also
-// wxVTKRenderWindowInteractor.py wxVTKRenderWindow.py
-
-#ifndef _wxVTKRenderWindowInteractor_h_
-#define _wxVTKRenderWindowInteractor_h_
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#  pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include <wx/wx.h>
-#endif
-
-#include <wx/timer.h>
-#include <wx/dcclient.h>
-
-// vtk includes
-#include "vtkRenderWindowInteractor.h"
-#include "vtkRenderWindow.h"
-
-// Apparently since wxGTK 2.8.0 one can finally use wxWindow (just as in any
-// other port):
-// MM: tested on 2008/04/08: experienced some heavy flickering with wx-widget 2.6.0
-// using a wxWindow instead of wxGLCanvas fixed the symptoms
-//#if (!wxCHECK_VERSION(2, 6, 0))
-#if (!wxCHECK_VERSION(2, 8, 0))
-#define USE_WXGLCANVAS
-#endif
-
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-#  if wxUSE_GLCANVAS
-#    include <wx/glcanvas.h>
-#  else
-#    error "problem of wxGLCanvas, you need to build wxWidgets with opengl"
-#  endif //wxUSE_GLCANVAS
-#endif //__WXGTK__
-
-// Motif version (renamed into wxX11 for wxWindow 2.4 and newer)
-#if defined(__WXMOTIF__) 
-# error This GUI is not supported by wxVTKRenderWindowInteractor for now
-#endif
-
-// wx forward declarations
-class wxPaintEvent;
-class wxMouseEvent;
-class wxTimerEvent;
-class wxKeyEvent;
-class wxSizeEvent;
-
-#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
-class wxVTKRenderWindowInteractor : public wxGLCanvas, public vtkRenderWindowInteractor
-#else
-class wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInteractor
-#endif //__WXGTK__
-{
-  DECLARE_DYNAMIC_CLASS(wxVTKRenderWindowInteractor)
-  
-  public:
-    //constructors
-    wxVTKRenderWindowInteractor();
-
-    wxVTKRenderWindowInteractor(wxWindow *parent,
-                                wxWindowID id,
-                                const wxPoint &pos = wxDefaultPosition,
-                                const wxSize &size = wxDefaultSize,
-                                long style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
-                                const wxString &name = wxPanelNameStr);
-
-
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
-    vtkTypeRevisionMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
-#else
-    vtkTypeMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
-#endif
-
-    static wxVTKRenderWindowInteractor * New();
-    void PrintSelf(ostream& os, vtkIndent indent);
-
-         //destructor
-    ~wxVTKRenderWindowInteractor();
-
-    // vtkRenderWindowInteractor overrides
-    void Initialize();
-    void Enable();
-    bool Enable(bool enable);
-    void Disable();
-    void Start();
-    void UpdateSize(int x, int y);
-    int CreateTimer(int timertype);
-    int DestroyTimer();
-    void TerminateApp() {};
-
-    // event handlers
-    void OnPaint(wxPaintEvent &event);
-    void OnEraseBackground (wxEraseEvent& event);
-    void OnMotion(wxMouseEvent &event);
-
-    void OnButtonDown(wxMouseEvent &event);
-    void OnButtonUp(wxMouseEvent &event);
-#if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
-    void OnEnter(wxMouseEvent &event);
-    void OnLeave(wxMouseEvent &event);
-    void OnKeyDown(wxKeyEvent &event);
-    void OnKeyUp(wxKeyEvent &event);
-    void OnChar(wxKeyEvent &event);
-#endif
-    void OnTimer(wxTimerEvent &event);
-    void OnSize(wxSizeEvent &event);
-    void OnMouseWheel(wxMouseEvent& event);
-
-    void Render();
-    void SetRenderWhenDisabled(int newValue);
-
-    // Description:
-    // Prescribe that the window be created in a stereo-capable mode. This
-    // method must be called before the window is realized. Default if off.
-    vtkGetMacro(Stereo,int);
-    vtkBooleanMacro(Stereo,int);
-    virtual void SetStereo(int capable);
-
-    // Description:
-    // As CaptureMouse could be a problem sometimes on a window box
-    // This method allow to set or not the CaptureMouse.
-    // This method actually will works only if WX_USE_X_CAPTURE was set to 1
-    vtkSetMacro(UseCaptureMouse,int);
-    vtkBooleanMacro(UseCaptureMouse,int);
-
-  protected:
-    wxTimer timer;
-    int ActiveButton;
-    int RenderAllowed;
-    long GetHandleHack();
-    int Stereo;
-    
-  private:
-    long Handle;
-    bool Created;
-    int RenderWhenDisabled;
-    int UseCaptureMouse;
-
-    DECLARE_EVENT_TABLE()
-};
-
-#endif //_wxVTKRenderWindowInteractor_h_
index d706e325ce8f256166da2edfbc6946bd98bd6323..e09c1ce72ca9716686af6faa4d0f2983490e2734 100644 (file)
@@ -27,7 +27,7 @@
 #define _wxVTKRenderWindowInteractorEditContour_h_
 
 
-#include <wxVTKRenderWindowInteractor.h>
+#include <creawxVTKRenderWindowInteractor.h>
 
 #include <vtkCommand.h> 
 #include <vtkImageData.h> 
@@ -197,7 +197,7 @@ public:
   double InitialLevel;
 };
 
-class wxVTKRenderWindowInteractor;
+class crea::wxVTKRenderWindowInteractor;
 
 class vtkInteractorStyle2DMaracas : public vtkInteractorStyleImage{
 public:
@@ -228,7 +228,7 @@ private:
 
 
 
-class wxVTKRenderWindowInteractorEditContour : public wxVTKRenderWindowInteractor {
+class wxVTKRenderWindowInteractorEditContour : public crea::wxVTKRenderWindowInteractor {
 
 public:
 
index 864041deab4a63630b01b88b17bc5c743c589ad1..0b333e593cc68d3b60978ef44325f4fda156a193 100644 (file)
 
 //class wxVtkBaseView;
 #include "wxVtkBaseView.h"
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 
 
-class creaMaracasVisu_EXPORT wxVTKRenderWindowInteractorPlus : public wxVTKRenderWindowInteractor
+class creaMaracasVisu_EXPORT wxVTKRenderWindowInteractorPlus : public crea::wxVTKRenderWindowInteractor
 {
 public:
        wxVTKRenderWindowInteractorPlus(wxWindow *parent ,wxVtkBaseView *_wxvtkbaseview);
index 029f1ef6a1e6f302eb4c445dca87e72f054c54a1..393b3f1160bf84c6ea866df1e7bba3c60459cc32 100644 (file)
@@ -105,7 +105,7 @@ void wxVtk2DBaseView::ResetView()
        int x1 = 1,x2 = 1,y1 = 1,y2 = 1,z1 = 1,z2 = 1;
        wxVtkBaseView::Configure();
 
-       wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+       crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
        vtkImageData *imageData = GetVtkBaseData()->GetImageData();
        if(imageData){
 //EED 2017-01-01 Migration VTK7
@@ -176,7 +176,7 @@ void wxVtk2DBaseView::Configure(bool okimage)
        if (_imageViewer2XYZ==NULL)
        {
                _imageViewer2XYZ = new vtkImageViewer2_XYZ();
-               wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+               crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
                _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
 
                //////////////
@@ -330,7 +330,7 @@ void wxVtk2DBaseView::Refresh()
 void wxVtk2DBaseView::SetInteractorStyleImage(vtkInteractorStyleBaseView *interactorstylebaseview)
 {
        SetInteractorStyleBaseView(interactorstylebaseview);
-       wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
+       crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
        interactorstylebaseview->SetInteractor ( iren );
        iren->SetInteractorStyle(interactorstylebaseview);
        interactorstylebaseview->SetwxVtkBaseView(this);
index 88ce1acc9cff550f035abb709da43f47e5dd5132..82b4b22167f8673e4bd5373e0f82f2c2e6759ae6 100644 (file)
@@ -45,7 +45,7 @@ wxVtkBaseView::wxVtkBaseView()
 wxVtkBaseView::wxVtkBaseView(wxWindow *parent)
 {
        _parent                         = parent;
-       _iren                           = (wxVTKRenderWindowInteractor*)new wxVTKRenderWindowInteractorPlus(_parent,this);
+       _iren                           = (crea::wxVTKRenderWindowInteractor*)new wxVTKRenderWindowInteractorPlus(_parent,this);
 //     _iren->UseCaptureMouseOn();
 //     _iren                           = new wxVTKRenderWindowInteractor(_parent,-1);
        _interactorStyle        = NULL;
@@ -58,11 +58,12 @@ wxVtkBaseView::~wxVtkBaseView()
        //_iren=NULL;
 }
 //-------------------------------------------------------------------
-wxVTKRenderWindowInteractor* wxVtkBaseView::GetWxVTKRenderWindowInteractor() throw (char*)
+crea::wxVTKRenderWindowInteractor* wxVtkBaseView::GetWxVTKRenderWindowInteractor() throw (char*)
 {
 
-       if(_iren==NULL){
-               throw "wxVtkBaseView::GetWxVTKRenderWindowInteractor() _iren wxVTKRenderWindowInteractorPlus =NULL";
+       if(_iren==NULL)
+       {
+               throw "wxVtkBaseView::GetWxVTKRenderWindowInteractor() _iren cwxVTKRenderWindowInteractorPlus =NULL";
        }
    return _iren;
 }
index 0ecedb5f0ddf7b02c2431711b9b6af5c829963c8..54d036f6f4fa5e24800dcca748bed976277ea5b8 100644 (file)
@@ -53,7 +53,7 @@
 #include <vector>
 #include "marTypes.h"
 
-#include "wxVTKRenderWindowInteractor.h"
+#include "creawxVTKRenderWindowInteractor.h"
 //#include "include/vtkImageViewer2_XYZ.h"
 
 /* JCP 14/05/09
@@ -69,7 +69,7 @@ public:
        wxVtkBaseView( );
        wxVtkBaseView( wxWindow *parent );
        virtual ~wxVtkBaseView();
-       wxVTKRenderWindowInteractor     *GetWxVTKRenderWindowInteractor() throw (char*);
+       crea::wxVTKRenderWindowInteractor       *GetWxVTKRenderWindowInteractor() throw (char*);
        virtual void                            Configure();
        virtual void                            Refresh();
        virtual void                            RefreshView();
@@ -95,16 +95,16 @@ public:
        void                                            SetVtkBaseData(vtkBaseData *vtkbasedata);
 
 private:
-       wxWindow                                        *_parent;
-       wxVTKRenderWindowInteractor *_iren;
+       wxWindow                                                        *_parent;
+       crea::wxVTKRenderWindowInteractor       *_iren;
        /**
         * JCP 04/05/09
-        * vtkInteractorStyleImage              *_interactorStyle;
+        * vtkInteractorStyleImage                      *_interactorStyle;
         */
-       vtkInteractorStyleImage         *_interactorStyle;
+       vtkInteractorStyleImage                         *_interactorStyle;
 
 // EED Nov 15 2014
-       vtkBaseData                                     *_vtkbasedata;
+       vtkBaseData                                                     *_vtkbasedata;
 
 protected:
 
index 0a706c364ecb25966afaedc4976d07206fba15e5..9dc0af6bf65b99e876c751321aebb6b78a34cf13 100644 (file)
@@ -344,9 +344,14 @@ void wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame(wxCommandEv
                _wxvtkclipping3Dview->Refresh();
 
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 
-       }
+       } // if idTissue
 }
 
 //-------------------------------------------------------------------
@@ -356,7 +361,14 @@ void wxVtkClipping3DViewCntrlPanel::OnVisibleVolume(wxCommandEvent& event)
        _wxvtkclipping3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
 }
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface(wxCommandEvent& event)
@@ -390,14 +402,18 @@ void wxVtkClipping3DViewCntrlPanel::OnColor(wxCommandEvent& event)
                        float b=dlgColour.GetColourData().GetColour().Blue()/255;
                        tmpActor->GetProperty()->SetColor( r , g , b );
                        _color->SetBackgroundColour(dlgColour.GetColourData().GetColour());
-
                        _wxvtkclipping3Dview->Refresh();
-
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-               }
-       }
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+               } // if ShowModal
+       } // if idTissue
 }
+
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(wxCommandEvent& event)
 {
@@ -405,12 +421,15 @@ void wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(wxCommandEvent& event)
        if (idTissue!=-1)
        {
                _wxvtkclipping3Dview->VisibleActor(idTissue, _visible->GetValue());
-
                _wxvtkclipping3Dview->Refresh();
-
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+       } // if idTissue
 }
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnOpacity(wxScrollEvent& event)
@@ -422,12 +441,15 @@ void wxVtkClipping3DViewCntrlPanel::OnOpacity(wxScrollEvent& event)
                tmpActor = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
                float opacity=_opacity->GetValue();
                tmpActor->GetProperty()->SetOpacity( opacity/100 );
-
                _wxvtkclipping3Dview->Refresh();
-
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+       } // if idTissue
 }
 
 //----------------------------------------------------------------------------
@@ -462,8 +484,15 @@ void wxVtkClipping3DViewCntrlPanel::OnIsoValue(wxScrollEvent& event)
                _wxvtkclipping3Dview->Refresh();
 
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+#else
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
+       } // if idTissue
 
 }
 //-------------------------------------------------------------------
@@ -478,7 +507,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
 
 
        wxString dirSTL = wxGetHomeDir( ) ;
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
+#else
+       wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxFD_SAVE );
+#endif
 
        if( dialog.ShowModal( ) == wxID_OK )
        {
@@ -540,7 +574,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume(wxCommandEvent& event)
 {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas"), wxSAVE );
+#else
+       wxFileDialog dialog(this, _T("Choose a file"), _T(""), _T(""), _T("*.maracas"), wxFD_SAVE );
+#endif
        if (dialog.ShowModal() == wxID_OK)
        {
                std::string directory = (const char*) (dialog.GetDirectory().mb_str() );
@@ -684,7 +723,15 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
                        _wxvtkclipping3Dview->Refresh();
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
+
 
                        /*
                        volumeMapper->Update();
@@ -712,10 +759,10 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        size=greyctf->size();
                        for(i=0;i<size;i++)
                        {
-                               double grey2=(*greyctf)[i];
-                               double red =(*rctf)[i];
-                               double green =(*gctf)[i];
-                               double blue = (*bctf)[i];
+                               double grey2    = (*greyctf)[i];
+                               double red      = (*rctf)[i];
+                               double green    = (*gctf)[i];
+                               double blue     = (*bctf)[i];
                                ctfun->AddRGBPoint(grey2,red,green,blue);
                        }
 
@@ -725,7 +772,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
                        _wxvtkclipping3Dview->Refresh();
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 
                        /*
                        volumeMapper->Update();
@@ -742,6 +794,8 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(wxCommandEvent& event)
 {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.vtk"), wxOPEN);
        if (dialog.ShowModal() == wxID_OK)
        {
@@ -749,6 +803,18 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(wxCommandEvent& event)
                _wxvtkclipping3Dview->Refresh();
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
                _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-       }
+       } // if
+#else
+       wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.vtk"), wxFD_OPEN);
+       if (dialog.ShowModal() == wxID_OK)
+       {
+               _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadMeshVTK( dialog.GetPath().char_str() );
+               _wxvtkclipping3Dview->Refresh();
+               wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+               _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+
+       } // if
+#endif
+
 }
 
index ed16d6e0860c0317911f467f4f7e405dc079f012..c23118a70854084f3f5266e2ebb809c28bb0708f 100644 (file)
@@ -164,7 +164,12 @@ void wxVtkClipping3DViewVolCntrlPanel::OnVisibleVolume(wxCommandEvent& event)
 
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -194,7 +199,12 @@ void wxVtkClipping3DViewVolCntrlPanel::OnVisibleBoxVolume(wxCommandEvent& event)
 
     _wxvtkclipping3Dview->Refresh();
     wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+    _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 
 }
 
@@ -327,8 +337,12 @@ void wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& even
 
                        _wxvtkclipping3Dview->Refresh();
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
                        /*
                        volumeMapper->Update();
                        newvol->Update();
@@ -368,8 +382,12 @@ void wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& even
                        //_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions();
 
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
+#else
+                       _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
                _wxvtkclipping3Dview->Refresh();
 
                        /*
@@ -384,43 +402,60 @@ void wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& even
        hDlg->Destroy();
 }
 
-void    wxVtkClipping3DViewVolCntrlPanel::OnRayCastingActive(wxCommandEvent& event){
+void wxVtkClipping3DViewVolCntrlPanel::OnRayCastingActive(wxCommandEvent& event)
+{
     //If Ray Casting is active, others options are disabled. Only RayCasting is true
     _wxvtkclipping3Dview->SetRayCasting(true);
     _wxvtkclipping3Dview->SetMIPActive(false);
-
     wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+    _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
     _wxvtkclipping3Dview->Refresh();
 }
 
-void    wxVtkClipping3DViewVolCntrlPanel::OnMIPActive(wxCommandEvent& event){
+void wxVtkClipping3DViewVolCntrlPanel::OnMIPActive(wxCommandEvent& event)
+{
     //If MIP is active, others options are disabled. Only MIP is true
     _wxvtkclipping3Dview->SetMIPActive(true);
     _wxvtkclipping3Dview->SetRayCasting(false);
-
     wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
+#else
+    _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
     _wxvtkclipping3Dview->Refresh();
 }
 
 
-
-void    wxVtkClipping3DViewVolCntrlPanel::OnInterpolationActive(wxCommandEvent& event){
+void wxVtkClipping3DViewVolCntrlPanel::OnInterpolationActive(wxCommandEvent& event)
+{
     _wxvtkclipping3Dview->SetInterpolation(event.IsChecked());
-
     wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+    _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
     _wxvtkclipping3Dview->Refresh();
 }
 
-void    wxVtkClipping3DViewVolCntrlPanel::OnShadeActive(wxCommandEvent& event){
+void wxVtkClipping3DViewVolCntrlPanel::OnShadeActive(wxCommandEvent& event)
+{
     _wxvtkclipping3Dview->SetShade(event.IsChecked());
-
     wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
     _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+    _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
     _wxvtkclipping3Dview->Refresh();
 }
 
index b07233c849e80545fcdbc5985e5a4062c4a20df1..a2039f6d9545815ec671d8493454498b8d5e7606 100644 (file)
@@ -532,7 +532,12 @@ void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX(wxCommandEvent& event)
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
 
        try{
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+               _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
        }catch(char* e){
                std::cout<<e<<std::endl;
        }
@@ -544,17 +549,25 @@ void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY(wxCommandEvent& event)
        _wxvtkmpr3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 //-------------------------------------------------------------------
 void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ(wxCommandEvent& event)
 {
        _wxvtkmpr3Dview->VisibleImageActor(2, event.IsChecked() );
        _wxvtkmpr3Dview->Refresh();
-
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -577,7 +590,12 @@ void wxVtkMPR3DViewCntrlPanel::OnPositionX(wxScrollEvent& event)
        _wxvtkmpr3Dview->RefreshView();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 //-------------------------------------------------------------------
 void wxVtkMPR3DViewCntrlPanel::OnPositionY(wxScrollEvent& event)
@@ -585,7 +603,12 @@ void wxVtkMPR3DViewCntrlPanel::OnPositionY(wxScrollEvent& event)
        _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY( _positionY->GetValue() );
        _wxvtkmpr3Dview->RefreshView();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 //-------------------------------------------------------------------
 void wxVtkMPR3DViewCntrlPanel::OnPositionZ(wxScrollEvent& event)
@@ -593,7 +616,12 @@ void wxVtkMPR3DViewCntrlPanel::OnPositionZ(wxScrollEvent& event)
        _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ( _positionZ->GetValue() );
        _wxvtkmpr3Dview->RefreshView();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 
@@ -644,7 +672,12 @@ void wxVtkMPR3DViewCntrlPanel::SetVisibleX(bool value)
        _wxvtkmpr3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -656,7 +689,12 @@ void wxVtkMPR3DViewCntrlPanel::SetVisibleY(bool value)
        _wxvtkmpr3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -668,7 +706,12 @@ void wxVtkMPR3DViewCntrlPanel::SetVisibleZ(bool value)
        _wxvtkmpr3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
 }
 
 //-------------------------------------------------------------------
@@ -714,7 +757,13 @@ void wxVtkMPR3DViewCntrlPanel::OnInterpolate(wxCommandEvent& event)
        _wxvtkmpr3Dview->Refresh();
 
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+#else
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
+#endif
+
 
 }
 
index b201515ddea4f6c5f988fa77c01057016077d368..d2d5ae212cd7265a0a6be5b80e3f5f978c3a7518 100644 (file)
@@ -302,6 +302,7 @@ bool marParameters::load( std::ifstream& is )
        int i, s;
        try
        {
+               char tmp[500];
                is.read( ( char* )_boolValues, e_bool_cont * sizeof( bool ) );
                is.read( ( char* )_intValues, e_int_cont * sizeof( int ) );
                is.read( ( char* )_doubleValues, e_double_cont * sizeof( double ) );
@@ -309,7 +310,13 @@ bool marParameters::load( std::ifstream& is )
                {
                        is.read( ( char* )&s, sizeof( int ) );
                        _stringValues[ i ].resize( s );
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        is.read( ( char* )_stringValues[ i ].c_str( ), s * sizeof( char ) );
+#else
+                       is.read( tmp , s * sizeof( char ) );
+                       _stringValues[ i ]=wxString(tmp);
+#endif
                } // rof
                return( true ); 
        }
@@ -422,7 +429,12 @@ wxArrayString marParameters::getRelationalArray( )
 
      for( i = 0; i < e_string_cont; i++, j += 2 ) {
                ret.Add( wxString( StringParamNames[ i ], wxConvUTF8)  );
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                ret.Add( wxString( _stringValues[ i ].c_str( ), wxConvUTF8 ) );
+#else
+               ret.Add( wxString( _stringValues[ i ] ) );
+#endif
      } // rof