how to manipulate data that are stored in memory directly? [message #84933] |
Tue, 18 June 2013 14:01  |
itscd
Messages: 1 Registered: June 2013
|
Junior Member |
|
|
Hey guys, this might be a simple question, but it has been bothering me for a while: how to retrieve the data stored in memory and manipulate them as a simple IDL variable?
For example, the following is a piece of standard IDL code to use the layer stacking function in ENVI:
envi_doit, 'envi_layer_stacking_doit', $
fid=fid, pos=pos, dims=dims, $
out_dt=out_dt, out_name=out_name, $
interp=0, out_ps=out_ps, $
out_proj=out_proj, r_fid=r_fid , /EXCLUSIVE, /IN_MEMORY
Because i specified the keyword "IN_MEMORY", the processed data (in this case a multi-layer image) will be stored in memory instead of writing into a file. But if i want to manipulate the processed data as an array right away, is there a way to retrieve the data in memory and manipulate them directly? In the past the general way for me to deal with this kind of situation was to write the data into files, and then read the files into objects and manipulate the objects, but i figure there must be a shortcut which allows me to skip this time-consuming step of writing and reading.
Thank you so much!
|
|
|
Re: how to manipulate data that are stored in memory directly? [message #84934 is a reply to message #84933] |
Tue, 18 June 2013 14:09   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
itscd writes:
> Hey guys, this might be a simple question, but it has been bothering me for a while: how to retrieve the data stored in memory and manipulate them as a simple IDL variable?
>
> For example, the following is a piece of standard IDL code to use the layer stacking function in ENVI:
>
> envi_doit, 'envi_layer_stacking_doit', $
> fid=fid, pos=pos, dims=dims, $
> out_dt=out_dt, out_name=out_name, $
> interp=0, out_ps=out_ps, $
> out_proj=out_proj, r_fid=r_fid , /EXCLUSIVE, /IN_MEMORY
>
> Because i specified the keyword "IN_MEMORY", the processed data (in this case a multi-layer image) will be stored in memory instead of writing into a file. But if i want to manipulate the processed data as an array right away, is there a way to retrieve the data in memory and manipulate them directly? In the past the general way for me to deal with this kind of situation was to write the data into files, and then read the files into objects and manipulate the objects,
but i figure there must be a shortcut which allows me to skip this time-consuming step of writing and reading.
>
Alas, if you could do this the secrets of ENVI would fall open to you,
and the gods would descend on you and destroy you. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
|
|