X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 24 Nov 2011 05:02 AM by  anon
problem with "ROI_THRESH_DOIT"
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
24 Nov 2011 05:02 AM
    Hello, I have a problem when trying to create a ROI from band values in IDL (with "ROI_THRESH_DOIT"). When I set "MIN_THRESH" to be a number (e.g. MIN_THRESH=0) there is no problem and the ROI_ID is created. However, when I set MIN_THRESH equal to a variable previosly defined ("DMIN" from "ENVI_STATS_DOIT") the ROI_ID remains undefined and IDL reports an error "Program caused arithmetic error: Floating illegal operand". Any help? Thanks a lot if so, Adán

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    01 Dec 2011 10:33 AM
    You might try doing some print and help statements on your variables right before you call the ROI_THRESH_DOIT to make sure you are passing what you think you are passing. I was able to use 'dmin' and 'dmax' from ENVI_STATS_DOIT to create some ROIs so I don't think there is anything wrong with using a variable. Perhaps you can copy your code example here so we can see what might be going wrong. Or you can contact Exelis VIS technical support directly with this question.

    Deleted User



    New Member


    Posts:
    New Member


    --
    13 Dec 2011 06:29 AM
    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
    You are not authorized to post a reply.