[vtkusers] how to use vtkDICOMImageReader

Amy Squillacote amy.squillacote at kitware.com
Tue Jun 20 08:39:29 EDT 2006



qingzhen wrote:
> Another question:
> "vtkVolumeRayCastMapper (0x08DEF060): Cannot volume render data of
> type short, only unsigned char or unsigned short." How can I let my
> raw CT datasets to be "unsigned char or unsigned short"?
Use either vtkImageShiftScale or vtkImageCast to transform the data to
either unsigned char or unsigned short. Both of these filters have a
methods called SetOutputScalarTypeToUnsignedChar() and
SetOutputScalarTypeToUnsignedShort(). If the data in your volume is in
the range of unsigned char (0 - 255) or unsigned short (0 - 65535), use
vtkImageCast; otherwise use vtkImageShiftScale to make your data fit in
one of these ranges.

- Amy




More information about the vtkusers mailing list