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

Home » Public Forums » archive » Re: accessing large arrays quickly
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: accessing large arrays quickly [message #15592] Fri, 28 May 1999 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
D. Mattes wrote:
>
> well, this question about accessing large arrays has proven a rather
> embarrasing entry to this prestigious newsgroup, as i have discovered the
> real root of my problem.

David - (seems this is the "David" thread)

Believe me, we have ALL been there!

> i was using the bytscl operation on each slice
> before drawing it to the window, thus slowing things down quite a bit.
> the performance hit was only noticeable once the array size grew larger
> than say 256x256x30, so i felt sure something else was culprit. but now,
> if i spend the time to bytscl the entire volume first, accessing the
> slices isn't putting any crimp in my style.

Plus now you are working with 8-bit data, not 16-bit (I'm assuming).
If the time it takes to bytscl your data increases as the volume
increases in size, it's probably because the system is starting to
page fault. If you're using UNIX you can use vmstat to see this.

>
> what would be nice though, is a routine similar to tvscl, but with all the
> flexibility of bytscl, and with a couple extra features. tvscl only
> allows specifying a top value. it would be nice to specify a bottom
> value, to make working with split color tables a lot easier. does anybody
> know of such a procedure???

Since it looks like you are using medical images, you might want to
check out some of the routines I've made available at:

ftp://bial8.ucsd.edu/pub/software/idl/share

Many of the routines are for medical image apps, including a grayscale
routine that allows you to easily define a split color table, or even
split the color table into thirds. Also, the SHOW_IMG program allows
you to easily view medical images of many formats.

Hope this is useful.

Dave Foster

>
> On Thu, 27 May 1999, D. Mattes wrote:
>
>> hello idl gurus: i have a very large volume array out of which i extract
>> 3 orthogonal 2-d slices and display these slices in three separate
>> windows. i extract a slice by assignment:
>>
>> slice=data(*,*,zslice)
>>
>> then i scale the slice, and finally display it using tv. once the volume
>> grows to larger than 10Meg, i suffer a performance hit on the array access
>> times, and my image browser slows down considerably. how can i improve
>> performance???
>>
>> some ideas i've had:
>> 1. render the entire volume and specify cutting planes to just display
>> the slice of interest.
>> 2. use an external c function, like memcpy, to speed up the variable
>> swapping when i assign 2-d array as a crosssection of the volume array.
>> 3. store each possible slice separately, perhaps in a linked list.
>>
>> do you idl gurus out there have any suggestions or comments on my ideas???
>>
>> thank you in advance for your time.
>>
>> david mattes
>>
>>
>>
>>

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Color changing dialog
Next Topic: Re: sph_scat: does it work?

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

Current Time: Wed Oct 08 15:08:11 PDT 2025

Total time taken to generate the page: 0.06549 seconds