[vtkusers] distances in TubeFilter
Cory Quammen
cory.quammen at kitware.com
Wed Jun 7 13:42:53 EDT 2017
CC'ing back to the list
I see. I did not understand that you have a set of points that is
different from the points defining the tube obtained from the
TubeFilter.
Now that I understand the problem, I would skip
vtkSelectEnclosedPoints and just check the distance from the polyline
to each point computed with the cell locator. Ignore the points if
they are < 3 or > 5 units of distance away, and do your scoring for
the other points as you have described.
HTH,
Cory
On Wed, May 31, 2017 at 9:55 AM, Raphael Jakob <rjakob22 at googlemail.com> wrote:
> Hey Cory,
>
> Maybe im wrong and there is a better solution. But i created a TubeFilter
> with radius 5 for example. And i want to score the inner points. All points
> within the radius 3 to the polyline should be ignored, so that i have a
> hollow tube. All points in radius 4 should get a score of 1 and all points
> within the radius 5 should get the score 2 for example. To create the points
> in the tube i have to use selectEnclosedPoints, arent I?, beacuse the Tube
> FIlter gives only the surface of the Tube ? Now I would have the points of
> the Tube and can use your solution with AbstractPoint Locator. Or is their a
> much better apprach for my goal?
>
> Best regards!
>
> 2017-05-31 15:27 GMT+02:00 Cory Quammen <cory.quammen at kitware.com>:
>>
>> I'm confused - why isn't the distance from the inner polyline the same
>> as the tube filter radius (to within discretization error)?
>>
>> I don't think vtkDistancePolyDataFilter or vtkImplicitPolyDataDistance
>> will do that in the direction you want. Each require that the object
>> from which the distances are computed be triangle meshes, and your
>> polyline is not a triangle mesh.
>>
>> Instead, you could use one of the point locators (subclass of
>> vtkAbstractPointLocator [1]) and set its input to the polyline. Then
>> iterate over the points of the tube and compute the distance manually
>> using the locator. Note that the closest point on the polyline may
>> fall in the interior of one of the line segments, in which case you
>> might be able to use vtkCellLocator.
>>
>> HTH,
>> Cory
>>
>> [1] http://www.vtk.org/doc/nightly/html/classvtkAbstractPointLocator.html
>> [2] http://www.vtk.org/doc/nightly/html/classvtkCellLocator.html
>>
>> On Wed, May 31, 2017 at 8:04 AM, Raphael Jakob via vtkusers
>> <vtkusers at vtk.org> wrote:
>> > Is it possible to calculate all distances of all points in a TubeFilter
>> > Object to the inner polyLine with implicitPolyDataDistance or
>> > vtkDistancePolyDataFilter or another fast vtk method? I want to score
>> > all
>> > points in the tube in dependence of their distance to the line, which
>> > created the Tube.
>> >
>> > Best regards
>> >
>> > _______________________________________________
>> > 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
>> >
>> > Search the list archives at: http://markmail.org/search/?q=vtkusers
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://public.kitware.com/mailman/listinfo/vtkusers
>> >
>>
>>
>>
>> --
>> Cory Quammen
>> Staff R&D Engineer
>> Kitware, Inc.
>
>
--
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
More information about the vtkusers
mailing list