[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: chosing points along an image row with mouse
Kim Nielsen wrote:
> I would like to know if there is a way to get the mouse to only move
> along a row (or column). I have an image and need to pick two points
> along the same row. Is there a way to get the mouse only to move along
> a row ?
why do you want to get the mouse to only to move along a row when what you *really* want
is to pick two points along the same row? :o)
After you have selected row(or column) "mode" in your program (widget button or function
keyword?), the first mouse button click can retrieve the image value at that position, as
well as save the current row(or column) image pixel value, say ysave(or xsave). The next
mouse click at (x,y) will then cause your program to read the image at position (x, ysave)
in row mode or (xsave, y) in column mode. A neato thing would be to turn on a
horizontal(or vertical) bar the width(or height) of your image after the first mouse click
that then moves vertically(or horizontally) as you move the mouse.
I think that this would work (or not :o) with the (gasp!) cursor command too but, despite
the code outlay, a widget approach would be cleaner (and easier too I reckon but YMMV).
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.