[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reading from process pipes in IDL?
- Subject: Re: Reading from process pipes in IDL?
- From: gfirem1(at)umbc.edu (Gwyn Fireman)
- Date: 21 Sep 2000 14:15:16 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: University of Maryland, Baltimore County
- References: <39C9CBD4.D6CC859A@mpipsykl.mpg.de>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:21476
Benno Puetz (puetz@mpipsykl.mpg.de) wrote:
: I have been trying to read image data from compressed (*.gz) files.
: I would prefer a way similar to PERL's
: open(FILE, "gzip -cd $file |");
Benno -
If you know the array size in advance, you can use the -c flag to gunzip
to stdout and capture the output in a unit pipe:
IDL> imagedata=intarr(1325,800)
IDL> spawn, 'gunzip -c testdata.dat.Z', unit=dataunit
IDL> readu,dataunit,imagedata
IDL> free_lun,dataunit
IDL> help,imagedata
IMAGEDATA INT = Array[1325, 800]
--
__.
/ | , , , , , ,_ Gwyn Fireman
(__/|/(_(_)(_/|/| |_/ gfirem1@alumni.umbc.edu
/| /|
(_/ (_/