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

Home » Public Forums » archive » divise image envi-idl
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
divise image envi-idl [message #70971] Tue, 18 May 2010 07:58
tonino is currently offline  tonino
Messages: 4
Registered: May 2010
Junior Member
Hi all,

I am a very beginner in IDL

I try to write a batch to divise my image but apparently, the values
of the loop are wrong... could someone explain me what is wrong ?

thanks a lot

here is the code :


pro tuilage

ENVI, /RESTORE_BASE_SAVE_FILES
ENVI_BATCH_INIT

image = 'C:\Documents and Settings\Administrateur\Mes documents
\cooccurrence+1+2'
envi_open_file, image, r_fid=fidimage, /NO_REALIZE

if (fidimage eq -1) then begin
print, 'error nestor'
endif

envi_file_query, fidimage, dims = dimimage, NB=NBimage, NL=NLimage,
NS=NSimage
pos = lindgen(NBimage)

result = dblarr(NSimage/5, NLimage/2, NBimage)

for i = 0, (NSimage-NSimage/5), NSimage/5 do begin
for j = 0, (NLimage-NLimage/2), NLimage/2 do begin

result = image[i:i+((NSimage/5)-1),j:j+((NLimage/2)-1),
0:NBimage-1]

envi_write_envi_file, result, data_type=4
outname = STRCOMPRESS('C:\Documents and Settings\Administrateur
\Mesdocume\'+string(i/(NSimage/5))+string(j/(NLimage/2)),/RE MOVE_ALL)
openw, lun, outname, /Get_lun
close, lun
free_lun, lun
endfor
endfor

end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Can I open an ENVI Vector File (EVF) in batch mode?
Next Topic: x-y offsets

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

Current Time: Wed Oct 08 11:42:37 PDT 2025

Total time taken to generate the page: 0.01247 seconds