[vtkusers] vtkSplineFilter not distributing points evenly...
Rakesh Patil
rakeshthp at in.com
Wed Feb 3 01:27:04 EST 2010
Thanks Bill, It worked. But the output what I get from vtkSplineFilter is a smooth curve. Can't I avoid this smoothness by any means..??Thanks Original message From:Bill Lorensen< bill.lorensen at gmail.com >Date: 02 Feb 10 18:40:16Subject:Re: [vtkusers] vtkSplineFilter not distributing points evenly...To: Rakesh Patil You should run the spline on the output of the stripper NOT the outputof the contour filter. Contour filter produces independent linesegments of length 2. The stripper connects the contour lines intomultiple point poly lines.On Tue, Feb 2, 2010 at 1:57 AM, Rakesh Patilwrote:> Hello,>> I construct a polyline from the output of contourfilter. After constructing> polyline, i found that, the points in this polyline are unevenly spaced> (unequally spaced).>> Thus i used vtkSplineFilter to distribute points evenly on this polyline.> But when i get the output from this filter, is like, at the junction point,> of> two lines, points are more closer than the specified leng
th, here is> the code what i wrote.>> // few lines of code, to construct unstructuredGrid> // which is passed to the contourfilter>> vtkContourFilter *contFilter = vtkContourFilter::New();> contFilter>SetInputConnection(del>GetOutputPort());> contFilter>GenerateValues(1, 8.5, 8.5);> contFilter>Update();>> vtkSplineFilter *sf = vtkSplineFilter::New();> sf>SetInputConnection(contFilter>GetOutputPort());> sf>SetSubdivideToLength();> sf>SetLength(50);>> vtkStripper *stp = vtkStripper::New();> stp>S etInputConnection( sf>GetOutputPort());> stp>Update();>> Later I extract a polyline from vtkStripper as shown in> example below:>> http://vtk.org/Wiki/VTK/Examples/ExtractPolyLinesFromPolyData#ExtractPolyLinesFromPolyData.cxx>> I do get the output as expected but with a> small variation. i.e. at the place where> two lines meet, the spacing is not same as> mentioned in the code.>> How do i overcome this problem..??>> Thanks in advance>>> > Powered by www.kitware.com>> Visit other Kitwa
re opensource projects at> http://www.kitware.com/opensource/opensource.html>> Please keep messages ontopic and check the VTK FAQ at:> http://www.vtk.org/Wiki/VTKFAQ>> Follow this link to subscribe/unsubscribe:> http://www.vtk.org/mailman/listinfo/vtkusers>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100203/ce7d9482/attachment.htm>
More information about the vtkusers
mailing list