[vtkusers] HighlightSelection example

tony zhang tonyzhang0985 at gmail.com
Wed Dec 11 10:09:12 EST 2013


Thanks, David. It works after applying the change.


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

> On Tue, Dec 10, 2013 at 6:04 PM, tony zhang <tonyzhang0985 at gmail.com>wrote:
>
>> Hi,
>>
>> I was playing the HighlightSelection example (available at
>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Picking/HighlightSelection).
>> After pressing "r" and using the HighlightInteractorStyle to do selection,
>> seems always all vertexes (50 cells and 50 points) were selected and
>> highlighted, no matter how I select an area. Is it the expected behavior or
>> possible bug in the example or vtk? I am using vtk 6.1. Any hint or help
>> will be greatly appreciated.
>>
>> Tony
>>
>
> I can confirm the behavior you're seeing, and I agree that it is
> incorrect. A quick fix:
>
> Change
>
>         vtkSmartPointer<vtkExtractPolyDataGeometry>
> extractPolyDataGeometry =
>           vtkSmartPointer<vtkExtractPolyDataGeometry>::New();
>
> to
>
>         vtkSmartPointer<vtkExtractGeometry> extractPolyDataGeometry =
>           vtkSmartPointer<vtkExtractGeometry>::New();
>
> and
>
> #include <vtkExtractPolyDataGeometry.h>
>
> to
>
> #include <vtkExtractGeometry.h>
>
> and it works as you'd expect. This seems to point to a bug in
> vtkExtractPolyDataGeometry, as I believe their calls are supposed to be the
> same. I'm not sure if I'll have a chance to dig into it.
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131211/7a21f05f/attachment.htm>


More information about the vtkusers mailing list