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">&lt;<a href="mailto:hskuo@montefiore.org">hskuo@montefiore.org</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;">
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&lt;vtkXMLUnstructuredGridReader&gt; reader =<br>
vtkSmartPointer&lt;vtkXMLUnstructuredGridReader&gt;::New();<br>
  reader-&gt;SetFileName(filename.c_str());<br>
  reader-&gt;Update();<br>
vtkSmartPointer&lt;vtkPlane&gt; plane = vtkSmartPointer&lt;vtkPlane&gt;::New();<br>
  plane-&gt;SetOrigin(-50.3,-84.5,-18.8);<br>
  plane-&gt;SetNormal(1,0,0);<br>
vtkSmartPointer&lt;vtkCutter&gt; cutter = vtkSmartPointer&lt;vtkCutter&gt;::New();<br>
  cutter-&gt;SetCutFunction(plane);<br>
  cutter-&gt;SetInput(reader-&gt;GetOutput());<br>
  cutter-&gt;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>