Re: gziped files [message #11380] |
Thu, 09 April 1998 00:00  |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
Gordon Waiter wrote:
>
> Is there a way to access a directory containing gzipped files (images in this case), unzip those files,
> read them into an array (which I can already do when unzipped manually from the system prompt) and then re-zip the files, all within a .pro.
One can easily write a short program or script to do this.
You can use DIALOG_PICKFILE() to select a directory, 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
in raw bitmap format (8- or 16-bit) and are either 64x64, 128x128,
256x256, or 512x512, and perhaps include an initial file header,
then you can use my READ_IMG.PRO which you can download via
anonymous ftp:
bial8.ucsd.edu pub/software/idl/share
Hope this helps.
Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|