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

Andreas Buykx A.Buykx at dianafea.com
Mon Dec 12 06:50:04 EST 2016


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<http://dianafea.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20161212/93c800e4/attachment.html>


More information about the vtk-developers mailing list