Subscription of array (the *-problem) [message #48695] |
Thu, 18 May 2006 01:52 |
Laurens
Messages: 41 Registered: May 2006
|
Member |
|
|
Hi all,
I'm currently optimizing all code of our PET-analysing program in IDL.
One part of it is the following statement which turned out to use quite
some time:
-------------------------
pTemp = (*pCurScan)->GetTimeFrame(i+1)
If( Ptr_Valid(pTemp) EQ 0 ) Then Continue
p = (*pTemp)->GetPixelData()
If( Ptr_Valid(p) EQ 0 ) Then Continue
PD[*,*,*,i] = (*p) * Fact
If( Ptr_Valid(p) ) Then Ptr_Free, p
-------------------------
Now it's the PD[*,*,*,i] = statement of which i'm concerned; it uses
asterixs on the left side of the operator and David Fanning's site told
me that's not very elegant :) .
Now, the solution his site gives is - as far as I can see (haven been
IDL-programmer for what...just a few months now) - only usable for
two-dimensional arrays? Well I'm working with images where I have
multiple dimensions (x,y,plane,frame).
Is there someone wise in here who could give me a hint about how to
optimize this bit of code?
Thnx in advance!
Laurens
|
|
|