赞
踩
参考:vtk图形图像开发进阶
- vtkSmartPointer<vtkPolyDataReader> reader =
- vtkSmartPointer<vtkPolyDataReader>::New();
- reader->SetFileName("fran_cut.vtk");
- reader->Update();
-
- vtkSmartPointer<vtkPolyData> points =
- vtkSmartPointer<vtkPolyData>::New();
- points->SetPoints(reader->GetOutput()->GetPoints());
-
- vtkSmartPointer<vtkSurfaceReconstructionFilter> surf =
- vtkSmartPointer<vtkSurfaceReconstructionFilter>::New();
- surf->SetInputData(points);
- surf->SetNeighborhoodSize(20);
- surf->SetSampleSpacing(0.005);
-
- vtkSmartPointer<vtkContourFilter> contour =
- vtkSmartPointer<vtkContourFilter>::New();
- contour->SetInputConnection(surf->GetOutputPort());
- contour->SetValue(0, 0.0);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。