[vtkusers] Read data from a vtkCutter

Hsiang-Chi Kuo hskuo at montefiore.org
Thu Feb 25 23:16:21 EST 2010


Hi Bill,

I have tested the example. It turned out:
-----------Lines without using vtkStripper
There are 0 lines in the polydata
-----------Lines using vtkStripper
There are 0 lines in the polydata

No line and no polydata output from the program. Can you advise what's
wrong?

Thanks,

Howard

>>> Bill Lorensen <bill.lorensen at gmail.com> 02/25/10 8:15 AM >>>
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