[vtkusers] Get contour boundary values from vtkCutter

Billy Okal okal.billy at gmail.com
Tue Mar 5 11:51:40 EST 2013


Hi All, 

I am new to VTK and I am trying to get the values of a mesh at a given contour/isosurface.

I am getting the contours using the following

vtkSmartPointer<vtkCutter> cutter = vtkSmartPointer<vtkCutter>::New();
    cutter->SetCutFunction(plane);
    cutter->SetGenerateCutScalars(1);
#if VTK_MAJOR_VERSION <= 5
    cutter->SetInput(inputPolyData);
#else
    cutter->SetInputData(inputPolyData);
#endif
    cutter->GenerateValues(20, -distanceMin, distanceMax);
    vtkSmartPointer<vtkPolyDataMapper> cutterMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
    cutterMapper->SetInputConnection( cutter->GetOutputPort());
    cutterMapper->ScalarVisibilityOff();



But now I want to store the (x,y,z) positions of the mesh surface along each contour to an array of points. How can I do this? Is there any implemented utility to do this?

thanks,


billy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130305/0e9d5d69/attachment.htm>


More information about the vtkusers mailing list