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
end

Coded by Sil!

Comments

Popular posts from this blog

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

Las Tutucas y todo lo demás

Python Ipdb Cheatsheet