[vtkusers] About vtkLocator and subclasses

sigmunau at idi.ntnu.no sigmunau at idi.ntnu.no
Wed Feb 16 06:00:16 EST 2005

I'm currently working with iterative closest point registration, and want to
investigate how different Locator methods affect the quality and performance
of the registration. Currently (as previously reported by me on this list)
the iterative closest point transform class uses a vtkCellLocator reguardless.

I have with some dirty hacks managed to make the transform use vtkKdTree,
and with the recent fixes the vtkKdTree edition performs somewhat faster,
but there seems to be no sane way to archive clean and nice polymorphism
with the way current vtkLocator inheritance hierarchy.

I propose to change it into something like this
	      /                |                     \
 vtkAbstractPointLocator  vtkAbstractCellLocator  vtkKdTree
AbstractPointLocator could be inherited by the current vtkPointLocator, and
a vtkKdTree-based pointlocator (from the code currently available when using

AbstractCellLocator could be inherited by the current vtkCellLocator and
vtkOBBTree (or vtkOBBTree could still inherit from vtkCellLocator if that
would be beneficial) and a KdTree based cell locator (I'm willing to try to
write such a class).

at last vtkKdTree could remain a standalone subclass of vtkLocator, doinging
all the other stuff vtkKdTree do right now.

Hopefully the new vtkLocator could get some methods that are common to all
the subclasses, such as FindClosestPoint which currently exist in various
ways in all three subclasses, but not in the superclass.


Sigmund Augdal
Sigmund Augdal
Edgar B. Schieldropsv 29-14
N-7033 Trondheim
tlf: 91809129

More information about the vtkusers mailing list