Is there a way to load an ROI file and obtain the ROI ids that were loaded? Currently, I delete all ROIs in memory, load the ROI file, and then get all ROI ids in memory:
; Close all ROIs
roi_ids = envi_get_roi_ids()
foreach roi, roi_ids do begin
ENVI_DELETE_ROIS, roi
endforeach
; Open ROIs and get ROI IDs
envi_restore_rois,roiFilename
roiIds = ENVI_GET_ROI_IDS(roi_names=roiNames, /short_name)
The side effect of removing all ROIs except for the one that is loaded is distressing. Is there a better way to load and get the IDs of an ROI?
|