StretchImage

Optimizing the colour range in jview is often one the first things we do once we view it. Alternatively, an image can be stretched with stretchacres or with the -range option in addSUN but it would always require us to first look up the colour range in jview. Off course why not automate this step; StretchImage does just that. It uses the getStats script so be sure to have that one too. The image colours will be optimized over a range restricted by the Mean +/- n*Stddev. By defualt it will use a factor of 2, but you can change that with the -stddev option. Because StretchImage makes a temporary dump of the image, it may take a while for large files.

If the input file was a sun-image (i.e. a sun_xxx-extension) it will be overiden. All other 8bit-files will be get an .str-extension. If a .r4 file was supplied, first a 8bit is made and it is then stretched accordingly. The results are pretty random since the depths are not likely to be normally distributed. Usually the r4to8bit does a decent job of restricting the range, but hey; got be compatible;)

USAGE:          StretchImage  file.xxx
                 (-stddev 3) (default mean +/- 2stddev)
                 Input .r4 --> Output .8bit
                 Input .sun_xxx --> Output .sun_xxx
                 Input other 8bit-file --> Output .str

Get StretchImage here.


Pim, June 15th 2012.