Ok, I figured out that the GetMapperPosition() was the answer to my question. However, I have another problem now...<br><br>I included the following code in my left mouse button handler and it causes a segmentation fault!!!
<br><br>vtkRenderWindowInteractor *rwi = this-&gt;Interactor;<br>&nbsp;if (rwi)<br>&nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkPointPicker *picker = (vtkPointPicker *)rwi-&gt;GetPicker();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; picker-&gt;Pick(x, y, m_viewer-&gt;GetCurrentSlice(), this-&gt;CurrentRenderer);
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; std::cout &lt;&lt; &quot;PointId: &quot; &lt;&lt; picker-&gt;GetPointId() &lt;&lt; &quot;\n&quot;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; std::cout.flush();<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (picker-&gt;GetPointId() != -1)
<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; double * ptActual, *ptMapped;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; picker-&gt;GetSelectionPoint(ptActual); // OK<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; picker-&gt;GetMapperPosition(ptMapped); // CRASHES!!!!!
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; std::cout.flush();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;}<br><br>This is a bit crazy... I guess the mapper is not set. So, I thought I would explicitly add a picker in my vtkImageViewer type class and I have the following code where I set my interactor...
<br><br>// rwi is the render window interactor<br><br>if (!this-&gt;m_interactor)<br>&nbsp;{<br>&nbsp; &nbsp;&nbsp;&nbsp; this-&gt;m_interactor = rwi;<br>&nbsp; &nbsp;&nbsp;&nbsp; rwi-&gt;Register(this);<br>&nbsp;}<br><br>vtkPointPicker * picker = vtkPointPicker::New();<br>
picker-&gt;SetTolerance(0.005);<br>picker-&gt;AddPickList(m_actor2D);<br>picker-&gt;PickFromListOn();<br>rwi-&gt;SetPicker(picker);<br>picker-&gt;Delete();<br><br>However, now it picks nothing. The PointID is always -1. Please if someone can help me solve this problem, I would be really grateful!
<br><br>Thanks,<br>Anja<br><br><div><span class="gmail_quote">On 31/08/06, <b class="gmail_sendername">Anja Ende</b> &lt;<a href="mailto:anja.ende@googlemail.com">anja.ende@googlemail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi everyone,<br><br>I have a reslicer interface where I click on a 2D image and it reslices the volume at that point and returns me the slice.<br><br>Now, I could have the image zoomed and I want to pick the point in the original image regardless of the zoom factor. Of course, I can probably do that by taking the current zoom factor into account but there might be round off errors, so I was wondering if there is a better way.
<br><br>I can get the points bu using vtkPointPicker class and that seems to work. However, I do not know what to do with those values as the reslicer will not accept those values.<br><br>So, I was wondering if there was a way to pick points on the rendered 2D image (regardless of its zoom factor) that actually refers to the points in the original image size.
<br><br>Cheers and thanks,<br><br>Anja<br><br>Shamesless plug: <br>----------------------<br>I actually have another open question. I still have not figured out the correct strategy for setting the output setting. So, if someone would be kind enough to help me with that
<br><br><a href="http://public.kitware.com/pipermail/vtkusers/2006-August/086765.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://public.kitware.com/pipermail/vtkusers/2006-August/086765.html
</a><br>

</div></blockquote></div><br>