]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx
#3418 creaMaracasVisu Feature New Normal - ManualPaint_model with openmp
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtkClipping3DViewCntrlPanel.cxx
index 9dc0af6bf65b99e876c751321aebb6b78a34cf13..2a587c97f4ad6a713d9dee8102c75dc349817d62 100644 (file)
@@ -57,10 +57,12 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w
 
                                        _color                  = new wxButton(panel,-1,_T(""));
                                        _visible                = new wxCheckBox(panel,-1,_T("Vis"));
-                                       _opacity                = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(100,40), wxSL_HORIZONTAL | wxSL_LABELS);
+//EED                                  _opacity                = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
+                                       _opacity                = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(300,110), wxSL_HORIZONTAL | wxSL_LABELS);
 
        wxStaticText    *isoValueTitle  = new wxStaticText(panel,-1,_T("isoValue"));
-                                       _isoValue               = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS);
+//EED                                  _isoValue               = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS);
+                                       _isoValue               = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxSize(300,110), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS);
 
                                        _wireFrameRep   = new wxRadioButton(panel,-1,_T("WireFrame"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
                                        _surfaceRep             = new wxRadioButton(panel,-1,_T("Surface"));
@@ -71,9 +73,14 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w
        _isoValue->SetRange( (int)(range[1]*0.1) , (int)(range[1]) );
        _isoValue->SetValue( (int)(wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIsovalue(0)) );
 
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
        _isoValue->SetTickFreq(25,0);
+#else
+       // ..
+#endif
 
-       _isoValueSpin   = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
+       _isoValueSpin   = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxDefaultSize, wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
        _isoValueSpin->SetRange(1,8);
        _isoValueSpin->SetValue(5);
        Connect(_isoValueSpin->GetId()  , wxEVT_COMMAND_SLIDER_UPDATED   , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnIsoValueSpin );
@@ -540,12 +547,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
         pdcf->SetInput( filtro->GetOutput() );
         cpd->SetInput( pdcf->GetOutput() );
 #else
-               filtro->SetInputData( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
-        pdcf->SetInputData( filtro->GetOutput() );
-        cpd->SetInputData( pdcf->GetOutput() );
+               filtro->SetInputConnection( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutputPort() );
+        pdcf->SetInputConnection( filtro->GetOutputPort() );
+        cpd->SetInputConnection( pdcf->GetOutputPort() );
 #endif
 
-               // 1.2 se escribe a disco el archivo stl de la superficie interna
+               // 1.2 Write the stl file
         cpd->Update();
         vtkSTLWriter *writer = vtkSTLWriter::New();
 
@@ -553,16 +560,14 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
 #if VTK_MAJOR_VERSION <= 5
         writer->SetInput( cpd->GetOutput() );
 #else
-        writer->SetInputData( cpd->GetOutput() );
+        writer->SetInputConnection( cpd->GetOutputPort() );
 #endif
 
-               filename =prefix;
         writer->SetFileName(filename.c_str());
         writer->SetFileTypeToASCII();
         writer->Write();
         writer->Delete();
 
-
         filtro->Delete();
         cpd->Delete();
         pdcf->Delete();