]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSphereView.cxx
#3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxSphereView.cxx
index 961918187031c5118bb9d2c959e8aa8d29bc9b43..180e4cd182ed1326275d88a833816412853adf23 100644 (file)
@@ -38,12 +38,18 @@ wxSphereView::wxSphereView( wxWindow *parent, vtkMPRBaseData *vtkmprbasedata/*,
        _imageSphere            =       vtkImageData::New();
        _imageSphere->SetDimensions (150,150,500);
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
 //EED
 //     _imageSphere->SetScalarTypeToUnsignedShort();
        _imageSphere->SetScalarType( _imageDataOriginal->GetScalarType() );
-
        _imageSphere->AllocateScalars();   
        _imageSphere->Update();   
+#else
+       _imageSphere->AllocateScalars(_imageDataOriginal->GetScalarType(),1);   
+#endif
+
+
 
 //EED  ???? vtkBaseData  no esta compartido con los otros objetos .. PLOP
 //     vtkBaseData *vtkbasedata = new vtkBaseData();
@@ -158,7 +164,12 @@ void wxSphereView::Refresh(  )
 void wxSphereView::RefreshView()
 {
 //EED
-       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput ( _imageSphere );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       _imageViewer2XYZ->GetVtkImageViewer2()->SetInput( _imageSphere );
+#else
+       _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( _imageSphere );
+#endif
        DefineImageSphere();
 //     UpdateColorWindowLevel();
 //     wxVtk2DBaseView::Refresh();
@@ -419,7 +430,12 @@ void wxSphereView::FiltreImageB(int id, double radio, bool ok,int deltaTMP)
                }
        }
        _imageSphere->Modified();  
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        _imageSphere->Update();
+#else
+       // ..
+#endif
 }
 
 //----------------------------------------------------------------------------