I have done what you told me and, as far as I know, the variables are being correctly passed. My code is simply:
envi_open_file, mod_file, r_fid=image_fid
envi_file_query, image_fid, dims=imagedims
ENVI_DOIT, 'ENVI_STATS_DOIT', CANCEL=cancel, COMP_FLAG=0, FID=image_fid, DIMS=imagedims, $
POS=0, DMIN=datamin, DMAX=datamax
ENVI_DOIT, 'ROI_THRESH_DOIT', /NO_QUERY, DIMS=imagedims, FID=image_fid, POS=0, $
MIN_THRESH=datamin, MAX_THRESH=datamax, ROI_ID=ROI_fid, ROI_NAME='adan', ROI_COLOR=1
The ENVI window appears, the process of ROI creation reaches 100%, and the ENVI window disappear. But then the program stops with an error, and ROI_fid is "undefined"; however, the value of datamin is "-53.0000" and datamax equals 152.000
|