<html>
<body>
Hi Jim,<br><br>
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.<br><br>
- Amy<br><br>
At 04:48 PM 4/19/2005, Jim wrote:<br>
<blockquote type=cite class=cite cite="">Hi vktusers,<br>
<br>
I am trying to volume-render a double-precision scalar with
vtkVolumeRayCastMapper. <br>
My raw data (scalar data) are double-precision numbers and they can be
negative. I created <br>
my vtkImageData from unstructured scalar data using vtkShepardMethod. My
questions are<br>
<br>
1) Do I have to scale my raw scalar data to the range of [0, 255] before
creating my <br>
vtkImageData?<br>
2) What does vtkImageCast->SetOutputScalarTypeToUnsignedShort() do if
my ImageData <br>
is not scaled to the range of [0, 255]? Will it set
any number less than 0 to 0, any <br>
number greater than 255 to 255?<br>
<br>
Thank you.<br>
<br>
Jim<br><br>
<br>
Do you Yahoo!?<br>
Plan great trips with
<a href="http://us.lrd.yahoo.com/_ylc=X3oDMTFmZ2htMTlyBF9TAzMyOTc1MDIEX3MDODYyNzYxNwRwb3MDMQRzZWMDbWFpbARzbGsDZm9vdGVy/SIG=10tesb5j9/**http%3a//travel.yahoo.com/">
Yahoo! Travel</a>: Now
<a href="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!</a> <br>
_______________________________________________<br>
This is the private VTK discussion list. <br>
Please keep messages on-topic. Check the FAQ at:
<a href="http://www.vtk.org/Wiki/VTK_FAQ" eudora="autourl">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" eudora="autourl">
http://www.vtk.org/mailman/listinfo/vtkusers</a></blockquote></body>
</html>