[vtkusers] Using an octree

Francois Bertel francois.bertel at kitware.com
Tue Feb 10 12:38:39 EST 2009


Probably pick one of the subclasses of vtkLocator then:

http://www.vtk.org/doc/nightly/html/classvtkLocator.html

Most of them have methods to query the points closest to a given
position and a radius. I didn't find anything for a line.

One of the subclasses of  vtkLocator (vtkKdTree) has a method
FindPointsInArea  that might be closer to what you are looking for.

http://www.vtk.org/doc/nightly/html/classvtkKdTree.html


On Tue, Feb 10, 2009 at 12:29 PM, David Doria <daviddoria at gmail.com> wrote:
> What I'm trying to do is find all the points in a dataset that are
> within some epsilon of a line. Is this a good data structure for this
> problem?
>
> Dave
>
> On Tue, Feb 10, 2009 at 12:27 PM, Francois Bertel
> <francois.bertel at kitware.com> wrote:
>> Also, if you are looking for an octree as a spatial search object,
>> don't use vtkHyperOctree, it's a dataset, use vtkCellLocator instead.
>>
>> On Tue, Feb 10, 2009 at 12:21 PM, David Thompson <dcthomp at sandia.gov> wrote:
>>> I should add that VTK provides the vtkHyperOctree class (see
>>> http://www.vtk.org/doc/nightly/html/classvtkHyperOctree.html ) which
>>> provides a similar type of storage. The difference is that the octree
>>> templates in the Utilities directory allow an arbitrary structure to be
>>> stored at every node instead of the usual scalar/vector data.
>>>
>>>        David
>>>
>>>>  No technical reason. (But as a best-practice convention, it's good
>>>> not to depend on the API of a VTK Utilities library remaining constant
>>>> from release to release. These classes are typically used exclusively
>>>> within VTK *.cxx files and not included by any VTK header files.)
>>>>
>>>>
>>>> In the VTK source tree, the only files that presently include
>>>> <octree/octree> (note: there is no .h at the end)
>>>> are Rendering/vtkLabelHierarchy.cxx
>>>> and Rendering/vtkLabelHierarchyPrivate.h. If a file is include only by
>>>> a VTK .cxx file or a header file clearly labelled "private" then it's
>>>> probably best not to rely on it from release to release.
>>>>
>>>>
>>>>
>>>> Perhaps you should just remove the ".h" and try again....
>>>>
>>>>
>>>>
>>>>
>>>> HTH,
>>>> David
>>>>
>>>>
>>>> On Tue, Feb 10, 2009 at 10:36 AM, David Doria <daviddoria at gmail.com>
>>>> wrote:
>>>>         If I include
>>>>         #include <octree/octree.h>
>>>>
>>>>         I get a whole bunch of these errors.
>>>>
>>>>         /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9:
>>>>         error:
>>>>         expected type-specifier before 'vtkstd'
>>>>         /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:9:
>>>>         error:
>>>>         expected '>' before 'vtkstd'
>>>>         /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23:
>>>>         error:
>>>>         ISO C++ forbids declaration of 'octree_node' with no type
>>>>         /home/doriad/src/ParaView3/VTK/Utilities/octree/octree.h:23:
>>>>         error:
>>>>         expected ';' before '<' token
>>>>
>>>>         Any reason why I can't use the octree class?
>>>>
>>>>         --
>>>>         Thanks,
>>>>
>>>>         David
>>>>         _______________________________________________
>>>>         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
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>>
>>
>> --
>> François Bertel, PhD  | Kitware Inc. Suite 204
>> 1 (518) 371 3971 x113 | 28 Corporate Drive
>>                      | Clifton Park NY 12065, USA
>> _______________________________________________
>> 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
>>
>
>
>
> --
> Thanks,
>
> David
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtkusers mailing list