<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear VTK-users,</FONT></DIV>
<DIV><FONT size=2><FONT face=Arial>&nbsp;</DIV></FONT></FONT>
<DIV><FONT face=Arial size=2>I have a series of RAW images I wish to render. I 
know their sizes, how they are laid out, and can open them in Paintshop Pro, but 
I can not get them to render in VTK. I think that this may have something to do 
with the vtkImageReader I am using.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The pictures are color bit mapped, RGB 24 bit 
planar images, with a pixel size of 0.33.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have used the code below to read in images 
before, and successfully rendered them, but this format seems to be causing some 
difficulty as all that is rendering is a black rectangle.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Any help you can provide would be greatly 
appreciated,</FONT></DIV>
<DIV><FONT face=Arial size=2>Stephen</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Please find the code attached:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>--------------------------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#Set the origins to the corners - since we are 
setting the </FONT></DIV>
<DIV><FONT face=Arial size=2>set origin_x [expr (&nbsp;1216 / 2.0 ) * 
$PIXEL_SIZE * -1.0]<BR>set origin_y [expr (&nbsp;2048 / 2.0 ) * $PIXEL_SIZE * 
-1.0]</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkImageReader reader<BR>&nbsp;&nbsp;&nbsp; reader 
SetDataExtent 0 1215 0 2048&nbsp;1&nbsp;5<BR>&nbsp;&nbsp;&nbsp; reader 
SetDataVOI 0 1215 0 2048&nbsp;1&nbsp;5</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; reader SetFilePrefix 
$BASENAME<BR>&nbsp;&nbsp;&nbsp; reader SetDataSpacing&nbsp;0.33 0.33 
1.0<BR>&nbsp;&nbsp;&nbsp;&nbsp;reader SetDataOrigin $origin_x 
$origin_y&nbsp;0</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; reader SetHeaderSize 
0</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; reader 
SetDataByteOrderToBigEndian<BR>&nbsp;&nbsp;&nbsp; reader 
SetDataScalarTypeToUnsignedShort<BR>&nbsp;&nbsp;&nbsp; reader SetDataMask 
0x7fff<BR>&nbsp;&nbsp;&nbsp; [reader GetOutput] 
GlobalReleaseDataFlagOn;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkImageCast cast<BR>&nbsp;&nbsp;&nbsp; cast 
SetInput [reader GetOutput]<BR>&nbsp;&nbsp;&nbsp; cast 
SetOutputScalarTypeToUnsignedChar<BR>&nbsp;&nbsp;&nbsp; 
<BR>vtkVolumeRayCastCompositeFunction&nbsp; compositeFunction</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkVolumeRayCastMapper 
volumeMapper<BR>&nbsp;&nbsp;&nbsp; volumeMapper SetVolumeRayCastFunction 
compositeFunction<BR>&nbsp;&nbsp;&nbsp; volumeMapper SetInput [cast 
GetOutput]</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkVolume volume<BR>&nbsp;&nbsp;&nbsp; volume 
SetMapper volumeMapper</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I then go on to render it as normal.</FONT></DIV>
<DIV><FONT face=Arial size=2>I&nbsp;have also tried setting the reader&nbsp;as 
UnsignedChar to no avail.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks for reading this far,</FONT></DIV>
<DIV><FONT face=Arial size=2>Stephen</FONT></DIV></BODY></HTML>