The help for RTV_DOIT discuss how the in_memory array should be set up (yes, an array which is a little unusual!):
IN_MEMORY
Set this keyword to an array of ones and zeros indicating the storage location for each of the output vectors. IN_MEMORY is a long-integer array of ones and zeros with the same number of elements as VALUES and OUT_NAME.
So in some example code that I have using ENVI's sample dataset, I set it up like this:
envi_open_file, 'C:\Program Files\Exelis\ENVI50\classic\data\bhdemsub.img', r_fid=fid
envi_file_query, fid, dims=dims
pos = [0]
values = [1250, 1300, 1350, 1400, 1450, 1500]
out_names = 'testimg_' + $
strcompress(string(values),/remove_all) + '.evf'
l_name = ['1219', '1288', '1357', '1426', '1494', '1563']
in_memory = lonarr(n_elements(values))
envi_doit, 'rtv_doit', fid=fid, pos=pos, dims=dims, $
values=values, l_name=l_name, in_memory=in_memory, $
out_names=out_names
|