Hi David,<br>Thanks a lot for the hint. It worked perfectly<br><br>The vtkImageData that comes out of GetResliceOutput() has a different number of points than the input<br>In my case the input was 232x232x232 and the output was 256x256x1<br>

I assume that it was scaled to the closest multiple of 2<br>Is there a way to control the output number or stepsize? Interpolating as necessary?<br><br>Thanks<br>Ryan<br><br><div class="gmail_quote">On Tue, Mar 16, 2010 at 5:48 PM, David Feng <span dir="ltr">&lt;<a href="mailto:dfeng@cs.unc.edu" target="_blank">dfeng@cs.unc.edu</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Check out the vtkImagePlaneWidget.  It&#39;s an arbitrarily<br>
orientable/translatable slice plane that resamples the data onto the<br>
plane interactively.  Check out the documentation for how to interact.<br>
 To use:<br>
<br>
// assume &quot;reader&quot; is a normal image reader with vtkImageData as output,<br>
// and you&#39;ve set up your renderer/renderwindow/renderwindowinteractor as usual.<br>
// &quot;iren&quot; is a pointer to the interactor.<br>
<br>
vtkImagePlaneWidget* ipwidget = vtkImagePlaneWidget::New();<br>
ipwidget-&gt;SetInteractor(iren);<br>
ipwidget-&gt;SetInput(reader-&gt;GetOutput);<br>
<br>
You can get a pointer to the resliced image for processing using<br>
&quot;ipwidget-&gt;GetResliceOutput().&quot;<br>
<br>
If this doesn&#39;t do exactly what you want, look at<br>
vtkImagePlaneWidget&#39;s source code.  It has all you need for creating<br>
your own slice plane, resampling, etc.<br>
<br>
David<br>
<div><div></div><div><br>
<br>
On Tue, Mar 16, 2010 at 12:15 PM, Ryan Murray &lt;<a href="mailto:rymurr@gmail.com" target="_blank">rymurr@gmail.com</a>&gt; wrote:<br>
&gt; Hi all,<br>
&gt; I am trying to do something which I think should be straightforward.<br>
&gt; I have a vtk image file which holds a large 3d array on a structured<br>
&gt; rectilinear grid<br>
&gt; The only part of the vtk file I want is a 2d slice in the x,y plane.<br>
&gt; The problem is that the slice I want is not necessarily at a grid point and<br>
&gt; the<br>
&gt; grid I want to output is not necessarily on the same grid as the vtk file.<br>
&gt;<br>
&gt;<br>
&gt; I have been able to successfully use vtkExtractVOI to extract a plane on teh<br>
&gt; grid defined in the vtk file and obviously read in the vtk file<br>
&gt; I really have no idea how to move the plane between z grid points or how to<br>
&gt; resample the extracted grid<br>
&gt;<br>
&gt; I would appreciate any suggestions<br>
&gt; Thanks<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
&gt;<br>
<font color="#888888"><br>
<br>
<br>
--<br>
<a href="http://www.cs.unc.edu/%7Edfeng" target="_blank">http://www.cs.unc.edu/~dfeng</a><br>
</font></blockquote></div><br>