<div dir="ltr">I imagine you're running vtkMarchingCubes or ContourFilter to create the mesh?<div><br></div><div>you could then use vtkPoints to get all points from your filter output</div><div><br></div><div>Then something like this:</div>
<div><br></div><div>(This is in C# though)</div><div> vtkPoints mypoints = new vtkPoints();<br></div><div> mypoints= myfilter.GetOutput().GetPoints(); //Where myfilter could be the output of the marchingcubes algorithm or other filter you apply afterwards</div>
<div><br></div><div><div> for (int i = 0; i < mypoints.GetNumberOfPoints(); i++)<br></div><div> {</div><div> double[] p = new double[3];</div><div> p = mypoints.GetPoint(i);</div>
<div> }<br></div></div><div>In each iteration you would obtain every single point in the mesh, then you can easily add that to a list..</div><div><br></div><div>hope it makes some sense.</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Apr 7, 2014 at 1:58 PM, Voisin <span dir="ltr"><<a href="mailto:adrien.voisin.be@gmail.com" target="_blank">adrien.voisin.be@gmail.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="FR-BE" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Matias,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I use vtk in Qt thanks to the QVTKWidget. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I want to rightclick on my vtk window and display (on a Qt
tooltip) if I click or not on the 3D image.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">For now, when I click anywhere, the tooltip appear with a
testing message. But I want to check (I don't know where) if<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">the coordinate of the vtk event click (x,y) correspond to points
of my mesh or not <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The idea is to proceed an action when clicking on the mesh but
not if we click on an empty part of the vtk window. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I hope it's clearer now<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Adrien<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="FR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">De :</span></b><span lang="FR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Matias
Montroull [mailto:<a href="mailto:matimontg@gmail.com" target="_blank">matimontg@gmail.com</a>] <br>
<b>Envoyé :</b> lundi 7 avril 2014 13:49<br>
<b>À :</b> AdrienV<br>
<b>Cc :</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Objet :</b> Re: [vtkusers] Coordinates related to a volume<u></u><u></u></span></p>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi Adrien,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">What are you trying to achieve? can you provide more
information?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Apr 7, 2014 at 10:33 AM, AdrienV <<a href="mailto:adrien.voisin.be@gmail.com" target="_blank">adrien.voisin.be@gmail.com</a>>
wrote:<u></u><u></u></p>
<p class="MsoNormal">Hi,<br>
<br>
I develop a basic application for medical data visualization.<br>
<br>
I want to know if it's possible to get all coordinates (axis or world<br>
coordinates) of a volume in a list (for example).<br>
<br>
In fact, when I click on my vtk window, a slot function return the cursor<br>
position (x,y). I want to put these information in a kind of lookup table,<br>
which return true if there is a volume in this position or false otherwise.<br>
<br>
For example : bool isVolumeAt(int x,int y)<br>
<br>
Thanks for your help,<br>
<br>
Adrien<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Coordinates-related-to-a-volume-tp5726665.html" target="_blank">http://vtk.1045678.n5.nabble.com/Coordinates-related-to-a-volume-tp5726665.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
<br><br>
<hr style="border:none;color:#909090;background-color:#b0b0b0;min-height:1px;width:99%">
<table style="border-collapse:collapse;border:none">
<tbody><tr>
<td style="border:none;padding:0px 15px 0px 8px">
<a href="http://www.avast.com/" target="_blank">
<img border="0" src="http://static.avast.com/emails/avast-mail-stamp.png">
</a>
</td>
<td>
<p style="color:#3d4d5a;font-family:"Calibri","Verdana","Arial","Helvetica";font-size:12pt">
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection <a href="http://www.avast.com/" target="_blank">Antivirus avast!</a> est active.
</p>
</td>
</tr>
</tbody></table>
<br>
</div>
</blockquote></div><br></div>