/// <summary> /// Returns the correction mask. /// </summary> /// <param name="xmax">Maximum value</param> /// <param name="xmin">Minimum value</param> /// <param name="delta">Delta</param> /// <param name="length">Length</param> /// <returns>Array</returns> public static float[] Linear(float xmax, float xmin, float delta, int length) { float[] table = new float[length]; for (int x = 0; x < length; x++) { table[x] = Intensity.Linear(x / (float)length, xmax, xmin, delta); } return(table); }
/// <summary> /// Implements filter rebuilding. /// </summary> protected override void Rebuild() { this.values = Intensity.Linear(range, delta / 2.0f, 256); }
/// <summary> /// Returns the correction mask. /// </summary> /// <param name="range">Pair of numbers Max и Min</param> /// <param name="delta">Delta</param> /// <param name="length">Length</param> /// <returns>Array</returns> public static float[] Linear(RangeFloat range, float delta, int length) { return(Intensity.Linear(range.Max, range.Min, delta, length)); }