VIA - Volumetric Image Analysis
Functions
Contrast.c File Reference

Functions

VImage VContrast (VImage src, VImage dest, VRepnKind repn, VFloat alpha, VFloat background)
VImage VContrastUByte (VImage src, VImage dest, VFloat low, VFloat high)
VImage VContrastShort (VImage src, VImage dest, VFloat low, VFloat high)
VImage VMapImageRange (VImage src, VImage dest, VRepnKind repn)
 The minimum and maximum grey values of the input images are computed, and a linear mapping is performed mapping the input minimum(maximum) of the input image to the min(max) value of the output pixel repn. E.g. if the input image min is -17 and its max is +2376, and the output repn is VUByteRepn, then the linear mapping function maps -17 to 0 and +2376 to 255.

Detailed Description

Contrast enhancement.

A piecewise-linear contrast enhancement is performed. The contrast stretching function is derived from the mean value and the standard deviation of the input image. The output pixel repn need not be identical to the input image. Thus, it is possible to convert to ubyte repn for easier visualization.

Author:
Gabriele Lohmann, MPI-CBS

Function Documentation

VImage VContrast ( VImage  src,
VImage  dest,
VRepnKind  repn,
VFloat  alpha,
VFloat  background 
)
Parameters:
srcinput image (any repn)
destoutput image (any repn)
repnthe output pixel repn (e.g. VUByteRepn)
alphacontrast stretching factor. The function stretches grey values between mean-alpha*sigma and mean+alpha*sigma.
backgroundinput grey values with absolute values less than <background> are assumed to be image background and are not used for computing the image mean and sigma. If set to zero, it has no effect.
VImage VContrastUByte ( VImage  src,
VImage  dest,
VFloat  percent,
VFloat  background 
)
Parameters:
srcinput image (ubyte repn)
destoutput image (ubyte repn)
percentpercentage of pixels to ignore at either end of the histogram.
backgroundinput grey values with absolute values less than <background> are assumed to be image background.
VImage VContrastShort ( VImage  src,
VImage  dest,
VFloat  percent,
VFloat  background 
)
Parameters:
srcinput image (short repn)
destoutput image (ubyte repn)
VImage VMapImageRange ( VImage  src,
VImage  dest,
VRepnKind  repn 
)

The minimum and maximum grey values of the input images are computed, and a linear mapping is performed mapping the input minimum(maximum) of the input image to the min(max) value of the output pixel repn. E.g. if the input image min is -17 and its max is +2376, and the output repn is VUByteRepn, then the linear mapping function maps -17 to 0 and +2376 to 255.

Parameters:
srcinput image (any repn)
destoutput image
repnthe output pixel repn (e.g. VUByteRepn)