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

Home » Public Forums » archive » Re: VARRAY, memory & extracting subarrays
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: VARRAY, memory & extracting subarrays [message #25603 is a reply to message #25602] Mon, 02 July 2001 05:27 Go to previous messageGo to previous message
Richard French is currently offline  Richard French
Messages: 173
Registered: December 2000
Senior Member
You've probably thought about this, but it appears that your images
array is a stack of images (a 3-D array) - if you can get away with
processing a single image at a time, or extracting a subsection of
each image in succession, you can always use the ASSOC command to
set up an associated variable. This is very handy when you are working
with a huge number of individual images. For example, let's say
you had 20 images of size 500 x 600:

images = fltarr(500,600,20)

and you wanted to make a sub=array of (100:300, 200:400, 11:14) of
this hunk. You could do:

openr,lun,/GET_LUN,image_file
image=ASSOC(fltarr(500,600))

sub_array=fltarr(201,201,4)

for i=11,14 do begin
sub_array[0,0,i]=(image[i])[100:300,200:400]
endfor

THis way, you never need to have the entire large image cube in
memory at a given time.

I do this all the time for sequences of astronomical images which
are stored in time order in an image cube. For your application, it
may or may not be a time-saver.

Hope this helps,

Dick French
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Intersecting geometric shapes
Next Topic: (test, sorry, please ignore)

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

Current Time: Fri Oct 10 04:43:56 PDT 2025

Total time taken to generate the page: 0.32239 seconds