Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
In article <1994Jun9.182922.21061@noao.edu>, eharold@corona.sunspot.noao.edu (Elliotte Harold) wrote: > I recently ran across what appears to be an undocumented built-in > procedure in IDL 3.5 called TVRDC. I can't find a reference to it anywhere, > but it seems to return the point in the IDL window which the user > clicked. It's syntax is > > tvrdc,x,y,/dev > > > After calling this x and y now contain the x and y coordinates where the > mouse was clicked. Here at NSO we found it useful for a program that > tracks Jupiter's moons between frames. In the picture of Jupiter taken > with the Vacuum Tower Telescope the moons are fairly small, pretty much > single pixel objects so to locate them we just move the mouse and click > on the moon. Has anyone else used this? More to the point is there some > reason it's undocumented? Or is it documented somewhere that I just haven't > been able to find? If you're wondering how I found out about it, I saw it > used in the TVRD userlib procedure. TVRDC certainly used to be documented (at least way back in the IDL < 2 days), but it may be (rank speculation here) that not every platform that now supports IDL also supports cursor readback. It's: TVRDC, x, y [, wait_for_mouse_button] where wait_for_mouse_button non-zero (default) means: wait 'til mouse is clicked to read back x and y. If wait_for_mouse_button is 0, it executes immediately. Keywords can be one of (at least): /device, /normalized, and /data. Anybody from RSI care to indicate why TVRDC is undocumented? Or are you all too busy preparing for the release of IDL 3.6? Or selling ENVI licenses? Joe Gurman -- Joseph B. Gurman / NASA Goddard Space Flight Center/ Solar Data Analysis Center / Code 682 / Greenbelt MD 20771 USA / gurman@uvsp.gsfc.nasa.gov | Federal employees are still prohibited from holding opinions while at | | work. Any opinions expressed herein must therefore be someone else's. |
> In article <1994Jun9.182922.21061@noao.edu>, > eharold@corona.sunspot.noao.edu (Elliotte Harold) wrote: > >> I recently ran across what appears to be an undocumented built-in >> procedure in IDL 3.5 called TVRDC. I can't find a reference to it anywhere, TVRDC is a synonym for the (documented) CURSOR command. Its origin goes back to 1980's Version 1 IDL when the typical image processing environment was a television display monitor controlled by a Tektronics or VT100 terminal. Version 1 IDL then had a CURSOR command for reading the cursor off of a plot on the Tektronics screen, and a TVRDC command to read the cursor on the television display. In a workstation environment each window can be used for image display or plotting, and the distinction between CURSOR and TVRDC became unnecessary. CURSOR was chosen as the command for newer versions of IDL, however TVRDC remained available as an undocumentd synonym. You will find that TVRDC works exactly as documented under CURSOR. --Wayne Landsman landsman@stars.gsfc.nasa.gov
gurman@uvsp.gsfc.nasa.gov (Joseph B. Gurman) writes: > In article <1994Jun9.182922.21061@noao.edu>, > eharold@corona.sunspot.noao.edu (Elliotte Harold) wrote: >> I recently ran across what appears to be an undocumented built-in >> procedure in IDL 3.5 called TVRDC. I can't find a reference to it anywhere, >> but it seems to return the point in the IDL window which the user >> clicked. It's syntax is >> >> tvrdc,x,y,/dev >> >> >> After calling this x and y now contain the x and y coordinates where the >> mouse was clicked. Here at NSO we found it useful for a program that >> tracks Jupiter's moons between frames. In the picture of Jupiter taken >> with the Vacuum Tower Telescope the moons are fairly small, pretty much >> single pixel objects so to locate them we just move the mouse and click >> on the moon. Has anyone else used this? More to the point is there some >> reason it's undocumented? Or is it documented somewhere that I just haven't >> been able to find? If you're wondering how I found out about it, I saw it >> used in the TVRD userlib procedure. > TVRDC certainly used to be documented (at least way back in the IDL < 2 > days), but it may be (rank speculation here) that not every platform that > now supports IDL also supports cursor readback. > It's: > TVRDC, x, y [, wait_for_mouse_button] > where wait_for_mouse_button non-zero (default) means: wait 'til mouse is > clicked to read back x and y. If wait_for_mouse_button is 0, it executes > immediately. > Keywords can be one of (at least): /device, /normalized, and /data. > Anybody from RSI care to indicate why TVRDC is undocumented? Or are you > all too busy preparing for the release of IDL 3.6? Or selling ENVI > licenses? I'll haphazard a guess that it's because CURSOR now does all the things that TVRDC used to do, including taking the optional WAIT parameter. CURSOR certainly is documented. Back in pre-version 2 days, one used TVRDC for device coordinates and CURSOR for data coordinates, but now CURSOR can work with both data and device coordinates, as well as normalized coordinates, by using it with the right keyword. I wouldn't be surprised if these days TVRDC is just a synonym for CURSOR. By the way, this is what I have for the possible values of the optional WAIT parameter: Value Corresponding Keyword Action ------------------------------------------------ 0 NOWAIT Return immediately 1 WAIT Return if button is down 2 CHANGE Return if a button is pressed, released, or the pointer is moved. 3 DOWN Return on button down 4 UP Return on button up With the default value being 1. Bill Thompson
Does not CURSOR provide a way to get mouse coordinates? It certainly works on IDL for VAX, RS/6000, and Windows. -- Chris Jacobsen, Asst. Prof., Department of Physics, SUNY at Stony Brook Phone (516) 632-8093, FAX -8101 Bitnet: cjacobsen@sbccmail jacobsen@xray1.physics.sunysb.edu Stony Brook ALL-IN_ONE: CJACOBSEN
In article 21061@noao.edu, eharold@corona.sunspot.noao.edu (Elliotte Harold) writes: > I recently ran across what appears to be an undocumented built-in > procedure in IDL 3.5 called TVRDC. I can't find a reference to it anywhere, > but it seems to return the point in the IDL window which the user > clicked. It's syntax is > > tvrdc,x,y,/dev > > > After calling this x and y now contain the x and y coordinates where the > mouse was clicked. Here at NSO we found it useful for a program that > tracks Jupiter's moons between frames. In the picture of Jupiter taken > with the Vacuum Tower Telescope the moons are fairly small, pretty much > single pixel objects so to locate them we just move the mouse and click > on the moon. Has anyone else used this? More to the point is there some > reason it's undocumented? Or is it documented somewhere that I just haven't > been able to find? If you're wondering how I found out about it, I saw it > used in the TVRD userlib procedure. > > -- > > Elliotte Rusty Harold National Solar Observatory > eharold@sunspot.noao.edu Sunspot NM 88349 It appears that tvrdc has similar functionality as cursor. When I first read your message it appeared that you could retrieve the *last* cursor position where the mouse was clicked, which would have great advantages over the current routines, that read the cursor postion *after* the routine is called. Tvrdc is a fossil from IDL version 1. The IDL users guide VS 2.1 (1991) describes the differences between cursor and tvrdc. Robert Velthuizen velt@rad.usf.edu