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

Home » Public Forums » archive » Re: change in histogram
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: change in histogram [message #12418 is a reply to message #12410] Wed, 29 July 1998 00:00 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Vap User wrote:
> Has there been a change to histogram in IDl 5.1? The documentation
> says that the array is searched for the min/max values if min=/max=
> keyword are missing. However, consider the following...
[snipped some code examples]

Converting the HISTOGRAM array argument to FLOAT has helped me deal with
some strange behavior I've seen when dealing with INTEGER arguments in
IDL 5.1.

Here's what I do:

;- Get image minimum and maximum

MinValue = MIN( Image, Max = MaxValue )

;- Check image range

IF MinValue LT MaxValue THEN MESSAGE, 'Image values are all the same'

;- Define number of points used in constructing histogram

Points = 100

;- Compute histogram

HistData = HISTOGRAM( FLOAT( Image ), MIN = MinValue, MAX = MaxValue, $
BINSIZE = FLOAT( MaxValue - MinValue ) / FLOAT( Points - 1 ) )

Cheers,
Liam.
[Message index]
 
Read Message
Read Message
Previous Topic: the DRAW method
Next Topic: interpolate

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

Current Time: Sat Oct 11 18:47:47 PDT 2025

Total time taken to generate the page: 0.95964 seconds