comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to read a multi-band image with IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to read a multi-band image with IDL [message #65047] Mon, 09 February 2009 09:24 Go to previous message
Mort Canty is currently offline  Mort Canty
Messages: 134
Registered: March 2003
Senior Member
shi.bobopan@gmail.com schrieb:
> Hello! I will write a supervised classification programme and want to
> read a multi-band ETM+ image with IDL. But ENVI_GET_DATA function can
> only read one band. It seems that READ_IMAGE function also read gray
> image or RGB imge only. How can I read a multi-band image at one time?
> I am new in IDL. Thank you very much.

Here's how I always do it:

envi_select, title='Choose multispectral image', $
fid=fid, dims=dims,pos=pos

num_cols = dims[2]-dims[1]+1
num_rows = dims[4]-dims[3]+1
num_bands = n_elements(pos)

; BIP array
image = fltarr(num_bands,num_cols,num_rows)

for i=0,num_bands-1 do image[i,*,*] = $
envi_get_data(fid=fid,dims=dims,pos=pos[i])


Mort
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Has anyone worked with ARF files and brought them into IDL successfully?
Next Topic: How to plot linear regression relation of two array?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:31:53 PDT 2025

Total time taken to generate the page: 0.00406 seconds