Re: Efficient Programing (reading multiband image) [message #4779] |
Thu, 27 July 1995 00:00  |
ian
Messages: 26 Registered: February 1992
|
Junior Member |
|
|
Word has it that Liam Gumley <liamg@ssec.wisc.edu> may have said:
> dean@phobos.cira.colostate.edu wrote:
>> I use the following code to read in an interleave (by pixel) raster image.
> (stuff deleted)
>> IImage = BYTarr(nchan,nx,ny)
>
> As long as you know the image interleave format, you can read the whole
> image in one hit. The interleave options available are
This assumes you can fit the whole image into memory. If you can, yes,
this will work, and fast. If, on the other hand, you have a huge image
(like AVIRIS data), you'll need to use the associated file format. If you
THEN want to extract only one band from the data, or even a few bands,
you're going to have to loop since the associated format only allows
access to one record (one line in the case of BIP data) at a time.
Of course, I could be wrong. If so, I'd be quite pleased to find a
faster way to read in my AVIRIS data.
+-Ian Novack (Particle Man and Comatose Reader)--------ian@gomez.jpl.nasa.gov-+
| "I can't help it! Imminent death makes me tense! Jet Propulsion Lab |
| I admit it!" -- Calvin, learning to ride a bike Pasadena, CA |
+--Disclaimer: Had this been an actual opinion, it would still be mine.-------+
|
|
|