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