<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Bookman Old Style">Hi,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">If you want to visualize color slices, you 
need to </FONT></DIV>
<DIV><FONT face="Bookman Old Style">1. read these slices. You need to put the 
SetDataExtent(0, 111, 0, 127, 1, 300);<BR>before Update();</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">&nbsp;vtkTIFFReader *v16 = 
vtkTIFFReader::New();<BR></FONT><FONT 
face="Bookman Old Style">&nbsp;v16-&gt;SetFilePrefix("D:\\MyVC\\VTKtest\\Raycasting\\Data\\BrainColor\\brain");<BR>&nbsp;v16-&gt;SetFilePattern("%s%d.TIF");<BR>&nbsp;v16-&gt;SetDataExtent(0, 
111, 0, 127, 1, 
300);<BR>&nbsp;v16-&gt;SetDataSpacing(1.2,1.2,0.5);<BR>&nbsp;v16-&gt;SetDataOrigin(0.0, 
0.0, 0.0);</FONT></DIV>
<DIV><FONT 
face="Bookman Old Style">&nbsp;v16-&gt;SetNumberOfScalarComponents(3);<BR></FONT><FONT 
face="Bookman Old Style">&nbsp;v16-&gt;Update();</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">2. Add the 4th component. The first three 
components are color and the 4th is used to map to opacity. I compute the 
luminancy according to the firft three components and take it as the 4th 
component.</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">3. Opacity map using 
vtkPiecewiseFunction</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">4. no need color map function</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">5. you need vtk5.0</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">Regads,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV>
<DIV><FONT face="Bookman Old Style">Yixun Liu</DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face="Bookman Old Style"></FONT>&nbsp;</DIV></BODY></HTML>