Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
I'm not sure how you're opening a file with that function, but I'm sure it works somehow and I'm just not seeing it. Anyway, I think something like this will do what you want: widget_control, ev.top, get_uvalue=dn envi_disp_query, dn, xds=xds, yds=yds, color=color if (color eq 0) then band_pos = 0 data=envi_get_image(dn=dn, band_pos=band_pos, $ dims=[-1, 0, xds[0]-1, 0, yds[0]-1]) That's straight out of the help file entry for the ENVI_GET_IMAGE function, so if you need more help have a look at that function in ENVI help. Hope that works, Jeff vcarlos wrote: > Hi all, > > I am opening my file images using the envi_display_bands functions. > That is pretty fast and useful. But, now, I want to edit the opened > image using one of my edition tools in a fast way. > > What I am doing now is making a roi, getting the indexes it generates > and then changing directly the file, then redisplaying the changed file > on the screen. This is not very smart because I have to edit the file > every time the user uses any edition tool. > > It would be better if I could only apply the changes to a variable and > when I desired, save that in the file. The problem is: > envi_display_bands doesn't return any variable or pointer to open > image. > > Does anyone knnow a way to access the data of the image opened by > envi_display_bands in memory instead of accessing the file? > > Thanks a lot, > > Vinicius