Region Of Interest Ascii - IDL

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

Coded by Sil!


Popular posts from this blog

Como configurar el control de directv para que funcione con el Tv

Show all values in Numpy array

Converting unicode date to datetime object.