[vtkusers] Read data from a vtkCutter

KS Jothybasu jothybasu at gmail.com
Thu Feb 25 05:46:49 EST 2010


Have a look at http://www.cmake.org/Wiki/VTK/Examples/Python/vtkCutter or
its c++ version in the vtk wiki examples section

Jothy

On Thu, Feb 25, 2010 at 6:15 AM, Hsiang-Chi Kuo <hskuo at montefiore.org>wrote:

> Hi dear friends,
>
> I want to cut a volume data (.vtp) at different angle and read the data
> out. I applied vtkPlan and vtkCutter on the vtp data, what should I do
> next to be able to read the data out? Bellow is part of my code.
>
> vtkSmartPointer<vtkXMLUnstructuredGridReader> reader =
> vtkSmartPointer<vtkXMLUnstructuredGridReader>::New();
>  reader->SetFileName(filename.c_str());
>  reader->Update();
> vtkSmartPointer<vtkPlane> plane = vtkSmartPointer<vtkPlane>::New();
>  plane->SetOrigin(-50.3,-84.5,-18.8);
>  plane->SetNormal(1,0,0);
> vtkSmartPointer<vtkCutter> cutter = vtkSmartPointer<vtkCutter>::New();
>  cutter->SetCutFunction(plane);
>  cutter->SetInput(reader->GetOutput());
>  cutter->Update();
>
> Thanks,
>
> Howard
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100225/999beac8/attachment.htm>


More information about the vtkusers mailing list