[vtkusers] Read data from a vtkCutter
Hsiang-Chi Kuo
hskuo at montefiore.org
Thu Feb 25 01:15:18 EST 2010
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
More information about the vtkusers
mailing list