X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fvtk%2Fsrc%2FbbvtkImageCastToUShort.cxx;h=b27dbb6c5f2a789d13a433962bc033b7c742e17e;hb=ce796ef8e6c470b95b8f00cad76c25a9e4a88df1;hp=8e60e7ef2bca13cce733d43157974dc789d0d72d;hpb=cfad95b6e08e6e53846ffcda7fbc5932065f2c47;p=bbtk.git diff --git a/packages/vtk/src/bbvtkImageCastToUShort.cxx b/packages/vtk/src/bbvtkImageCastToUShort.cxx index 8e60e7e..b27dbb6 100644 --- a/packages/vtk/src/bbvtkImageCastToUShort.cxx +++ b/packages/vtk/src/bbvtkImageCastToUShort.cxx @@ -48,8 +48,17 @@ void ImageCastToUShort::Process() // (the one provided in the attribute 'type' of the tag 'input') vtkImageData* img = bbGetInputIn(); + +//EED 2017-01-01 Migration VTK7 +#if (VTK_MAJOR_VERSION <= 5) cast->SetInput(img); +#endif +#if (VTK_MAJOR_VERSION >= 6) + cast->SetInputData(img); +#endif + cast->SetOutputScalarTypeToUnsignedShort(); + cast->Modified(); cast->Update(); bbSetOutputOut(cast->GetOutput() ); }