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

zoom into float image data?



Hi,
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 :-)

Any ideas?
Thanks,
Andrew


Sent via Deja.com http://www.deja.com/
Before you buy.