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

Home » Public Forums » archive » Re: Function BYTSCL
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: Function BYTSCL [message #24633 is a reply to message #24632] Tue, 10 April 2001 08:10 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Steffen Kernchen (steffen.kernchen@student.uni-magdeburg.de) writes:

> no, it�s an exercise, so that we learn, what BYTSCL does.
>
> I 've a pic and I read it with READ_BMP to get an array. that array I have
> to transform to get a better contrast.
> but unfortunately without using BYTSCL... :(

Oh, well, then.

What BYTSCL does is take the data, finds the minimum
and maximum of the data, then linearly maps the min
and max to 0 and 255. This is the scaling function.
Then, it adds a translation to the scaled vector, so
that the minimum value is set to zero. Then, it converts
the whole thing to BYTE type.

You are right, the whole thing can be done in 4-5 lines. :-)

Cheers,

David

P.S. Let's just say that if you poked around in the
on-line libraries for a couple of minutes, you would
probably find something that did this sort of 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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: sec : U Re: Dual head displays
Next Topic: Re: Error on shutdown of widget !@$%

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

Current Time: Wed Oct 08 17:06:08 PDT 2025

Total time taken to generate the page: 0.00359 seconds