]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkMIPCreator.cxx
#3107 BBTK Bug New Normal - branch vtk7itk4 compilation with vtk7
[bbtk.git] / packages / vtk / src / bbvtkMIPCreator.cxx
index c1bf38d3f63b646b805dc302288c95191ac7ac9f..c822385d7eaba8a256b5c4148a0cadf43148d8c6 100644 (file)
@@ -125,12 +125,24 @@ namespace bbvtk
 
         double ranges[2];
         vtkImageData *image =  bbGetInputIn();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
         image->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       // ..
+#endif
         image->GetScalarRange(ranges);
 
           scale = 255/(ranges[1]/100);
 
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        mCast->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       mCast->SetInputData( bbGetInputIn() );
+#endif
        mCast->SetScale( scale / 100.0 );
      //mCast->SetShift( -bbGetInputShift() );
 
@@ -212,7 +224,14 @@ namespace bbvtk
 
         mMapper = vtkVolumeRayCastMapper::New();
         mMapper->SetVolumeRayCastFunction(mMIP);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
         mMapper->SetInput(mCast->GetOutput()); // (smoother.GetOutput())
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+        mMapper->SetInputData(mCast->GetOutput()); // (smoother.GetOutput())
+#endif
 
         mVolume = vtkVolume::New();
         mVolume->SetMapper(mMapper);