Re: zoom into float image data? [message #21916 is a reply to message #21907] |
Wed, 27 September 2000 00:00   |
amacphee
Messages: 9 Registered: September 2000
|
Junior Member |
|
|
Excelent! I've had a quick look at your xstretch.pro and I think it will
do the trick.
Many thanks; this has been the fastest, most direct solution I have
received to a question in any newsgroup!
Andrew
In article <MPG.143bd9b381532cab989c3e@news.frii.com>,
davidf@dfanning.com (David Fanning) wrote:
> Andrew (amacphee@my-deja.com) writes:
>
>> I've got arrays of float where the interesting data lies in a small
>> range. For example, the raw data ranges from -123.45 to 5678.9,
>> whilst the interesting stuff lies between 123.4 and 125.6. For each
set
>> the interesting data is not necesserily in the same range.
>>
>> I'm trying to write something that:
>> 1) displays the image bytescaled;
>> 2) uses xloadct to stretch the colour table to home in on the
>> interesting data;
>> 3) re-bytescales the data with new min and max values determined
from
>> the scaling of the colour table.
>> 4) Iterate 3 and 4 until I've zoomed in on the interesting data.
>>
>> I thought I could use the numbers on the stretch bars in xloadct as
>> feedback to re-bytescale my input data, but these numbers aren't
>> returned by xloadct. I then thought I could use tvlct to read the
rgb
>> values after stretching, then use e.g. min(where(r>0)) and
>> max(where(r<255)) to find how much I had stretched the table.
However, I
>> expect I would need to do the same for green and blue and I can't
see
>> then how this would correspond to the 'stretch' numbers in xloadct
if
>> the colour table wasn't linear in all three colours.
>>
>> Then I wondered if anyone else had gone around this loop and maybe
had
>> come up with a far slicker, tried and trusted solution :-)
>
> I think my XStretch program is made to order. :-)
>
> http://www.dfanning.com/programs/xstretch.pro
>
> You will need XColors too, if you want to change color
> tables:
>
> http://www.dfanning.com/programs/xcolors.pro
>
> Cheers,
>
> David
>
> --
> 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
>
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|