[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thresholding/color question

Alex Schuster (alex@pet.mpin-koeln.mpg.de) writes:

> Isn"t the usage of WHERE discouraged because of being slow? 

If it is, it's news to me. :-)

> I always use direct matrix operation for this, like:
> redmask = scaledImage GT threshold
> scaledImage = scaled_Image * (1B-redmask) + byte(!D.Table_Size-2) *
> redmask

I don't doubt there are speed advantages in matrix operations,
but unless you had a huge image I doubt very much you 
would notice. And even then, the increase in speed would probably
be more than offset by the additional memory usage.

Plus, I don't have a clue what this code is doing when I
read it! Simple things for simple folk, is my motto. :-)



P.S. If my memory serves, Alex, aren't you the one with
the 10 quadrillion Megs of RAM on your machine? Perhaps 
matrix operations *are* the best thing for you. :-) 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155