comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Moving an ROI
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Moving an ROI [message #28408 is a reply to message #28325] Wed, 05 December 2001 08:55 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
Nobody replied. I guess a routine is not there. But it seems simple to
write one. Once you have a ROI, all it is is just a polygon. With motion
events on, just add delta X and Y to its Data property and redraw the view.
Edges need a special thought, seems to me. First, have you decided how
do *you* want them treated? If you trim the ROI, you need to redefine
Data because IDLgrPolygon has no *Range properties. I did this by
keeping the original ROI data in Uvalue, then trimming Data as Data =
[[X_min < Data[0,*] < X_max], [Y_min < Data[1,*] < Y_max], [Data[2,*]],
then redrawing.
If you want to expand the plot range as ROI gets dragged past the edge,
you need to rescale the plot and change axes limits. Although I
anticipate somewhat jerky screen updates with large plots, it also seems simple.
For data processing, just reuse the data from Uvalue (the original ROI).

Pavel

Andre Kyme wrote:
>
> Hi everybody,
>
> Anyone know of a routine to move an ROI around in a draw widget? I've
> collected the ROI coordinates and now want to adjust its position. Wrote
> a bit of code that's kind of working but is very dodgy when the ROI gets
> to edges. Thanks for the help,
>
> Andre Kyme
>
> Dept Medical Physics
> Westmead Hospital
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL data to Excel sheets?
Next Topic: silly sav files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 20:01:46 PDT 2025

Total time taken to generate the page: 0.25435 seconds