if(currentWindow != NULL){
currentWindow->Hide();
/// \TODO fix warning: virtual bool wxSizer::Remove(wxWindow*) is deprecated
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
sizer->Remove(currentWindow);
+#else
+ sizer->Detach(currentWindow);
+#endif
+
}
sizer->Add(panel);
currentWindow = panel;
if(currentWindow != NULL){
currentWindow->Hide();
/// \TODO fix warning: virtual bool wxSizer::Remove(wxWindow*) is deprecated
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
sizer->Remove(currentWindow);
+#else
+ sizer->Detach(currentWindow);
+#endif
+
}
wxPanel * emptyPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
sizer->Add(emptyPanel);
/* // if */
wxString newstring;
//newstring.Printf("%s %d -",_wxtextctrlSpread->GetValue(), actualSlice );
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
newstring.append(wxString(_wxtextctrlSpread->GetValue(),wxConvUTF8));
+#else
+ newstring.append( _wxtextctrlSpread->GetValue() );
+#endif
+
+
newstring.append(wxString(" ",wxConvUTF8));
newstring.append(wxString(val.c_str(),wxConvUTF8));
_wxtextctrlSpread->SetValue(newstring);
FillGridWithContoursInformation();
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
wxFlexGridSizer * sizerSave = new wxFlexGridSizer(2,2);
+#else
+ wxFlexGridSizer * sizerSave = new wxFlexGridSizer(2);
+#endif
sizerSave -> Add( new wxStaticText(this,-1,_T("Save Options: ")) , 1, wxGROW );
sizerSave->Add( _XYZValues, 1, wxALL, 2 );
sizerSave->Add( _statistics, 1, wxALL, 2 );
sizerB->Add( showResultImagesBtn, 1, wxALL, 2 );
sizerB->Add( saveResultsBtn, 1, wxALL, 2 );
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
wxFlexGridSizer * sizer = new wxFlexGridSizer(1,8);
+#else
+ wxFlexGridSizer * sizer = new wxFlexGridSizer(8);
+#endif
sizer->Add( sizerA , 1, wxALL , 0 );
sizer->Add( new wxStaticText(this ,-1,_T("Slice Range")) , 1, wxALL , 0 );
sizer->Add( _mbarrangeSliceInformation , 1, wxALL|wxGROW , 2 );
void interfInformationPanel::onSaveResults(wxCommandEvent& event)
{
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
wxFileDialog dialog(this, _T("Choose a filename"), _T(""), _T(""), wxFileSelectorDefaultWildcardStr, wxSAVE );
+#else
+ wxFileDialog dialog(this, _T("Choose a filename"), _T(""), _T(""), wxFileSelectorDefaultWildcardStr, wxFD_SAVE );
+#endif
if (dialog.ShowModal() == wxID_OK)
{
onExtractInformation( event );
if(GetFileLocation().empty())
{
//------------------------------------------------------------------------------------------------------------
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
wxFileDialog dialog(NULL, _T("Choose a file"), _T(""), _T(""), _T("*.roi"), wxOPEN );
+#else
+ wxFileDialog dialog(NULL, _T("Choose a file"), _T(""), _T(""), _T("*.roi"), wxFD_OPEN );
+#endif
if (dialog.ShowModal() == wxID_OK)
{
fileNameContourROI = (const char *)(dialog.GetPath().mb_str());
}// for i list of static things
}
-
-
void wxContourMainFrame::onLoadContours(std::string fileNameContourROI, bool interactiveInterface)
{
char tmp[255];
char tmpD[255];
-
FILE *pFile =fopen(fileNameContourROI.c_str(),"r+");
-
-
//CMRU 03-09-09- ----------------------------------------------------------------------------------------------
if(pFile != NULL)
{
if(pFileData != NULL)
{
fclose(pFileData);
- }
+ } // if
}
_theViewPanel->getSceneManager()->removeSceneContours();
changeInstant();
}
-
-void wxContourMainFrame::onImport(){
+void wxContourMainFrame::onImport()
+{
std::string filename, filenamecontours;
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
wxFileDialog dialog(NULL, _T("Choose a XML Osirix File"), _T(""), _T(""), _T("*.xml"), wxOPEN );
-
+#else
+ wxFileDialog dialog(NULL, _T("Choose a XML Osirix File"), _T(""), _T(""), _T("*.xml"), wxFD_OPEN );
+#endif
if (dialog.ShowModal() == wxID_OK)
{
filename = dialog.GetPath().mb_str();
if(filenamecontours.compare("") != 0){
onLoadContours(filenamecontours,true);
- }
-
- }
+ } // if
+ } // if
}
-void wxContourMainFrame::onTest(){
+
+void wxContourMainFrame::onTest()
+{
std::string filename, filenamecontours;
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
wxFileDialog dialog(NULL, _T("Choose a File"), _T(""), _T(""), _T("*.*"), wxOPEN );
+#else
+ wxFileDialog dialog(NULL, _T("Choose a File"), _T(""), _T(""), _T("*.*"), wxFD_OPEN );
+#endif
if (dialog.ShowModal() == wxID_OK)
{
filename = dialog.GetPath().mb_str();
std::cout << "This is the filename: " << filename << std::endl;
- }
+ } // if
}
if(GetFileLocation().empty())
{
//------------------------------------------------------------------------------------------------------------
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
wxFileDialog dialog(NULL, _T("Choose a file"), _T(""), _T(""), _T("*.roi"), wxSAVE );
+#else
+ wxFileDialog dialog(NULL, _T("Choose a file"), _T(""), _T(""), _T("*.roi"), wxFD_SAVE );
+#endif
if (dialog.ShowModal() == wxID_OK)
{
std::string fileNameContourROI = (const char *)(dialog.GetPath().mb_str());
bool condition = true;
int X,Y;
- wxVTKRenderWindowInteractor *_wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
+ crea::wxVTKRenderWindowInteractor *_wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
_wxVTKiren->GetEventPosition( X , Y );
bool ctrlKey = _vtkInteractorStyleBaseView->GetInteractor()->GetControlKey() == 1;
size = selectionSize;
iter = _workingGroup->begin();
}
- }
- else
- {
+ } else {
_toIncludeAtInteractionGroup = false;
}
double sg = (double)(start) / CLOCKS_PER_SEC;
#endif
int tmpPx,tmpPy;
- wxVTKRenderWindowInteractor *wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
+ crea::wxVTKRenderWindowInteractor *wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
wxVTKiren->GetEventPosition( tmpPx , tmpPy );
fprintf(ff,"::%s (x,y) = (%i, %i) t(sg): %f\n \n",method.c_str(), tmpPx, tmpPy, sg);
fclose(ff);