/// <summary>
        /// Initializes a new instance of the <see cref="HlslGaussianBlurProcessor"/> class
        /// </summary>
        /// <param name="definition">The <see cref="HlslGaussianBlurProcessor"/> 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 HlslGaussianBlurProcessor(HlslGaussianBlurProcessor definition, Image <TPixel> source, Rectangle sourceRectangle)
        {
            int kernelSize = definition.Radius * 2 + 1;

            Kernel = CreateGaussianBlurKernel(kernelSize, definition.Sigma);
            Source = source;
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HlslGaussianBlurProcessor"/> class
        /// </summary>
        /// <param name="definition">The <see cref="HlslGaussianBlurProcessor"/> defining the processor parameters</param>
        /// <param name="configuration">The configuration which allows altering default behaviour or extending the library</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 HlslGaussianBlurProcessor(HlslGaussianBlurProcessor definition, Configuration configuration, Image <TPixel> source, Rectangle sourceRectangle)
            : base(configuration, source, sourceRectangle)
        {
            int kernelSize = definition.Radius * 2 + 1;

            Kernel = CreateGaussianBlurKernel(kernelSize, definition.Sigma);
        }
Exemple #3
0
            /// <summary>
            /// Initializes a new instance of the <see cref="Implementation"/> class.
            /// </summary>
            /// <param name="definition">The <see cref="Implementation"/> defining the processor parameters.</param>
            /// <param name="configuration">The configuration which allows altering default behaviour or extending the library.</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 Implementation(HlslGaussianBlurProcessor definition, Configuration configuration, Image <ImageSharpRgba32> source, Rectangle sourceRectangle)
                : base(configuration, source, sourceRectangle)
            {
                int kernelSize = definition.Radius * 2 + 1;

                GraphicsDevice = definition.GraphicsDevice;
                Kernel         = CreateGaussianBlurKernel(kernelSize, definition.Sigma);
            }