[vtkusers] How to Covert a 8 Bit vtkImageData Ojbect to a 12Bit vtkImageData Object?

David Gobbi david.gobbi at gmail.com
Tue Dec 14 22:57:41 EST 2010


On Tue, Dec 14, 2010 at 8:28 PM, finsher <zhuyinghua01 at gmail.com> wrote:

>
> I read from BMP file, and need to convert the data to 0--4095 and display
> that . how to do that?
>

You can use vtkImageShiftScale with these settings:
SetScale(4095.0/255.0)
SetOutputScalarTypeToUnsignedShort()

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101214/7945f8ac/attachment.htm>


More information about the vtkusers mailing list