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

Home » Public Forums » archive » error in a simple pro
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
error in a simple pro [message #55786] Wed, 12 September 2007 16:46 Go to previous message
yychongzi is currently offline  yychongzi
Messages: 6
Registered: September 2007
Junior Member
Hi, I am new to ENVI and IDL, but really interested and trying to
learn.

Below is a simple pro file for reading ENVI image, but there is
something wrong with the line 'for i=0, .....' Could anyone tell me
why? Thanks a lot.


pro readenvi

envi_select, title='choose image', fid=fid, dims=dims, pos=pos
if(fid eq -1) then begin print, 'cancelled'
return
endif

envi_file_query, fid, fname = 'C:\ars\data\test'

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

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])

window, 11, xsize=num_cols, ysize=num_rows, title = fname
tvscl, image[0,*,*]

print, num_cols
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ENVI File Question
Next Topic: insufficient system resources

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

Current Time: Fri Oct 10 03:42:10 PDT 2025

Total time taken to generate the page: 1.35921 seconds