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

Home » Public Forums » archive » xroi with regions_in problem
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: xroi with regions_in problem [message #94853 is a reply to message #94851] Tue, 07 November 2017 07:03 Go to previous messageGo to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den tisdag 7 november 2017 kl. 14:28:18 UTC+1 skrev Mats Löfdahl:
> Hi,
>
> I'm trying to use the regions_in keyword with xroi but it seems I can't make it work.
>
> The purpose is to have a pre-defined region of interest, that the user can move or size scale in the GUI.
>
> This call, without regions_in, works fine:
>
> IDL> xroi, dispim, regions_out = roi, /block
>
> But when I do
>
> IDL> xroi, dispim, regions_in = [roi_in], regions_out = roi, /block
>
> The display image (dispim) is not shown properly (I get just a black image) and the call is terminated with the error message:
>
> IDLGRMODEL::ADD: Argument 1 should be of class type IDLgrModel or IDLgrGraphic or IDL_Container
>
>
> If I repeat the call, the image is displayed nicely but I see no defined ROI in the ROI information window.
>
>
> The roi_in object is created like this:
>
> IDL> roi_in = OBJ_NEW('IDLanROI', X_in, Y_in)
>
> where X_in and Y_in define a rectangle:
>
> IDL> help,X_in,Y_in & print, X_in & print,Y_in
> X_IN LONG = Array[4]
> Y_IN LONG = Array[4]
> 35 65 65 35
> 35 35 65 65
>
> The roi_in object at least passes the simplest of tests but could probably be wrong anyway:
>
> IDL> roi_in -> getproperty, roi_xrange = xx & print, xx
> 35.000000 65.000000
>
> I'm using regions_in = [roi_in] because the documentation says it should be an array but regions_in = roi_in gives the same error.
>
> Any advice?

I should add that dispim is a 100 by 100 byte array, so the rectangle should be within bounds.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to 'fill' legend text with color or outline color text in black?
Next Topic: An IDL hero moves on. Best wishes, Chris!

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

Current Time: Wed Oct 08 20:04:02 PDT 2025

Total time taken to generate the page: 0.00645 seconds