Add event handling to an ENVI display group [message #89350] |
Mon, 25 August 2014 07:02 |
Ann Crabbé
Messages: 2 Registered: August 2014
|
Junior Member |
|
|
My program does the following:
(1) look for an image path
(2) open the image using envi_open_file
(3) locate the correct bands for a false color composite
(4) display the image using envi_display_bands
When the user closes the display group, I want the image to be removed from the memory as well (using envi_file_mng, id = fid, /remove).
I guess what I need for this is to add event handling to my display group. However I have not the slightest idea how to accomplish this, nor can I find any information online.
Adding event handling is possible I think, since I read the following everywhere in related articles on the ENVI website "You can retrieve DNs in the event handler of user-managed display events." For example here: http://www.exelisvis.com/docs/ENVI_CLOSE_DISPLAY.html
The code:
imgfile = 'P:\...\image'
envi_open_file, imgFile, r_fid = fid, /no_realize
envi_file_query, fid, wl=wl
RGB_loc = value_locate(wl, [1650, 830, 650])
envi_display_bands, [fid, fid, fid], rgb_loc, /new
If I could somehow figure out the widget ID, I could use xmanager? But I cannot find it... I guess I am understanding the concept op display groups wrong?
Thanks a lot in advance.
|
|
|