An IDL little snippet to read Regions of Interest from an ascii file
function load_roi, file_name ; Open file in read-only mode. openr, fd, file_name, /GET_LUN ; Read total pixel from 1 ROI. size = 0 readf, fd, size ; Read the indices of the pixels in the ROI result = intarr(size) readf, fd, result ; Close the file. close, fd return, result end
Coded by Sil!