[Insight-users] vtk datatype problem

John Drescher drescherjm at gmail.com
Fri Jun 1 17:44:35 EDT 2012


> i'm trying to read and display 3D image with itk and vtk but the main
> problem image has 2 byte per pixel
> so at reading i create imagetype with unsigned short then while trying to
> display i got this error
>
>
> vtkOpenGLImageActor (03544288): This filter requires unsigned char scalars
> as input
>
> what can i do to solve this and keep all data without loss?
>

The display is 8 bit so it will need to be 8 bit to view. Put
vtkImageMapToColors  in your pipeline to allow you to window and level
out the best 8 bit for display.

John


More information about the Insight-users mailing list