<div dir="ltr"><div>Hi, you can use vtkHandleWidget<br><br><a href="http://www.vtk.org/doc/nightly/html/classvtkHandleWidget.html#details">http://www.vtk.org/doc/nightly/html/classvtkHandleWidget.html#details</a><br><br></div>
below is a simple example in Tcl, the position is printed in standard output.<br><br>package require vtk<br>package require vtkinteraction<br><br># this proc will be invoked during widget interaction<br>proc OnInteraction { r } {<br>
  set pos [$r GetWorldPosition]<br>  puts &quot;pos = $pos&quot;<br>}<br><br>vtkTkRenderWidget .tkrw<br>::vtk::bind_tk_render_widget .tkrw<br><br>set renWin [.tkrw GetRenderWindow]<br><br>vtkRenderer ren<br>ren SetBackground 0.0 0.4 0.5<br>
<br>$renWin AddRenderer ren<br><br># create the widget representation<br>vtkFixedSizeHandleRepresentation3D rep<br>rep SetHandleSizeInPixels 10<br>[rep GetProperty] SetColor 1 0 0<br>rep SetWorldPosition 0 0 0<br><br># create the widget<br>
vtkHandleWidget widget<br>widget SetInteractor [$renWin GetInteractor]<br>widget SetDefaultRenderer ren<br>widget SetRepresentation rep<br># add the interaction observer<br>widget AddObserver InteractionEvent {OnInteraction rep}<br>
after idle {widget On}<br><br>pack .tkrw -fill both -expand yes<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/13 Podariu, Silviu <span dir="ltr">&lt;<a href="mailto:spodariu@unmc.edu" target="_blank">spodariu@unmc.edu</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma"><br>
Hello,<br>
<br>
Is there a way of adding a little component in space ( point, sphere, cube ), which can be moved interactively ( with the mouse/arrows/keys ) and whose location at any time can be displayed in the terminal ( or on the renderer window itself )?<br>

<br>
Thanks,<br>
Silviu<br>
<br>
<br>
</div>
<br>
The information in this e-mail may be privileged and confidential, intended only for the use of the addressee(s) above. Any unauthorized use or disclosure of this information is prohibited. If you have received this e-mail by mistake, please delete it and immediately
 contact the sender.
</div>

<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><br>
<br></blockquote></div><br></div>