<p style="margin:0;padding:0;" align="left">Maybe it is due to the reduction factor, when the window is created. I think a reduction factor is applyed to the image to fit it into the window.<br />Someone know if is it true?<br />And if it is, someone know how can I get this factor?<br />Thanks<br /></p> <br /> <br /> <br /><br /><blockquote style="border-left: 2px solid #ff0000; padding-left: 5px; margin-left: 5px">&gt; Message du 28/04/08 15:13<br />&gt; De : &quot;Romuald BERTRAND&quot; <br />&gt; A : &quot;Cameron Burnett&quot; <br />&gt; Copie &agrave; : vtkusers@vtk.org<br />&gt; Objet : Re: [vtkusers] Strange factor with vtkPointPicker<br />&gt; <br />&gt; <p style="margin: 0pt; padding: 0pt" align="left">there is a sample of my code:<br /><br /><em>//picker = vtkPointPicker associated with vtkWindowInteractor<br />//clickCoords contains the coordinates of the click, return by vtkWindowInteractor<br />int result = picker-&gt;Pick(clickCoords[0], clickCoords[1], 0.0, renderer);<br /><br />if(result)<br />&nbsp;&nbsp;&nbsp; double *pos = picker-&gt;GetPickPosition();</em><br /><br />Example:<br />Image 512*512 px<br />When I click on the lower-right corner, I get approximately x=229 and y=229<br />Multiplicate with 2.235 x=512 and y=512<br />(I have found 2.235 by dichotomy, with a lot of tests)<br /><br />And When I click on the middle, I get approximately 115 for x and y<br />Multiplicate with the factor x=256 and y=256<br /><br />This strange factor doesn't change with zoom, but changes for each image I test.</p> <br />Thanks for answers.<br /> <br /> <br /><br /><blockquote style="border-left: 2px solid #ff0000; padding-left: 5px; margin-left: 5px">&gt; Message du 28/04/08 13:05<br />&gt; De : &quot;Cameron Burnett&quot; <br />&gt; A : &quot;Romuald BERTRAND&quot; <br />&gt; Copie &agrave; : vtkusers@vtk.org<br />&gt; Objet : RE: [vtkusers] Strange factor with vtkPointPicker<br />&gt; <br />&gt;   <style> .hmmessage P { margin:0px; padding:0px } body.hmmessage { FONT-SIZE: 10pt; FONT-FAMILY:Tahoma } </style> <p style="text-align: left">Maybe you could give an example of what you're getting at the moment, and what you're after.<br />&gt; <br />&gt; I had a problem in my project where I needed to select a point for my segmentation algorithm, however I actually needed the pixel index at that coordinate rather than the actual coordinate. In order to do this I had to use image-&gt;TransformPhysicalPointToIndex(point, index). Not sure if this will help or not in your case.<br />&gt; <br />&gt; Not sure if anyone could help that much with the amount of information you have given. Just send a bit more information and we can try and answer your question :).<br />&gt; <br />&gt; Regards,<br />&gt; Cameron. <br />&gt; </p><br />&gt; <br />&gt; <br />&gt; <blockquote><hr />From: beromuald@wanadoo.fr<br />&gt; To: vtkusers@vtk.org<br />&gt; Date: Mon, 28 Apr 2008 11:58:22 +0200<br />&gt; Subject: [vtkusers] Strange factor with vtkPointPicker<br />&gt; <br />&gt; <p style="padding: 0pt" align="left">Hi all,<br />&gt; <br />&gt; I have a problem with vtkPointPicker.<br />&gt; I use this class to pick the click coords on an image, but the coords wich are picked needs to be multiplicate by a strange factor to be reals.<br />&gt; Someone know why?<br />&gt; and someone know how I can get this strange factor?<br />&gt; Thanks a lot,<br />&gt; Bye<br />&gt; </p></blockquote><br /><hr /> before someone else does <a href="http://mycareer.com.au/?s_cid=596064" target="_new">Find the job of your dreams</a><br /></blockquote><br />&gt;<br />&gt; [ (pas de nom de fichier) (0.3 Ko) ]</blockquote>