<div>hi Yixun,</div>
<div>Thanks for your email.I had a couple of more questions though.</div>
<div>1.I do not want to visualize colour slices.They are grey level images.</div>
<div>&nbsp;</div>
<div>2.Also if I put SetDataExtent() before the Update() then I am getting an access violation error.What does the Update function do exactly?</div>
<div>Also can you tell me what the five parameters in SetDataExtent() mean?</div>
<div>&nbsp;</div>
<div>3.If I use vtkVolume what mapper should I use to visualize the slices?</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Thanks again for all your help.</div>
<div>Sharwari</div>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 8/23/06, <b class="gmail_sendername">Yixun Liu</b> &lt;<a href="mailto:yxliu@fudan.edu.cn">yxliu@fudan.edu.cn</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div 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(&quot;D:\\MyVC\\VTKtest\\Raycasting\\Data\\BrainColor\\brain&quot;);<br>&nbsp;v16-&gt;SetFilePattern(&quot;%s%d.TIF&quot;);
<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"><span class="st" id="st" name="st">Yixun</span> Liu</font></div>
<div><br>&nbsp;</div>
<div><font face="Bookman Old Style"></font>&nbsp;</div></div></div></blockquote></div><br>