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

Home » Public Forums » archive » sorting of a multi-dimensional array in only one "direction"/dimension
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
sorting of a multi-dimensional array in only one "direction"/dimension [message #41908] Thu, 02 December 2004 06:19
Benjamin Luethi is currently offline  Benjamin Luethi
Messages: 22
Registered: December 2004
Junior Member
Hi,

I'm looking for an efficient way of sorting a multi-dimensional array in
only one "direction"/dimension?

I have (let's say) 5 images in an array imgs=uintarr(1024,1024,5).
I'd like to average pixel values over the 5 images, but only use the
central three values of each position while discarding the minimum and
maximum value.

So far, I'm looping through all image positions (1024x1024!) and sorting
the five elements in each position. (something like
imgs[x,y,*]=sort(imgs[x,y,*]))

Quote from JD Smith: "A typical rule of thumb: if you're looping over each
data element individually, there's (probably) a faster way to do it."
So, in this case that would be...? (something with histograms maybe?)

thanks for your thoughts on this,
Benjamin
[Message index]
 
Read Message
Previous Topic: idl and licenses
Next Topic: IDL and Intel's 64-bit Xeon processor

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

Current Time: Wed Oct 08 20:02:28 PDT 2025

Total time taken to generate the page: 0.01262 seconds