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

Home » Public Forums » archive » Re: divise image envi-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: divise image envi-idl [message #70959 is a reply to message #70958] Wed, 19 May 2010 07:17 Go to previous messageGo to previous message
Antoine Cheula is currently offline  Antoine Cheula
Messages: 1
Registered: May 2010
Junior Member
"Jeff N.

"You need to read the image data into memory if you want to subscript
it this way."

That was the problem. I still have a problem to save my divide images
with the function envi_write_envi_file...

Now, my program look like this :

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, Bnames=Bnamesimage, data_type = data_type
pos = lindgen(NBimage)

openr, lun, image, /get_lun
espace = fltarr(NSimage, NLimage, NBimage)

READU,lun, espace

result = fltarr(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 = espace[i:i+((NSimage/5)-1),j:j+((NLimage/2)-1),
0:NBimage-1]


envi_write_envi_file, result, data_type=4, nb=NBimage,
nl=NLimage/2, $
ns=NSimage/5, BNAMES=BNamesimages, $
outname = STRCOMPRESS('C:\Documents and Settings\Administrateur
\Mes documents\'+string(i/(NSimage/5))+string(j/(NLimage/2)),/
REMOVE_ALL)

endfor
endfor

end  
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: x-y offsets
Next Topic: Why do I get the string in ytitle in vertical direction

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

Current Time: Sun Oct 12 06:09:29 PDT 2025

Total time taken to generate the page: 0.56052 seconds