Zoom by rubber band window

Sebastien Barre barre at sic.sp2mi.univ-poitiers.fr
Fri Jan 7 10:03:16 EST 2000


<x-flowed>At 08:10 07/01/00 -0500, Ben Held wrote:

>Does anyone have an example of how to add a zoom by window to VTK.  I need
>the ability to zoom using a "rubber-band" window.  I can draw the window via
>Windows calls, I just need to know how to zoom to a given rectange in
>display coordinates.

Indeed zoom by window is implemented in VTK, but as a Tcl/Tk solution only 
: have a look at TkInteractor.tcl (shift + right button + drag zoom). It 
has improve quite a bit since 2.3 :) Bindings and features for 
vtkRenderWidget and vtkTkRenderWidget are (sadly) not related, because of 
the way Tk handle events I guess. Therefore the interactors are not the 
same (am right ?). The C++ version provides object mode 'o' and camera mode 
'p', as well as roll, dolly, and some other cool stuff. The Tcl 
imlementation of the interactor (TkInteractor) provides rubber-band zoom, 
picking but no object mode. It should be easy to convert it to C++. Indeed 
the rubber-band itself is implemented with VTK objects, and I guess that 
should be more convenient than Windows calls if you want it to be portable.

--
Sebastien BARRE
IRCOM-SIC, UMR-CNRS 6615 - Université de Poitiers
Bât. SP2MI, Bvd 3 - Téléport 2, BP 179 F-86960 Futuroscope Cedex
Tel. : +33 (0)5 49 49 65 95 / 65 83, Fax : +33 (0)5 49 49 65 70
http://www-sic.univ-poitiers.fr/  ubber-baé  ˜ H™ king but no object 



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------

</x-flowed>



More information about the vtkusers mailing list