[vtkusers] vtkVolumeRayCastMapper with float or double scalar

Amy Squillacote amy.squillacote at kitware.com
Wed Apr 20 08:55:41 EDT 2005


Hi Jim,

It should be fine to leave your data in the [0, 2000] range as long as you 
set your transfer functions appropriately.

- Amy

At 05:34 PM 4/19/2005, Jim wrote:
>Hi Amy,
>
>Thanks. Say, I have a data set in the range of [-1000, 1000]. I can shift 
>the data to the new
>range of [0, 2000]. Do I have to scale the data to the full UNSIGNED-SHORT 
>range of
>[0, 65535]? Is it OK to leave the data in the range [0, 2000]? Thank you.
>
>Jim
>
>Amy Squillacote <amy.squillacote at kitware.com> wrote:
>Hi Jim,
>
>Your data has to be converted to either the range of unsigned char [0, 
>255] or unsigned short [0, 65535] in order to use the 
>vtkVolumeRayCastMapper.  Try using vtkImageShiftScale instead of 
>vtkImageCast to convert your data to the appropriate range.  You will need 
>to calculate the appropriate shift (absolute value of the largest negative 
>value in your data set) and scale (value to make the range of your data 
>lie within either 255 or 65535) to convert your data to one of these ranges.
>
>- Amy
>
>At 04:48 PM 4/19/2005, Jim wrote:
>>Hi vktusers,
>>
>>I am trying to volume-render a double-precision scalar with 
>>vtkVolumeRayCastMapper.
>>My raw data (scalar data) are double-precision numbers and they can be 
>>negative. I created
>>my vtkImageData from unstructured scalar data using vtkShepardMethod. My 
>>questions are
>>
>>1) Do I have to scale my raw scalar data to the range of [0, 255] before 
>>creating my
>>     vtkImageData?
>>2) What does vtkImageCast->SetOutputScalarTypeToUnsignedShort() do if my 
>>ImageData
>>     is not scaled to the range of [0, 255]? Will it set any number less 
>> than 0 to 0, any
>>     number greater than 255 to 255?
>>
>>Thank you.
>>
>>Jim
>>
>>
>>Do you Yahoo!?
>>Plan great trips with 
>><http://us.lrd.yahoo.com/_ylc=X3oDMTFmZ2htMTlyBF9TAzMyOTc1MDIEX3MDODYyNzYxNwRwb3MDMQRzZWMDbWFpbARzbGsDZm9vdGVy/SIG=10tesb5j9/**http%3a//travel.yahoo.com/>Yahoo! 
>>Travel: Now 
>><http://us.lrd.yahoo.com/_ylc=X3oDMTFmMnFhajhhBF9TAzMyOTc1MDIEX3MDODYyNzYxNwRwb3MDMgRzZWMDbWFpbARzbGsDZm9vdGVy/SIG=12jqk5n45/**http%3a//travel.yahoo.com/p-travelguide-191500002-destination_guides_vacations-i>over 
>>17,000 guides!
>>_______________________________________________
>>This is the private VTK discussion list.
>>Please keep messages on-topic. Check the FAQ at: 
>>http://www.vtk.org/Wiki/VTK_FAQ
>>Follow this link to subscribe/unsubscribe:
>>http://www.vtk.org/mailman/listinfo/vtkusers
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050420/e80f6d53/attachment.htm>


More information about the vtkusers mailing list