<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<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 tabindex="-1">
<div id="divRpF377792" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> David Gobbi [david.gobbi@gmail.com]<br>
<b>Sent:</b> Tuesday, December 13, 2016 12:58 AM<br>
<b>To:</b> Andreas Buykx<br>
<b>Cc:</b> vtk-developers@vtk.org<br>
<b>Subject:</b> Re: [vtk-developers] vtkPicker, vtkCellPicker, vtkPointPicker and vtkCompositePolyDataMapper<br>
</font><br>
</div>
<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::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.</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_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::<wbr>IntersectActorWithLine and vtkPointPicker::<wbr>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?<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"><u></u> <u></u></p>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">
http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">
http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
<br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>