I figured as much about the spacing and step size<br>It isn't a disaster; 2^n grid size is in the end convenient for my application<br>Thanks again for your help<br><br>Ryan<br><br><div class="gmail_quote">On Wed, Mar 17, 2010 at 4:26 PM, David Feng <span dir="ltr"><<a href="mailto:dfeng@cs.unc.edu">dfeng@cs.unc.edu</a>></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;">You're probably right about the scaling, just to make texturing quick.<br>
Position and size of the plane you can control, but I don't think<br>
spacing and step size are exposed. You'll probably have to write your<br>
own version of the class if you want that level of control,<br>
unfortunately.<br>
<font color="#888888"><br>
David<br>
</font><div><div></div><div class="h5"><br>
On Wed, Mar 17, 2010 at 9:28 AM, Ryan Murray <<a href="mailto:rymurr@gmail.com">rymurr@gmail.com</a>> wrote:<br>
> 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<br>
> 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<br>
> necessary?<br>
><br>
> Thanks<br>
> Ryan<br>
><br>
> On Tue, Mar 16, 2010 at 5:48 PM, David Feng <<a href="mailto:dfeng@cs.unc.edu">dfeng@cs.unc.edu</a>> wrote:<br>
>><br>
>> Check out the vtkImagePlaneWidget. It'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 "reader" is a normal image reader with vtkImageData as output,<br>
>> // and you've set up your renderer/renderwindow/renderwindowinteractor as<br>
>> usual.<br>
>> // "iren" is a pointer to the interactor.<br>
>><br>
>> vtkImagePlaneWidget* ipwidget = vtkImagePlaneWidget::New();<br>
>> ipwidget->SetInteractor(iren);<br>
>> ipwidget->SetInput(reader->GetOutput);<br>
>><br>
>> You can get a pointer to the resliced image for processing using<br>
>> "ipwidget->GetResliceOutput()."<br>
>><br>
>> If this doesn't do exactly what you want, look at<br>
>> vtkImagePlaneWidget's source code. It has all you need for creating<br>
>> your own slice plane, resampling, etc.<br>
>><br>
>> David<br>
>><br>
>><br>
>> On Tue, Mar 16, 2010 at 12:15 PM, Ryan Murray <<a href="mailto:rymurr@gmail.com">rymurr@gmail.com</a>> wrote:<br>
>> > Hi all,<br>
>> > I am trying to do something which I think should be straightforward.<br>
>> > I have a vtk image file which holds a large 3d array on a structured<br>
>> > rectilinear grid<br>
>> > The only part of the vtk file I want is a 2d slice in the x,y plane.<br>
>> > The problem is that the slice I want is not necessarily at a grid point<br>
>> > and<br>
>> > the<br>
>> > grid I want to output is not necessarily on the same grid as the vtk<br>
>> > file.<br>
>> ><br>
>> ><br>
>> > I have been able to successfully use vtkExtractVOI to extract a plane on<br>
>> > teh<br>
>> > grid defined in the vtk file and obviously read in the vtk file<br>
>> > I really have no idea how to move the plane between z grid points or how<br>
>> > to<br>
>> > resample the extracted grid<br>
>> ><br>
>> > I would appreciate any suggestions<br>
>> > Thanks<br>
>> > _______________________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the VTK FAQ at:<br>
>> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> <a href="http://www.cs.unc.edu/%7Edfeng" target="_blank">http://www.cs.unc.edu/~dfeng</a><br>
><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5"><a href="http://www.cs.unc.edu/%7Edfeng" target="_blank">http://www.cs.unc.edu/~dfeng</a><br>
</div></div></blockquote></div><br>