[vtkusers] HighlightSelection example

David Doria daviddoria at gmail.com
Wed Dec 11 15:25:03 EST 2013

On Wed, Dec 11, 2013 at 10:57 AM, David Doria <daviddoria at gmail.com> wrote:

> On Wed, Dec 11, 2013 at 10:09 AM, tony zhang <tonyzhang0985 at gmail.com>wrote:
>> Thanks, David. It works after applying the change.
> Great. I reported this bug here: http://www.vtk.org/Bug/view.php?id=14457
> Also, as far as I can tell, this class does not seem to be exercised in
> any c++ Tests in VTK.
> David

OK, here is what is happening:

vtkExtractPolyDataGeometry copies ALL POINTS to the output (line 120 of
vtkExtractPolyDataGeometry.cxx: output->SetPoints(inPts);), then copies the
cells that were selected with the rubberband to the output. According to
the documentation ("extract cells that lie either entirely inside or
outside of a specified implicit function"), the idea of the class is to
extract selected cells, so glyphing the output points (what I was doing)
seems like the wrong thing to demonstrate. I changed the example to show
the extracted cells in red.

Apparently vtkExtractGeometry only passes through the points that are used
by the extracted cells, which is why glyphing the extracted points seemed
to produce a sensible output when vtkExtractGeometry was used. It seems
like these should be consistent, but I'd imagine they will not be to
maintain backwards compatibility.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131211/ecfdb7f8/attachment.htm>

More information about the vtkusers mailing list