[vtkusers] Get contour boundary values from vtkCutter
Billy Okal
okal.billy at gmail.com
Wed Mar 6 18:21:06 EST 2013
Hi,
Thanks for the suggestion, I tried the method you linked and it works, but generate a lot more lines that than the generated contours, typically hundreds when I try to generate say 10 contour lines. Do you know why?
thanks
On Wednesday, March 6, 2013 at 3:29 AM, Bill Lorensen wrote:
> 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 (mailto: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 (http://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/20130307/a274a873/attachment.htm>
More information about the vtkusers
mailing list