From: Eduardo DAVILA Date: Fri, 4 Aug 2017 08:01:58 +0000 (+0200) Subject: #3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0830ebb395ff2c409e379ffbab7e80161c58c3dc;p=creaMaracasVisu.git #3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7 --- diff --git a/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx b/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx index e364134..5c51342 100644 --- a/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx +++ b/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx @@ -62,7 +62,13 @@ void ManualPaint_Model::Process() // int ia,ja,ka; // int ii,jj,kk; int ext[6]; +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 bbGetInputByImagePoints()->GetWholeExtent(ext); +#else + bbGetInputByImagePoints()->GetExtent(ext); +#endif + int dimX=ext[1]-ext[0]+1; int dimY=ext[3]-ext[2]+1; int dimZ=ext[5]-ext[4]+1; diff --git a/bbtk/src/bbcreaMaracasVisuSliceImage.cxx b/bbtk/src/bbcreaMaracasVisuSliceImage.cxx index 10306c6..a354dfa 100644 --- a/bbtk/src/bbcreaMaracasVisuSliceImage.cxx +++ b/bbtk/src/bbcreaMaracasVisuSliceImage.cxx @@ -39,7 +39,14 @@ void SliceImage::Process() //std::cout<<"MSJ: test SliceImage::Process()"<SetInput( bbGetInputIn() ); +#else + imageReslice->SetInputData( bbGetInputIn() ); +#endif + imageReslice->SetInformationInput(bbGetInputIn() ); double slice=bbGetInputSlice(); @@ -95,9 +102,18 @@ void SliceImage::Process() } imageReslice->SetOutputDimensionality(2); imageReslice->SetInterpolationModeToLinear(); + + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 imagedata = imageReslice->GetOutput(); imagedata->Update(); imagedata->UpdateInformation(); +#else + imageReslice->Update(); + imagedata = imageReslice->GetOutput(); +#endif + } bbSetOutputOut( imagedata ); } diff --git a/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx b/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx index dbb0a9e..e3989b5 100644 --- a/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx +++ b/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx @@ -176,7 +176,14 @@ namespace bbcreaMaracasVisu vtkSmartPointer tube = vtkSmartPointer::New(); tube->CappingOn(); + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 tube->SetInput(polyData); +#else + tube->SetInputData(polyData); +#endif + tube->SetNumberOfSides(nTv); tube->SetVaryRadiusToVaryRadiusByAbsoluteScalar(); diff --git a/bbtk/src/bbcreaMaracasVisuTubeTreeFilter.cxx b/bbtk/src/bbcreaMaracasVisuTubeTreeFilter.cxx index b58742c..bb4e3c2 100644 --- a/bbtk/src/bbcreaMaracasVisuTubeTreeFilter.cxx +++ b/bbtk/src/bbcreaMaracasVisuTubeTreeFilter.cxx @@ -307,7 +307,12 @@ void TubeTreeFilter::DrawOneTube(int iGeneral,int numPoints, int iTube) vtkSmartPointer tube = vtkSmartPointer::New(); +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 tube->SetInput(polyData); +#else + tube->SetInputData(polyData); +#endif tube->SetNumberOfSides(nTv); tube->SetVaryRadiusToVaryRadiusByAbsoluteScalar(); tube->CappingOn();