You can do this using the menus or you can use ENVI's routine ENVI_OUTPUT_TO_EXTERNAL_FORMAT to output to ArcView BIL or ascii (grid, xyz).
When using the GUI, you would use the 'Spectral Subset' button during file selection to output each band. With ENVI_OUTPUT_TO_EXTERNAL_FORMAT, you would loop through the POS array which holds the band positions of the input file. For example, the code below will output each band in a file to ascii grid format:
++++++++++++++++++++++++++
PRO ascii_out_example
compile_opt idl2
;select file to output
file = 'C:\Program Files\ITT\IDL64\products\envi44\data\bhtmref.img'
;open and query file
envi_open_file, file, r_fid=fid
envi_file_query, fid, dims=dims, ns=ns, nl=nl, nb=nb
pos=lindgen(nb)
;loop through each band and output to ascii grid
for i = 0, nb-1 do begin
out_name = 'asc_grid'+ strtrim(string(pos[i]+1), 1)+'.txt'
envi_output_to_external_format, fid=fid, dims=dims, pos=pos[i], out_name=out_name, /ascii
endfor
END
+++++++++++++++++++++++
|