Re: Colour maps ... (BYTE_SCALE) [message #14659] |
Mon, 15 March 1999 00:00  |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
David Foster wrote:
>
>
> I wrote BYTE_SCALE() because I wanted to be able to specify a minimum
> value for scaling as well as maximum.
If this is the only reason for a new routine BYTE_SCALE: why don't you
call
im = bytscl(data, top=cmax-cmin)+cmin
That's what I do when I need a minimum value.
Just 1/2 cent,
Regards,
Martin.
--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Engineering&Applied Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA
phone: (617)-496-8318
fax : (617)-495-4551
e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
|
|
|
Re: Colour maps ... (BYTE_SCALE) [message #14698 is a reply to message #14659] |
Mon, 22 March 1999 00:00  |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
Martin Schultz wrote:
>
> David Foster wrote:
>>
>
>>
>> I wrote BYTE_SCALE() because I wanted to be able to specify a minimum
>> value for scaling as well as maximum.
>
> If this is the only reason for a new routine BYTE_SCALE: why don't you
> call
>
> im = bytscl(data, top=cmax-cmin)+cmin
>
> That's what I do when I need a minimum value.
>
> Just 1/2 cent,
> Regards,
> Martin.
Martin -
Well, that's worth more than 1/2 cents. Basically, BYTE_SCALE()
was about my second or third routine that I ever wrote in IDL, back
in 1994, before I was even aware that BYTSCL() even *had* any
keywords! I wrote BYTE_SCALE() and never gave this another
thought.
And of course your method is even faster too. Really pisses me off! :-)
Thanks Martin.
Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|