<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Anja,<br>
<br>
Since you want orthogonal slices, try using vtkImageClip. Use the
SetOutputWholeExtent method to specify a slice in the volume; the
minimum and maximum extent values will be the same along whatever axis
you're taking the slice. Don't modify the extents for the other axes.
For example, if your data's extents are 0 - 10 in x, 0 to 20 in y, and
0 to 30 in z, then to extract the 5 slice along the x axis, you would
call SetOutputWholeExtent with the parameters 5, 5, 0, 20, 0, 30.<br>
<br>
- Amy<br>
<br>
Anja Ende wrote:
<blockquote
 cite="mid1f5d2b4f0608210949q4e275e15k43fca1259962c1@mail.gmail.com"
 type="cite">Hi Beau,<br>
  <br>
Ya, I looked at that component but it uses a vtkPlaneSource object... I
was thinking that there must be an easier way to do this using the
vtkImageReslicer. <br>
  <br>
Cheers,<br>
Anja<br>
  <br>
  <div><span class="gmail_quote">On 21/08/06, <b
 class="gmail_sendername">Anja Ende</b> &lt;<a
 href="mailto:anja.ende@googlemail.com">anja.ende@googlemail.com</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;">
    <div>Hi everyone,<br>
    <br>
I know this question has been asked before but I could not find an
answer that could have helped me, so I am asking again.<br>
    <br>
Well... I am trying to get the classic 3 orthogonal slices through a
volume. I know the vtkImageViewer2 provides this functionality but I
cannot use that component unfortunately.
    <br>
    <br>
I was trying to use the vtkImageReslicer to get the XZ plane through
the volume. <br>
    <br>
So, I tried setting up the matrix as follows:<br>
    <br>
vtkImageReslice * slicer = vtkImageReslice::New();<br>
slicer-&gt;SetInput(imageChangeInformationP-&gt;GetOutput());
    <br>
slicer-&gt;SetResliceAxesDirectionCosines(1, 0, 0, 0, 0, 1, 0, -1, 0);<br>
    <br>
Is this matrix correct if I want to get the XZ plane out of the volume?
I ask because some of the slices in the beginning and end seem bogus.
The vtkImageViewer2 does not show them when I set the orientation to XZ
in the vtk viewer.
    <br>
    <br>
Also, I noticed that the vtkImageViewer2 displays the volume nicely
with correct aspect ratio and all that... So, I tried using:<br>
    <br>
slicer-&gt;SetOutputSpacing(1.0, 1.0, 1.0);<br>
    <br>
This was shown in the example. However, this changes my extents and the
number of Z slices reduces. <br>
    <br>
I was wondering if someone can help me determine the correct matrix for
extracting these planes.<br>
    <br>
Thanks,<br>
    </div>
    <div><span class="sg"><br>
Anja
    </span></div>
  </blockquote>
  </div>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a>
  </pre>
</blockquote>
</body>
</html>