#if wxMAJOR_VERSION <= 2
this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File")));
#else
- this->AddTool(1,
- wxString("test"),
- bitmap0,
- NULL,
- wxITEM_NORMAL,
- wxString("Open File") );
+ this->AddTool(1, wxString(_T("test")),bitmap0, wxString(_T("Open File")), wxITEM_NORMAL );
#endif
//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);
//------------------------------------------------------------------------
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(""),
_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();
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;
}
}
_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++)
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;
}
_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();
}
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
+
}
//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);
//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();
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();
}
// _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
}
// 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 )
#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
+
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+ #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
#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)
+ #ifdef __WXGTK__
+ #include <gdk/gdkx.h>
+ #include <gtk/gtk.h>
+ #endif
#endif
+
+
+
+
#ifdef __WXX11__
#include "wx/x11/privx.h"
#define GetXWindow(wxwin) ((Window)(wxwin)->GetHandle())
// Find and return the actual X-Window.
#if defined(__WXGTK__) || defined(__WXX11__)
- return (long)GetXWindow(this);
+
+ //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+ #if wxMAJOR_VERSION <= 2
+ return (long)GetXWindow(this);
+ #else
+ GdkWindow* Win = gtk_widget_get_window( (GtkWidget *) GetHandle() );
+ return (long int)GDK_WINDOW_XDISPLAY(Win);
+ #endif
+
#endif
//#ifdef __WXMOTIF__
_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
}
//-------------------------------------------------------------------
_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)
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)
{
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)
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
}
//----------------------------------------------------------------------------
_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
}
//-------------------------------------------------------------------
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 )
{
//-------------------------------------------------------------------
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() );
//_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();
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);
}
//_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();
//-------------------------------------------------------------------
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);
+#else
+ wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.vtk"), wxFD_OPEN);
+#endif
+
if (dialog.ShowModal() == wxID_OK)
{
_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadMeshVTK( (char *)dialog.GetPath().c_str() );
_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
}
_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
+
}