[vtkusers] Read data from a vtkCutter
Bill Lorensen
bill.lorensen at gmail.com
Thu Feb 25 08:15:50 EST 2010
This example accesses the lines after cutting and stripping:
http://vtk.org/Wiki/VTK/Examples/ExtractPolyLinesFromPolyData
On Thu, Feb 25, 2010 at 1: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
>
More information about the vtkusers
mailing list