/// <summary> /// Initializes a new instance of the <see cref="BoxBlurProcessor{TPixel}"/> class. /// </summary> /// <param name="configuration">The configuration which allows altering default behaviour or extending the library.</param> /// <param name="definition">The <see cref="BoxBlurProcessor"/> defining the processor parameters.</param> /// <param name="source">The source <see cref="Image{TPixel}"/> for the current processor instance.</param> /// <param name="sourceRectangle">The source area to process for the current processor instance.</param> public BoxBlurProcessor(Configuration configuration, BoxBlurProcessor definition, Image <TPixel> source, Rectangle sourceRectangle) : base(configuration, source, sourceRectangle) { int kernelSize = (definition.Radius * 2) + 1; this.Kernel = CreateBoxKernel(kernelSize); }
/// <summary> /// Initializes a new instance of the <see cref="BoxBlurProcessor{TPixel}"/> class. /// </summary> /// <param name="definition">The <see cref="BoxBlurProcessor"/> defining the processor parameters.</param> public BoxBlurProcessor(BoxBlurProcessor definition) { this.definition = definition; int kernelSize = (definition.Radius * 2) + 1; this.KernelX = CreateBoxKernel(kernelSize); this.KernelY = this.KernelX.Transpose(); }
/// <summary> /// Initializes a new instance of the <see cref="BoxBlurProcessor{TPixel}"/> class. /// </summary> /// <param name="definition">The <see cref="BoxBlurProcessor"/> defining the processor parameters.</param> /// <param name="source">The source <see cref="Image{TPixel}"/> for the current processor instance.</param> /// <param name="sourceRectangle">The source area to process for the current processor instance.</param> public BoxBlurProcessor(BoxBlurProcessor definition, Image <TPixel> source, Rectangle sourceRectangle) : base(source, sourceRectangle) { this.definition = definition; int kernelSize = (definition.Radius * 2) + 1; this.KernelX = CreateBoxKernel(kernelSize); this.KernelY = this.KernelX.Transpose(); }