[vtkusers] Get contour boundary values from vtkCutter

Bill Lorensen bill.lorensen at gmail.com
Tue Mar 5 21:29:57 EST 2013


see if this helps:

http://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ExtractPolyLinesFromPolyData


On Tue, Mar 5, 2013 at 11:51 AM, Billy Okal <okal.billy at gmail.com> wrote:

>  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
>
>
> _______________________________________________
> 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
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130305/5b6bde18/attachment.htm>


More information about the vtkusers mailing list