Hi Rodolfo, <br><br>Thanks for the code! I was actually too looking for how I could get orthogonal views through a volume. I had a question: Does your code allow you to drag and move the orthogonal slices with a mouse, back and forth? If you needed this extra functionality, how would you modify your code? I guess you put some sort of window interactor. 
<br><br>Thanks in advance for your help, and thanks again for the code. <br><br><br>Rashed<br><br><div><span class="gmail_quote">On 7/27/06, <b class="gmail_sendername"><a href="mailto:scsrsao@leeds.ac.uk">scsrsao@leeds.ac.uk
</a></b> &lt;<a href="mailto:scsrsao@leeds.ac.uk">scsrsao@leeds.ac.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Luca,
<br> I'm attaching you a piece of code I'm using to generate slice views of a<br>volume, you should only modify the extent of the slice and create one for each<br>of the three orthogonal axis... just add to a typical rendering pipeline and it
<br>should work... hope its useful for you... also, there are some medical examples<br>included in vtk, that should be also useful for you..<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepReader = vtkImageReader::New();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepReader-&gt;SetFileName(&quot;C:/ramos
<br>ymas/PROY/data/TS21z_VEL_R2_008000.bin&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepReader-&gt;SetFileDimensionality(3);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepReader-&gt;SetDataScalarTypeToFloat();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepReader-&gt;SetDataByteOrderToBigEndian();
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepReader-&gt;SetNumberOfScalarComponents(1);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepReader-&gt;SetDataExtent(0,maxX,0,maxY,0,maxZ);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepReader-&gt;SetDataSpacing(spacing,spacing,spacing);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepReader-&gt;SetDataOrigin(-300000,-150000,-40000);
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepFlip = vtkImageFlip::New();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepFlip-&gt;SetInput((vtkDataObject*)timestepReader-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timestepFlip-&gt;SetFilteredAxis(1);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//initialize Z slice stuff
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliceZ = vtkImageDataGeometryFilter::New();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliceZ-&gt;SetInput((vtkDataObject*)timestepFlip-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliceZ-&gt;SetExtent(0,maxX,0,maxY,maxZ,maxZ);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliceZMapper = vtkPolyDataMapper::New();
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliceZMapper-&gt;SetInput(sliceZ-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliceZMapper-&gt;SetLookupTable(scalarBar);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliceZMapper-&gt;SetScalarRange(0.0000001, 3.1192195);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliceZMapper-&gt;ScalarVisibilityOn();
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliceZActor = vtkActor::New();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sliceZActor-&gt;SetMapper(sliceZMapper);<br><br>cheers,<br>Rodolfo<br><br>&gt; Date: Tue, 25 Jul 2006 21:51:02 +0100<br>&gt; From: &quot;Luca Pamparana&quot; &lt;
<a href="mailto:deluded.soul@gmail.com">deluded.soul@gmail.com</a>&gt;<br>&gt; Subject: [vtkusers] orthogonal views through a volume<br>&gt; To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>&gt; Message-ID:<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href="mailto:9779cb90607251351w2a19f1eaj18c47910270a41d5@mail.gmail.com">9779cb90607251351w2a19f1eaj18c47910270a41d5@mail.gmail.com</a>&gt;<br>&gt; Content-Type: text/plain; charset=&quot;iso-8859-1&quot;
<br>&gt;<br>&gt; Hi everyone,<br>&gt;<br>&gt; I found out that the ITK Snap toolkit probably displays the three orthogonal<br>&gt; views through the volume.<br>&gt;<br>&gt; I would like to know how I can do that with vtk. Do I have to use the
<br>&gt; vtkImageReslice or is there a better way...<br>&gt;<br>&gt; Any help would be greatly appreciated. Also, can anyone recommend a good<br>&gt; medical image processing book that builds on these basics?<br>&gt;<br>&gt; Cheers and thanks,
<br>&gt;<br>&gt; Luca<br>&gt; -------------- next part --------------<br>&gt; An HTML attachment was scrubbed...<br>&gt; URL:<br>&gt;<br><a href="http://public.kitware.com/pipermail/vtkusers/attachments/20060725/34b575c2/attachment-0001.htm">
http://public.kitware.com/pipermail/vtkusers/attachments/20060725/34b575c2/attachment-0001.htm</a><br>&gt;<br>&gt; ------------------------------<br><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">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">
http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br><br clear="all"><br>-- <br>Rashed