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

Home » Public Forums » archive » Fast way to collapse data cube with median
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: Fast way to collapse data cube with median [message #85135 is a reply to message #85133] Tue, 09 July 2013 09:22 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Stefan writes:

> I am doing a lot of image processing and very often I have a data cube
like with the x/y axes corresponding to image coordinates and the z
component corresponding to the individual images.
>
> I simply want to calculate the median at each pixel stack and so far I always loop through all pixels and determine the median for each stack. This, of course, can be quite slow for large images since it involves two loops and I was wondering if someone here might have a fancy idea of how to collapse such a cube faster.

medianValuesOfArray = Median(cube, DIMENSION=3)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Peak detection
Next Topic: CURVEFIT function

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

Current Time: Sat Oct 11 21:45:45 PDT 2025

Total time taken to generate the page: 2.40069 seconds