<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi, <br>
<br>
When you say, "on left click", do you mean you have created an instance
(a class) performing a special task on a left click or do you simply
paste the code like that ?<br>
<br>
regards,<br>
Florent.<br>
<br>
Naim wrote:
<blockquote cite="mid004201c71497$480df540$697ba8c0@newcomp" type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</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]-->
<div class="Section1">
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">I’m using this to
get the
coordinates (OnLeftClick):<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">vtkPointPicker
*pointpicker = (vtkPointPicker *)(iren->GetPicker());<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"> <o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font color="green" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: green;">//get
the mouse position<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font color="blue" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">int</span></font><font
face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"> * pos =
iren->GetEventPosition();<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">pointpicker->SetTolerance(0.001);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font color="green" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: green;">//start
the picking process<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font color="blue" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: blue;">if</span></font><font
face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"> (
pointpicker->Pick((<font color="blue"><span style="color: blue;">double</span></font>)pos[0],
(<font color="blue"><span style="color: blue;">double</span></font>)pos[1],
0.0,
m_prenderer) != 0)<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">{<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"> <font
color="green"><span style="color: green;">//get the list of picked
point<o:p></o:p></span></font></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"> vtkPoints*
thePointList = pointpicker->GetPickedPositions();<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"> <font
color="green"><span style="color: green;">//get the number of picked
points<o:p></o:p></span></font></span></font></p>
<p class="MsoNormal"><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"> <font
color="blue"><span style="color: blue;">int</span></font> nbrpoints =
thePointList->GetNumberOfPoints();<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">}</span></font><font
color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<div>
<p class="MsoNormal"><em><i><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">Naim Himrane</span></font></i></em><em><i><font
color="navy" face="Times New Roman" size="1"><span
style="font-size: 7.5pt; color: navy;"><o:p></o:p></span></font></i></em></p>
<p class="MsoNormal"><em><i><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">Electromagneticworks
Inc.<o:p></o:p></span></font></i></em></p>
<p class="MsoNormal"><font color="navy" face="Times New Roman"
size="3"><span style="font-size: 12pt; color: navy;"><o:p> </o:p></span></font></p>
</div>
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font
face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr tabindex="-1" align="center" size="2" width="100%"></span></font></div>
<p class="MsoNormal"><b><font face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font
face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma;">
<a class="moz-txt-link-abbreviated" href="mailto:vtkusers-bounces+naim=electromagneticworks.com@vtk.org">vtkusers-bounces+naim=electromagneticworks.com@vtk.org</a>
[<a class="moz-txt-link-freetext" href="mailto:vtkusers-bounces+naim=electromagneticworks.com@vtk.org">mailto:vtkusers-bounces+naim=electromagneticworks.com@vtk.org</a>] <b><span
style="font-weight: bold;">On Behalf Of </span></b><a class="moz-txt-link-abbreviated" href="mailto:cyros@tiscali.it">cyros@tiscali.it</a><br>
<b><span style="font-weight: bold;">Sent:</span></b> November 29,
2006 7:06 PM<br>
<b><span style="font-weight: bold;">To:</span></b> <a class="moz-txt-link-abbreviated" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
<b><span style="font-weight: bold;">Subject:</span></b> [vtkusers]
Coordinates of
the point clicked with the mouse </span></font><o:p></o:p></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"><o:p> </o:p></span></font></p>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"> <o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font face="Arial" size="4"><span
style="font-size: 13.5pt; font-family: Arial;">Which it is the
alternative way to
vtkRenderWindow.GetEventPosition () for having the coordinates of the
point
clicked with the mouse on the vtkRenderWindow?</span></font><font
face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"><o:p></o:p></span></font></p>
</div>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a>
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Type" content="text/html; ">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="824.41">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Helvetica}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; font: 10.0px Helvetica}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; font: 12.0px Helvetica; min-height: 14.0px}
span.s1 {font: 12.0px Helvetica}
span.Apple-tab-span {white-space:pre}
</style>
<p class="p1"><b><i>Florent Chandelier</i></b><span class="s1">, PhD
candidate</span></p>
<p class="p2"><span class="s1">Master's in Medical Imaging</span>
(Medicine Faculty, Paris, France),<span class="Apple-converted-space"> </span></p>
<p class="p2"><span class="s1">French Engineer</span> in Signal
treatment and theory (ESME SUDRIA, Paris, France)</p>
<p class="p3"><br>
</p>
<p class="p4">Local C1-4123 <span class="Apple-converted-space"> </span></p>
<p class="p3"><br>
</p>
<p class="p4">Département de génie mécanique</p>
<p class="p4">Université de Sherbrooke</p>
<p class="p4">2500, boul. Université</p>
<p class="p4">Sherbrooke, QC, J1K 2R1</p>
<p class="p4">CANADA</p>
<p class="p3"><br>
</p>
<p class="p4">Tel<span class="Apple-converted-space"> </span>: +1
(819) 821-8000 ext: 63160</p>
<p class="p4">Fax<span class="Apple-converted-space"> </span>: +1
(819) 821-7163</p>
<p class="p4">E-mail <span class="Apple-converted-space"> </span>: <b><i><a class="moz-txt-link-abbreviated" href="mailto:Florent.Chandelier@USherbrooke.ca">Florent.Chandelier@USherbrooke.ca</a></i></b></p>
<p class="p3"><br>
</p>
<table>
<tbody>
<tr>
<td>
<p class="p5"><span class="s1"><b>Avis :</b></span> Ce message
est confidentiel et est à l'usage exclusif de son destinataire.<span
class="Apple-converted-space"> </span>Il est strictement interdit à
toute autre personne de le diffuser, le distribuer ou le reproduire.<span
class="Apple-converted-space"> </span>Si le destinataire ne peut
être joint ou vous est inconnu, veuillez informer l'expéditeur par
courrier électronique immédiatement et effacer ce message et en
détruire toute copie. Les communications par Internet sont exposées au
risque d'altération des données, à d'autres erreurs de transmission et
à la perte de confidentialité. Si vous désirez que nous communiquions
avec vous par un autre moyen, veuillez nous en aviser.</p>
</td>
<td>
<p class="p5"><span class="s1"><b>Notice:</b> </span>This
message is confidential and is intended for the exclusive use of the
addressee.<span class="Apple-converted-space"> </span>Any other
person is strictly prohibited from disclosing, distributing or
reproducing it.<span class="Apple-converted-space"> </span>If the
addressee cannot be reached or is unknown to you, please inform the
sender by return e-mail immediately and delete this message and destroy
all copies. Internet communications are subject to the risk of data
corruption, other transmission errors and loss of confidentiality.
Please advise if you wish us to use a different method when
communicating with you.</p>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>