Have a look at <a href="http://www.cmake.org/Wiki/VTK/Examples/Python/vtkCutter">http://www.cmake.org/Wiki/VTK/Examples/Python/vtkCutter</a> or its c++ version in the vtk wiki examples section<br><br>Jothy<br><br><div class="gmail_quote">
On Thu, Feb 25, 2010 at 6:15 AM, Hsiang-Chi Kuo <span dir="ltr"><<a href="mailto:hskuo@montefiore.org">hskuo@montefiore.org</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;">
Hi dear friends,<br>
<br>
I want to cut a volume data (.vtp) at different angle and read the data<br>
out. I applied vtkPlan and vtkCutter on the vtp data, what should I do<br>
next to be able to read the data out? Bellow is part of my code.<br>
<br>
vtkSmartPointer<vtkXMLUnstructuredGridReader> reader =<br>
vtkSmartPointer<vtkXMLUnstructuredGridReader>::New();<br>
reader->SetFileName(filename.c_str());<br>
reader->Update();<br>
vtkSmartPointer<vtkPlane> plane = vtkSmartPointer<vtkPlane>::New();<br>
plane->SetOrigin(-50.3,-84.5,-18.8);<br>
plane->SetNormal(1,0,0);<br>
vtkSmartPointer<vtkCutter> cutter = vtkSmartPointer<vtkCutter>::New();<br>
cutter->SetCutFunction(plane);<br>
cutter->SetInput(reader->GetOutput());<br>
cutter->Update();<br>
<br>
Thanks,<br>
<br>
Howard<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 <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: <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>
</blockquote></div><br>