]> Creatis software - creaMaracasVisu.git/commitdiff
#3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7
authorEduardo DAVILA <davila@localhost.localdomain>
Fri, 4 Aug 2017 08:01:58 +0000 (10:01 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Fri, 4 Aug 2017 08:01:58 +0000 (10:01 +0200)
bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx
bbtk/src/bbcreaMaracasVisuSliceImage.cxx
bbtk/src/bbcreaMaracasVisuTubeFilter.cxx
bbtk/src/bbcreaMaracasVisuTubeTreeFilter.cxx

index e36413448e29d70fe33e61093d2f50958584bbcd..5c513422088d8bcc769e309305fc8a33ead7763f 100644 (file)
@@ -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;
index 10306c6f34b3fc7a16292bc9746365c101369cc2..a354dfa3fe47d249e4101949d46ef4870980fa52 100644 (file)
@@ -39,7 +39,14 @@ void SliceImage::Process()
        //std::cout<<"MSJ: test SliceImage::Process()"<<this<<std::endl;
        if ( bbGetInputIn()!=NULL )
        {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
          imageReslice->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 );
 }
index dbb0a9e457551b8ab38f588d65e0fe566418746b..e3989b55f32b3b274128bc5fdc82736f6db175f9 100644 (file)
@@ -176,7 +176,14 @@ namespace bbcreaMaracasVisu
                
                vtkSmartPointer<vtkTubeFilter> tube = vtkSmartPointer<vtkTubeFilter>::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();
                
index b58742c5c63e1d1db6fa6b147461e41be4570a88..bb4e3c23071fb7ddd6c22f86537db2b023963673 100644 (file)
@@ -307,7 +307,12 @@ void TubeTreeFilter::DrawOneTube(int iGeneral,int numPoints, int iTube)
 
 
        vtkSmartPointer<vtkTubeFilter> tube = vtkSmartPointer<vtkTubeFilter>::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();