but the actor need a mapper type of vtkImageMapper,the error occurs at the last line:
Argument of type ‘vtkImageResliceMapper’ is not assignable to parameter of type ‘vtkImageMapper’.
Type ‘vtkImageResliceMapper’ is missing the following properties from type ‘vtkImageMapper’: getSliceAtPosition, getClosestIJKAxis, getBoundsForSlice, getRenderToRectangle, and 15 more.ts(2345)
I followed the api and the example,and the example works: vtk.js.
Could you please answer why is so?
Thank you so much for the help.
Thanks for reporting the issue. It looks like we need to update vtkImageReslice and vtkImageResliceMapper ts definitions for typescript related errors. I will log this as an issue on GitHub. Hopefully, we can get this fixed soon.