Sigmoidal contrast stretch

This tool performs a sigmoidal stretch on a raster image. This is a transformation where the input image value for a grid cell (zin) is transformed to an output value zout such that:

zout = (1 / (1 + exp(gain(cutoff - z))) - a ) / b
where,
z = (zin - minimumValue) / range,
a = 1 / (1 + exp(gain x cutoff)),
b = 1 / (1 + exp(gain x (cutoff - 1))) - 1 / (1 + exp(gain x cutoff)),
minimumValue) and range are the minimum value and data range in the input image respectively and gain and cutoff are user specified parameters.

See Also:

Scripting:

The following is an example of a Python script that uses this tool:

wd = pluginHost.getWorkingDirectory()
inputFile = wd + "input.dep"
outputFile = wd + "output.dep"
cutoff = "0.0"
gain = "1.0"
args = [inputFile, outputFile, cutoff, gain]
pluginHost.runPlugin("SigmoidalStretch", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "input.dep"
def outputFile = wd + "output.dep"
def cutoff = "0.0"
def gain = "1.0"
String[] args = [inputFile, outputFile, cutoff, gain]
pluginHost.runPlugin("SigmoidalStretch", args, false)

Credits: