Re: gzipped files [message #11569 is a reply to message #11433] |
Fri, 17 April 1998 00:00   |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
Dallas Masters wrote:
>
> David Foster wrote:
>>
>> then use
>> SPAWN to unzip the files if you're on a UNIX system. How you read
>> them depends on what kind of files they are. You might use
>> one of the READ_BMP, READ_GIF, etc. routines. If the images are
>
> snip
>
> How can I pass the piped output (LUN) to READ_BMP, READ_GIF, READ_TIFF?
> These procedures take file names as inputs, not LUNs. Is there a way
> around this?
>
> Why did RSI not make all I/O routines take either one flavor or all
> flavors: file name string or LUN? LUNs would make IDL much easier to
> hack.
>
> Thanks,
> --
Just grab the READ_* routines from the IDL lib directory and adapt them
to your needs. A compatible way to do it would be something like :
if (n_elements(ilun) eq 0) then $
openr,ilun,filename,...
But of course you would have to do some error checking
(A) whether the files has been opened (fstat)
(B) if you need the name, make sure it is valid
Maybe RSINC will be interested in your patches.
Regards,
Martin.
PS: But what I am really wondering about is WHY is READ_TIFF a function,
whereas READ_GIF is a procedure ?
--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Earth&Planetary Sciences, Harvard University
186 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA
phone: (617)-496-8318
fax : (617)-495-4551
e-mail: mgs@io.harvard.edu
IDL-homepage: http://www-as.harvard.edu/people/staff/mgs/idl/
------------------------------------------------------------ -------
|
|
|