[vtk-developers] Permission to replace vtkCellLocator with an improved version

David Gobbi david.gobbi at gmail.com
Tue Jan 19 17:10:27 EST 2010


Just a quick follow-up for Kitware or other folks who want to review
this class before it becomes the new CellPicker.  Here are the tests
and examples that can be found in VTK cvs, they currently provide 93%
coverage of the new code:

Rendering/Testing/Tcl/PickerWithLocator.tcl
Rendering/Testing/Tcl/SurfacePickerWithTexture.tcl
VolumeRendering/Testing/Tcl/VolumePickerCrop.tcl
VolumeRendering/Testing/Tcl/VolumePicker.tcl
VolumeRendering/Testing/Python/VolumePicker.py
VTK/Examples/VolumeRendering/Python/VolumePicker.py

The final example uses the picker to make a cursor follow the skin
surface of a volume rendering.  Ten years ago I did exactly the same
thing by using a Python algorithm to find the volume isosurface (and
it was pretty fast, too!), but I think that it's nice to have this
feature built in to VTK.

  David


On Tue, Jan 19, 2010 at 1:34 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> If I get permission to do the replacement, you have my word that I
> will make sure that all tests pass before I commit the code, and that
> I will swiftly respond to any concerns from Kitware or from any third
> parties.
>
>   David
>
>
> On Tue, Jan 19, 2010 at 1:18 PM, Will Schroeder
> <will.schroeder at kitware.com> wrote:
>> To ask an obvious question, when the replacement is made, do all the tests
>> pass? Particularly the widget tests?
>>
>>
>> On Tue, Jan 19, 2010 at 1:47 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>>
>>> Yes, that's pretty much it.  I mean to rename vtkSurfacePicker to
>>> vtkCellPicker, overwriting the existing vtkCellPicker and replacing
>>> it.
>>>
>>>   David
>>>
>>>
>>> On Tue, Jan 19, 2010 at 11:04 AM, Will Schroeder
>>> <will.schroeder at kitware.com> wrote:
>>> > David, just to make sure, please elaborate on "replace vtkCellPicker
>>> > with
>>> > vtkSurfacePicker". I think you mean you'll replace the guts of
>>> > vtkCellPicker
>>> > with your vtkSurfacePicker functionality... is this correct?
>>> >
>>> > On Tue, Jan 19, 2010 at 12:21 PM, David Gobbi <david.gobbi at gmail.com>
>>> > wrote:
>>> >>
>>> >> HI All,
>>> >>
>>> >> Around seven weeks ago I added a new class to VTK called
>>> >> vtkVolumePicker  (http://www.vtk.org/Wiki/VTK/Volume_Picking) that
>>> >> improved volume picking.  This class also included several
>>> >> improvements for polydata picking that I needed for my applications,
>>> >> including the ability to use a vtkCellLocator to speed up the pick.
>>> >>
>>> >> Soon after adding this class to VTK, I split off a subclass called
>>> >> vtkSurfacePicker
>>> >> (http://www.vtk.org/doc/nightly/html/classvtkSurfacePicker.html) that
>>> >> has 95% of the functionality of vtkVolumePicker, but doesn't depend on
>>> >> the VolumeRendering kit.  This vtkSurfacePicker is, essentially, an
>>> >> improved vtkCellPicker.  Compared to vtkCellPicker, here is a summary
>>> >> of the most important improvements:
>>> >>
>>> >> - the ability to add a vtkCellLocator to accelerate the picking of
>>> >> large data sets (it's rather shocking that vtkCellPicker cannot do
>>> >> this)
>>> >>
>>> >> - much faster algorithms for picking volumes and images.. the
>>> >> vtkCellPicker does a tedious search through all the cells in the
>>> >> vtkImageData, but this new picker simply intersects the view ray with
>>> >> the image data
>>> >>
>>> >> - specifying an "opacity isovalue" value for more useful volume
>>> >> picking, i.e. it doesn't pick transparent regions, instead it picks
>>> >> the visible volume surface
>>> >>
>>> >> - several methods for getting more information about what was picked,
>>> >> including IJK coords for images, volumes, and textures
>>> >>
>>> >> - it acknowledges the existence of mapper clipping planes... the
>>> >> vtkCellPicker ignores clipping planes so it will pick regions that
>>> >> have been clipped away
>>> >>
>>> >> I would like to replace the vtkCellPicker with this new
>>> >> vtkSurfacePicker class.  Since it provides a superset of vtkCellPicker
>>> >> functionality and improved performance, the change should be
>>> >> transparent to all users.  The only problem might be conflicts between
>>> >> the new methods and third-party subclasses of vtkCellPicker.
>>> >>
>>> >> Any thoughts?  Should I have sent this email to the ARB list instead?
>>> >>
>>> >>   David
>>> >> _______________________________________________
>>> >> Powered by www.kitware.com
>>> >>
>>> >> Visit other Kitware open-source projects at
>>> >> http://www.kitware.com/opensource/opensource.html
>>> >>
>>> >> Follow this link to subscribe/unsubscribe:
>>> >> http://www.vtk.org/mailman/listinfo/vtk-developers
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > William J. Schroeder, PhD
>>> > Kitware, Inc.
>>> > 28 Corporate Drive
>>> > Clifton Park, NY 12065
>>> > will.schroeder at kitware.com
>>> > http://www.kitware.com
>>> > (518) 881-4902
>>> >
>>
>>
>>
>> --
>> William J. Schroeder, PhD
>> Kitware, Inc.
>> 28 Corporate Drive
>> Clifton Park, NY 12065
>> will.schroeder at kitware.com
>> http://www.kitware.com
>> (518) 881-4902
>>
>



More information about the vtk-developers mailing list