StretchFunction
Base Type: RasterFunction
A class for a raster stretch function.
Remarks
The Stretch function is used to enhance an image by changing properties such as brightness, contrast and gamma through multiple stretch types.
Examples
C#
StretchFunction function = new StretchFunction();
StretchFunctionArguments argument = new StretchFunctionArguments();
double[] gamma = new double[] { 1 };
RasterStatistics stats = new RasterStatistics();
stats.Max = 98.558349609375;
stats.Min = 0.24400000274181366;
stats.Mean = 30.839803164430656;
stats.StandardDeviation = 14.28627433903563;
object[] statsArray = new object[] { stats, stats, stats };
argument.Names = new string[] { "Min", "Max", "UseGamma", "Gamma", "Statistics", "NumberOfStandardDeviations", "StretchType";
//stretch type is esriRasterStretchType, possible values: 0, 3, 4, 5
argument.Values = new object[] { min, max, false, gamma, statsArray, numberofstandevs, stretchType };
RenderingRule renderRule = new RenderingRule();
renderRule.Arguments = argument;
renderRule.Function = function;
renderRule.VariableName = "Raster";
2/28/2020