<div dir="ltr"><div>Well, I don't use composite data in any of my own software and I'm not familiar with the use cases, so I don't have the answer.  Hopefully someone else can chime in.</div><div><br></div><div>Regards,</div><div> - David</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 13, 2016 at 1:39 PM, Andreas Buykx <span dir="ltr"><<a href="mailto:A.Buykx@dianafea.com" target="_blank">A.Buykx@dianafea.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">What would be a good way to extend the pickers for picking composite data? Is it sufficient for all use cases of composite data set picking to store the vtkDataObject and flat index
 of a picked composite data set, and set the vtkDataSet to zero? That ought to be pretty easy to implement and it would be sufficient I think for our use. Are there other approaches that should be considered?
<div><br>
</div>
<div>Any thoughts?</div>
<div><br>
</div>
<div>Kind regards,</div>
<div>Andreas<br>
<div><br>
</div>
<div><br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div id="m_6367621108829493973divRpF377792" style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> David Gobbi [<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>]<br>
<b>Sent:</b> Tuesday, December 13, 2016 12:58 AM<br>
<b>To:</b> Andreas Buykx<br>
<b>Cc:</b> <a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a><br>
<b>Subject:</b> Re: [vtk-developers] vtkPicker, vtkCellPicker, vtkPointPicker and vtkCompositePolyDataMapper<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">Hi Andreas,
<div><br>
</div>
<div>I think that a remedial fix would be to add a check in vtkPointPicker::<wbr>IntersectWithLine() so that it returns VTK_DOUBLE_MAX if "input" is NULL.  Likewise, the vtkCellPicker::<wbr>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.</div>
<div><br>
</div>
<div>Then, after that remedial fix is done, the picker could be modified to detect and pick multi-block data.</div>
<div><br>
</div>
<div> - David</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Dec 12, 2016 at 4:50 AM, Andreas Buykx <span dir="ltr">
<<a href="mailto:A.Buykx@dianafea.com" target="_blank">A.Buykx@dianafea.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="NL">
<div class="m_6367621108829493973m_7767505981683211372WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi all,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">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::IntersectActorW<wbr>ithLine and vtkPointPicker::IntersectWithL<wbr>ine 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?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">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. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">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.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Andreas<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#c00000">DIANA FEA BV
<u></u><u></u></span></b></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif"">Software Developers and Analysis Consultants for Civil and Geotechnical Engineering
<u></u><u></u></span></i></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif"">Delftechpark 19a, 2628XJ, Delft, The Netherlands<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif"">Tel: +31 88 34262 15 (Direct) │ Tel: +31 88 34262 00 (Switchboard) │ Fax: +31 88 34262 99<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif""><a href="http://dianafea.com/" target="_blank"><span style="color:blue">http://dianafea.com</span></a>
<u></u><u></u></span></p>
<p class="MsoNormal"><br><u></u></p></div></div></blockquote></div></div></div></div></div></div></div></div></div></div></blockquote></div></div></div>