<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:#1F497D;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:DE;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Arial","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1550413652;
        mso-list-type:hybrid;
        mso-list-template-ids:-1934870802 507652780 67567641 67567643 67567631 67567641 67567643 67567631 67567641 67567643;}
@list l0:level1
        {mso-level-text:"%1\.\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'>Thank you both for your answers!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'>FindPoint works perfect with vtkPolyData, but now I think I can&#8217;t use vtkPolyData. Instead I probably have to use vtkImageData. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'>My VTK pipeline looks like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><span style='mso-list:Ignore'>1.)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'>Create vtkImageData with all points<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><span style='mso-list:Ignore'>2.)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'>Use vtkMarchingSquares filter to get vtkPolyData representing some iso lines<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><span style='mso-list:Ignore'>3.)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'>Some unimportant clipping stuff&#8230;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'>If I use the vtkPolyData object from vtkMarchingSquares I get values which make sense. But it seems like marching squares removes all points where no iso lines are drawn. I only find ids of points which are on the iso lines. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'>So my idea was to use vtkImageData. But not even the simpliest example works with vtkImageData and FindPoint:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='background:white'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas;color:blue'>double</span><span lang=EN-US style='font-size:10.0pt;font-family:Consolas;color:black'>[]&nbsp;pos&nbsp;=&nbsp;imageData.GetPoint(200);<o:p></o:p></span></p><pre style='background:white'><span lang=EN-US style='font-family:Consolas;color:green'>//&nbsp;pos&nbsp;contains&nbsp;18.0,&nbsp;-29.0,&nbsp;0.0 which seems to be correct</span><span lang=EN-US style='font-family:Consolas;color:black'><o:p></o:p></span></pre><p class=MsoNormal style='background:white'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span lang=EN-US style='font-size:10.0pt;font-family:Consolas;color:black'>&nbsp;id&nbsp;=&nbsp;imageData.FindPoint(pos[0],&nbsp;pos[1],&nbsp;pos[2]);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'>I would expect &#8216;id&#8217; to have the value 200. But it always has the value -1. The documentation says that a return value &lt; 0 means that the point can&#8217;t be found (maybe it&#8217;s outside of the vtkImageData object). Could somebody please tell me why FindPoint always returns -1?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'>Thank you,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'>Lukas<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Gonzalo Amadio [mailto:gonzaloamadio@gmail.com] <br><b>Sent:</b> Dienstag, 21. August 2012 15:48<br><b>To:</b> Kevin H. Hobbs<br><b>Cc:</b> Boehm, Lukas; vtkusers@vtk.org<br><b>Subject:</b> Re: [vtkusers] Find point by coordiante<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>I think this will work!..<br><br><a href="http://www.vtk.org/doc/release/5.6/html/a00430.html#fb20db494bf2e8c0aff4ff2fcf7d6a22">http://www.vtk.org/doc/release/5.6/html/a00430.html#fb20db494bf2e8c0aff4ff2fcf7d6a22</a><br><br>The doc says &quot;find the closes point to the coordinates provided as arguiment&quot;<o:p></o:p></p><div><p class=MsoNormal>2012/8/21 Kevin H. Hobbs &lt;<a href="mailto:hobbsk@ohio.edu" target="_blank">hobbsk@ohio.edu</a>&gt;<o:p></o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'>On 08/21/2012 09:18 AM, Boehm, Lukas wrote:<br>&gt; Hello,<br>&gt;<br>&gt;<br>&gt;<br>&gt; I&#8217;ve got a short question. I have a vtkPoints object and a coordinate<br>&gt; (x,y,z). Is there a way to get the id of the closest point to this<br>&gt; coordinate? I didn&#8217;t find anything.<br>&gt;<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>You need a point locator.<br><br><a href="http://www.vtk.org/doc/nightly/html/classvtkPointLocator.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkPointLocator.html</a><br><br><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><o:p></o:p></p></div><p class=MsoNormal><br><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>-- <br>--------<br>Gonzalo Amadio<o:p></o:p></p></div></body></html>