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

Home » Public Forums » archive » envi_get_data
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: envi_get_data [message #68168 is a reply to message #58173] Wed, 30 September 2009 02:39 Go to previous messageGo to previous message
wita is currently offline  wita
Messages: 43
Registered: January 2005
Member
woods1 wrote:
> Hi,
> i have a problem.
> i try this: img = envi_get_data(fid=De_fid, dims=dims,pos=pos), but i

Hi,

Using ENVI_Get_Data() on such large images is really a bad idea.
Trying to read the whole image will take more then 2Gb of memory (in
case of 8bit data) and you will have trouble to fit it in memory on
any 32 bit operating system.

What you should do instead is use ENVI's tiling mechanism to read your
image in chunks and loop over the number of tiles. Then resample each
tile to be able to display it (or do whatever processing you want) and
stitch the results together. So in pseudo code it should look like
this:

tile_ID = ENVI_Init_Tile(File_ID, NUM_TILES=num_tiles,
INTERLEAVE=1, ....)
FOR i=0L, num_tiles-1 DO BEGIN
data = ENVI_Get_Tile(tile_ID)
<processing data goes here>
ENDFOR
ENVI_Tile_Done, tile_ID

Setting INTERLEAVE=1 ensures that you read your file line by line. It
may be more efficient to use INTERLEAVE=0 but then you need to write
some logic that handles the size of the tile that ENVI_Get_Tile
returns, which depends on you memory settings.

Hope this helps.

Allard
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Beginner: Oplot line t^(-5/3)
Next Topic: Curve Fitting Question

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

Current Time: Sun Oct 12 09:22:53 PDT 2025

Total time taken to generate the page: 1.92203 seconds