[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: opening and display large file




 With RAM at 256 MB, there is no problem reading and working with large
data arrays. However, what I learn recently, is the monitor doesn't use
the RAM. If you don't have enough monitor memory, don't expect to
display and retain large files.

 However, you can use the TV command to add tiles or lines on a big
4800x6000 window.

Try this....

Kelly

P.S. The same thing can be done in a Widget, so you can scroll around
the large display when the data array is bigger than your screen area.

============= Modify ReadTopo ======================
PRO TheWholeThing

file = 'e:\w140n90\w140n90.dem
topo = INTarr(4800,6000)

OpenR, lun, file, /Get_Lun, /swap_endian
ReadU, lun, topo
Close, lun
Free_Lun, lun

maxElev = MAX(topo)
WINDOW, 0, XSize=4800, YSize =6000, TITLE = " The Whole Thing "
FOR i = 0, 5999 DO BEGIN
  TV, BYTscl(topo(*,i), MIN=0, MAX=maxElev ), 0, i
ENDFOR

END

==================================================

Sylvain Carette wrote:

> Thanks
> That's look almost what I have tryed. I'll use it "as is" to see the
> difference with mine but its mostly the fact I tryed to send the whole
> array to tv and slide_image.
> Also, I didnt close the file and free lun immediately after reading as
> you did - is this could cause memory leakage (when freezing, I was
> wondering after reset if I left big lump of anaccessible memory)?
> The only other difference is that instead of extracting a subset, I
> used congrid to resample a lightweigth display grid. Even though,
> nothing on tv and a small portion with slide_image which disapear
> immediately as soon I move a scroll bar (retain=0; retain 1 & 2 just
> make windows crash)...
> So this mean that 4800 x 6000 is too big for those two function? I
> still dont understand why it would be so big since according to the
> doc, you should be able to open a file as long you have enough memory
> and I have 250mb which should be enough for one gtopo tile no?
>
> I hope I dont sound like a bugger but beleive me, I tryed to do my
> homework before requesting help here.
> BYW, did you open usgs dem?
>
> Sylvain Carette
> VRML designer-composer
>
> Kelly Dean wrote:
>
>> This is what I use to access the GTOPO30 DEMs
>>
>>  Kelly Dean
>>  CSU/CIRA
>>
>> ================================================
>> PRO ReadTopo
>>
>> file = 'e:\w140n90\w140n90.dem
>> topo = INTarr(4800,6000)
>> ;
>> ; Open DEM, Swap_Endian if you are using a PC.
>> ;
>> OpenR, lun, file, /Get_Lun, /swap_endian
>> ReadU, lun, topo
>> Close, lun
>> Free_Lun, lun
>> ;
>> ; Cut out a small area and scale it.
>> ;
>> cut = BYTscl(topo(1500:2499,1500:2499), MIN=0 )
>> PRINT, ' MAX >',MAX( cut , MIN=MIN)
>> PRINT, ' MIN >',MIN
>> WINDOW, 0, XSize=1000, YSize=1000, TITLE='GTOP030'
>> TV, cut
>>
>> END
>> =================================================
>>
>> Sylvain Carette wrote:
>>
>> > Hi
>> > How do you manage to display very large images? What is the
>> options?
>> > From the manual, it seem that using "assoc" is a winner but maybe
>> with
>> > one little example it would be more clear how can this be (It seem
>> to
>> > me that it is an important aspect of programming with IDL since
>> most
>> > of the time you'll deal with larger than memory files).
>> > Even with assoc, dont you still have to copy from the file to an
>> array
>> > before display?
>> > I dont decipher exactly why and when to use readu or read_binary,
>> the
>> > file pointer, assoc or writing to an offscreen buffer.
>> >
>> > I tried to open and display a GTOPO30 tile (4800 x 6000 int). tv
>> could
>> > not display it - froze. I tried "slide_image" but it didnt scroll
>> with
>> > "retain=1" while "retain=2" and "retain=3" result in windows error
>> and
>> > crash.
>> >
>> > Since most of my data fall in the 30mb to 610 mb range, I need
>> > absolutely to open and display very large file. What is available?
>>
>> > Pointers, sample code, library, ideas, etc, I'm listening.... Just
>>
>> > knowing that it have to be handled on your own or that IDL provide
>>
>> > facility (that they forgot to explain in the manual) to deal with
>> this
>> > will already be invaluable
>> >
>> > Thanks
>> >
>> > Sylvain Carette
>> > VRML designer-composer
>> >
>