<DIV>Hi Amy,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks. Say, I have a data set in the range of [-1000, 1000]. I can shift the data to the new</DIV>
<DIV>range of [0, 2000]. Do I have to scale the data to the full UNSIGNED-SHORT range of</DIV>
<DIV>[0, 65535]? Is it OK to leave the data in the range [0, 2000]? Thank you.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Jim<BR></DIV>
<DIV><BR><B><I>Amy Squillacote &lt;amy.squillacote@kitware.com&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">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.&nbsp; Try using vtkImageShiftScale instead of vtkImageCast to convert your data to the appropriate range.&nbsp; 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 class=cite cite="" type="cite">Hi vktusers,<BR>&nbsp;<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>&nbsp;<BR>1) Do I have to scale my raw scalar data to the range of [0, 255] before creating my <BR>&nbsp;&nbsp;&nbsp; vtkImageData?<BR>2) What does vtkImageCast-&gt;SetOutputScalarTypeToUnsignedShort() do if my ImageData <BR>&nbsp;&nbsp;&nbsp; is not scaled to the range of [0, 255]? Will it set any number less than 0 to 0, any <BR>&nbsp;&nbsp;&nbsp; number greater than 255 to 255?<BR>&nbsp;<BR>Thank you.<BR>&nbsp;<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></BLOCKQUOTE><p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com