PLOTS routine.... [message #3361] |
Fri, 20 January 1995 11:01  |
ratnakar amaravadi
Messages: 14 Registered: April 1994
|
Junior Member |
|
|
What algorithm does the PLOTS routine use to compute
pixel coords between (x1,y1) and (x2,y2) when the command
PLOTS, [x1,x2],[y1,y2],/dev is executed.
I would like to know the exact pixel coords between (x1,y1) and
(x2,y2). After plotting the line, when I move the mouse, I get a
new value for (x2,y2). So when I draw the new line, I want to
erase the old line, and restore the underlying image. I can do this
by
PLOTS, XX(i),YY(i),color=image(xx(i),yy(i)),/dev
where image is the underlying image, and xx, yy are arrays
which contain the pixel coords between (x1,y1) and (x2,y2).
Thanks for your help.
Ratnakar Amaravadi Software/Hardware Engineer
Department of Radiology I.U. School of Medicine
(317)274-1843 (w) amaravad@indiana.edu
(317)274-4074 (fax) ratty@foyt.indyrad.iupui.edu
(317)632-5144 (res) http://www.indyrad.iupui.edu/~ratty/ratty.html
|
|
|
Re: PLOTS routine.... [message #3445 is a reply to message #3361] |
Mon, 23 January 1995 13:00  |
Serdar Manizade
Messages: 15 Registered: December 1994
|
Junior Member |
|
|
ratnakar amaravadi <amaravad@silver.ucs.indiana.edu> wrote:
>
> What algorithm does the PLOTS routine use to compute
> pixel coords between (x1,y1) and (x2,y2) when the command
>
> PLOTS, [x1,x2],[y1,y2],/dev is executed.
>
> I would like to know the exact pixel coords between (x1,y1) and
> (x2,y2). After plotting the line, when I move the mouse, I get a
> new value for (x2,y2). So when I draw the new line, I want to
> erase the old line, and restore the underlying image. I can do this
..
If you are using an appropriate window manager, you might consider
another approach: use the SET_GRAPHICS_FUNCTION keyword to the
DEVICE command. Details are in the IDL Reference Guide, chapt.3.
Then you can plot the line, then unplot it by changing the graphics
function and repeating the same plots command.
|
|
|