[vtkusers] Changing Data Type

Dean Inglis dean.inglis at camris.ca
Wed May 5 08:33:12 EDT 2010


if your short data ranges between 0 and 65536
you can use vtkImageCast, otherwise you can use
vtkImageShiftScale

Dean

I have an Analyze Image that i converted to VTK format for loading into the
VolumeMapper . My problem is Analyze is of type short and the VolumeMapper
only takes unsigned short.

Is there any way to convert the imageData with the datatype short to
unsigned short ?

I tried using the SetScalarType to UnsignedShort() but it did not change the
data type .


Regards
Darshan




More information about the vtkusers mailing list