]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx
#3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtk2DBaseView.cxx
index bd26d120d364e66401ac592ac30059cd5db585ce..029f1ef6a1e6f302eb4c445dca87e72f054c54a1 100644 (file)
@@ -108,10 +108,15 @@ void wxVtk2DBaseView::ResetView()
        wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
        vtkImageData *imageData = GetVtkBaseData()->GetImageData();
        if(imageData){
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                imageData->UpdateInformation();
                imageData->SetUpdateExtent( imageData->GetWholeExtent());
                imageData->Update();
                _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
+#else
+               _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData(imageData );
+#endif
                imageData->GetSpacing (spx,spy,spz);
                imageData->GetExtent (x1,x2,y1,y2,z1,z2);
        }
@@ -151,7 +156,12 @@ void wxVtk2DBaseView::SetImageToVtkViewer(vtkImageData *imageData)
 {
        if (_imageViewer2XYZ!=NULL)
        {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                _imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData );
+#else
+               _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( imageData );
+#endif
        } // if _imageViewer2XYZ
 }
 
@@ -193,9 +203,16 @@ void wxVtk2DBaseView::Configure(bool okimage)
        vtkImageData *imageData = GetVtkBaseData()->GetMarImageData()->GetImageData();
        if (imageData!=NULL)
        {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                imageData->UpdateInformation();
                imageData->SetUpdateExtent( imageData->GetWholeExtent());
                imageData->Update();
+#else
+               //...
+#endif
+
                if (okimage==true){
                        imageData->GetSpacing (spx,spy,spz);
                        imageData->GetExtent (x1,x2,y1,y2,z1,z2);