[vtk-developers] vtkPicker, vtkCellPicker, vtkPointPicker and vtkCompositePolyDataMapper

David Gobbi david.gobbi at gmail.com
Mon Dec 12 18:58:12 EST 2016


Hi Andreas,

I think that a remedial fix would be to add a check in
vtkPointPicker::IntersectWithLine() so that it returns VTK_DOUBLE_MAX if
"input" is NULL.  Likewise, the vtkCellPicker::IntersectXXWithLine()
methods can return VTK_DOUBLE_MAX if the mapper input is NULL.  This won't
make multi-block data pickable, but at least it stop the pickers from
crashing the program.

Then, after that remedial fix is done, the picker could be modified to
detect and pick multi-block data.

 - David


On Mon, Dec 12, 2016 at 4:50 AM, Andreas Buykx <A.Buykx at dianafea.com> wrote:

> Hi all,
>
>
>
> I have pipelines that process vtkMultiBlockDataSet and I want to map those
> using vtkCompositePolyDataMapper. This works fine, except that picking the
> rendered composite data set causes a crash. This is because vtkPicker,
> vtkCellPicker and vtkPointPicker assume that vtkMapper always maps a
> vtkDataSet which is not true in this case. Specifically vtkCellPicker::IntersectActorWithLine
> and vtkPointPicker::IntersectWithLine will crash, and since
> vtkPicker::DataSet may get set to 0, any callers fo vtkPicker::GetDataSet
> that expect a non-null data set will run into problems as well. AFAIK there
> is no picker implementation that works well with composite data sets, is
> there?
>
>
>
> This issue is a blocker for me to integrate vtkCompositePolyDataMapper, so
> I am going to fix this either by patching our own VTK build or contributing
> a change to VTK. To do this the right way (I prefer to contribute), I would
> like some advice/steer on how to fix this issue.
>
>
>
> A minimally invasive approach would be to add members to vtkPicker to
> store a vtkDataObject and a flat index of the picked dataset, and set those
> in case the mapper contains a composite dataset. The IntersectWithLine
> methods would have to be refactored to allow iterating over the blocks of a
> vtkDataObject.
>
>
>
> Kind regards,
>
> Andreas
>
>
>
>
>
>
>
> *DIANA FEA BV *
>
> *Software Developers and Analysis Consultants for Civil and Geotechnical
> Engineering *
>
>
>
> Delftechpark 19a, 2628XJ, Delft, The Netherlands
>
> Tel: +31 88 34262 15 (Direct) │ Tel: +31 88 34262 00 (Switchboard) │ Fax:
> +31 88 34262 99
>
> http://dianafea.com
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20161212/df2a3dcc/attachment.html>


More information about the vtk-developers mailing list