X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 24 Oct 2006 05:39 AM by  anon
compute roi separability
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
24 Oct 2006 05:39 AM
    Hello. I know how to compute ROI separability interactively. However I'd like to do this from a batch job and can't find it in the programming documentation. Does anyone know the name of the routine that does this? Thank you. Tracey

    Deleted User



    New Member


    Posts:
    New Member


    --
    24 Oct 2006 05:39 AM
    There is no documented way to programmatically access the ROI Separability tool in ENVI. Below is a sample program that will show you how to get what you need, but it comes with a few caveats. The routine (envi_roi_separability_doit) is 100% undocumented, which means that it is not covered by technical support. In other words, it may change or disappear at any time, without warning. If this change in status breaks code you have developed that relies on the routine, you are on your own. Also, there is currently no way to bypass the report window and pass the separability values directly to a text file. A large batch job might end up generating many, many report windows. You will have to manually export the text to ASCII if that is your end goal. ===================================== pro roi_sep_test compile_opt idl2 ;Open input file and generate a pos array input_file = dialog_pickfile(title='Select Input File') envi_open_file, input_file, r_fid=input_fid envi_file_query, input_fid, nb=nb pos = lindgen(nb) ;Remove all ROIs currently open roi_cleanup = envi_get_roi_ids() envi_delete_rois, roi_cleanup ;Open ROI file and retrieve ROI IDs roi_file = dialog_pickfile(title='Select Associated ROI File') envi_restore_rois, roi_file input_rois = envi_get_roi_ids() ;Returns separability report window for selected ROIs envi_roi_separability_doit, fid=input_fid, pos=pos, roi_ids=input_rois end
    You are not authorized to post a reply.