]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkSliceImage.cxx
#3212 BBTK Feature New Normal - vtk8itk4wx3-mingw64
[bbtk.git] / packages / vtk / src / bbvtkSliceImage.cxx
index 473b276042177499e0a299de62b7be97cacc0455..497e304db098280df9ef29b6f1dcbd4b8ffc42bd 100755 (executable)
@@ -70,9 +70,16 @@ printf("EED **********************************   >> use bbtk-box creaMaracasVisu
                final = vtkImageData::New();
                final->SetSpacing(space);
                final->SetDimensions(newDim);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                final->SetScalarType(scalar_type);
                final->AllocateScalars();
                final->Update();
+#else
+               final->AllocateScalars(scalar_type,1);
+#endif
+
        }
 
        bbSetOutputMax(max_z);
@@ -141,7 +148,13 @@ printf("EED **********************************   >> use bbtk-box creaMaracasVisu
        }
 
        caster = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        caster->SetInput(final);
+#else
+       caster->SetInputData(final);
+#endif
+
        caster->SetOutputScalarTypeToShort();
        caster->Update();