X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtk2DBaseView.cxx;h=029f1ef6a1e6f302eb4c445dca87e72f054c54a1;hb=3f720c906477d6f466d04829ab0f76815fd7117c;hp=bd26d120d364e66401ac592ac30059cd5db585ce;hpb=b80b4dcc301c1c2c63c0f76cd06b0a434350f7a7;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx index bd26d12..029f1ef 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx @@ -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);