A modifier that will calculate each pixel in an image to be a weighed sum of itself and it's neighbors. More...
#include <convolutionmodifier.h>
Public Member Functions | |
ConvolutionModifier () | |
Blank constructor. | |
virtual | ~ConvolutionModifier () |
Class destructor. | |
ConvolutionModifier & | CalculateDivisor () |
Automatically generates a sane divisor for pixel processing. More... | |
virtual String | GetName () const |
Gets the name of this modifier. More... | |
virtual void | Modify (TextureBuffer &Buffer) |
Alters the generated pixels in a TextureBuffer. More... | |
ConvolutionModifier & | SetCalculateEdgeDivisor (const Boole CalculateEdge) |
Sets if a custom divisor should be use or one automatically generated during pixel processing. More... | |
ConvolutionModifier & | SetDivisor (const Real Div) |
Sets a custom divisor that will be applied to the result of the pixel to help keep the value within a range. More... | |
ConvolutionModifier & | SetIncludeAlphaChannel (const Boole IncludeAlpha) |
Sets if the alpha channel of each pixel should be processed. More... | |
ConvolutionModifier & | SetKernel (const UInt8 Size, Real *Data) |
Sets the matrix that determines how each pixel neighbor is to be weighed when processing each pixel. More... | |
ConvolutionModifier & | SetKernel (const UInt8 Size, Integer *Data) |
Sets the matrix that determines how each pixel neighbor is to be weighed when processing each pixel. More... | |
ConvolutionModifier & | SetKernel (const Matrix3x3 &Data) |
Sets the matrix that determines how each pixel neighbor is to be weighed when processing each pixel. More... | |
ConvolutionModifier & | SetThreshold (const UInt8 Thresh) |
Sets a threshold that will force the colours of each pixel further to white or black. More... | |
Public Member Functions inherited from Mezzanine::Graphics::Procedural::TextureModifier | |
TextureModifier () | |
Blank constructor. | |
virtual | ~TextureModifier () |
Class destructor. | |
Protected Attributes | |
Boole | CalculateEdgeDivisor |
Whether or not a dynamic divisor from pixel processing is to be used or the explicitly set divisor. More... | |
Real | Divisor |
The custom value to divide the pixel result by. More... | |
Boole | IncludeAlphaChannel |
Whether or not the Alpha channel is to be processed with the rest of the pixel. More... | |
Real * | KernelData |
The matricy to use for per-pixel processing. More... | |
UInt8 | KernelSize |
The size of the set kernel. More... | |
UInt8 | Threshold |
A value over 128 will force a colour closer to White, lower will force a colour closer to black. More... | |
A modifier that will calculate each pixel in an image to be a weighed sum of itself and it's neighbors.
Definition at line 84 of file convolutionmodifier.h.
ConvolutionModifier & Mezzanine::Graphics::Procedural::ConvolutionModifier::CalculateDivisor | ( | ) |
Automatically generates a sane divisor for pixel processing.
Definition at line 267 of file convolutionmodifier.cpp.
|
virtual |
Gets the name of this modifier.
Implements Mezzanine::Graphics::Procedural::TextureModifier.
Definition at line 195 of file convolutionmodifier.cpp.
|
virtual |
Alters the generated pixels in a TextureBuffer.
Buffer | The buffer to be modified. |
Implements Mezzanine::Graphics::Procedural::TextureModifier.
Definition at line 110 of file convolutionmodifier.cpp.
ConvolutionModifier & Mezzanine::Graphics::Procedural::ConvolutionModifier::SetCalculateEdgeDivisor | ( | const Boole | CalculateEdge | ) |
Sets if a custom divisor should be use or one automatically generated during pixel processing.
CalculateEdge | Whether or not a dynamic divisor from pixel processing is to be used or the explicitly set divisor. |
Definition at line 261 of file convolutionmodifier.cpp.
ConvolutionModifier & Mezzanine::Graphics::Procedural::ConvolutionModifier::SetDivisor | ( | const Real | Div | ) |
Sets a custom divisor that will be applied to the result of the pixel to help keep the value within a range.
Div | The custom value to divide the pixel result by. |
Definition at line 255 of file convolutionmodifier.cpp.
ConvolutionModifier & Mezzanine::Graphics::Procedural::ConvolutionModifier::SetIncludeAlphaChannel | ( | const Boole | IncludeAlpha | ) |
Sets if the alpha channel of each pixel should be processed.
IncludeAlpha | Whether or not the Alpha channel is to be processed with the rest of the pixel. |
Definition at line 264 of file convolutionmodifier.cpp.
ConvolutionModifier & Mezzanine::Graphics::Procedural::ConvolutionModifier::SetKernel | ( | const UInt8 | Size, |
Real * | Data | ||
) |
Sets the matrix that determines how each pixel neighbor is to be weighed when processing each pixel.
Size | The row size of the square kernel to be set. |
Data | The matricy to use for per-pixel processing. |
Definition at line 201 of file convolutionmodifier.cpp.
ConvolutionModifier & Mezzanine::Graphics::Procedural::ConvolutionModifier::SetKernel | ( | const UInt8 | Size, |
Integer * | Data | ||
) |
Sets the matrix that determines how each pixel neighbor is to be weighed when processing each pixel.
Size | The row size of the square kernel to be set. |
Data | The matricy to use for per-pixel processing. |
Definition at line 220 of file convolutionmodifier.cpp.
ConvolutionModifier & Mezzanine::Graphics::Procedural::ConvolutionModifier::SetKernel | ( | const Matrix3x3 & | Data | ) |
Sets the matrix that determines how each pixel neighbor is to be weighed when processing each pixel.
Data | A 3x3 matrix to use for per-pixel processing. |
Definition at line 239 of file convolutionmodifier.cpp.
ConvolutionModifier & Mezzanine::Graphics::Procedural::ConvolutionModifier::SetThreshold | ( | const UInt8 | Thresh | ) |
Sets a threshold that will force the colours of each pixel further to white or black.
Thresh | The threshold to use. Values over 128 will force a colour closer to White, lower will force a colour closer to black. |
Definition at line 258 of file convolutionmodifier.cpp.
|
protected |
Whether or not a dynamic divisor from pixel processing is to be used or the explicitly set divisor.
Definition at line 101 of file convolutionmodifier.h.
|
protected |
The custom value to divide the pixel result by.
Definition at line 92 of file convolutionmodifier.h.
|
protected |
Whether or not the Alpha channel is to be processed with the rest of the pixel.
Definition at line 104 of file convolutionmodifier.h.
|
protected |
The matricy to use for per-pixel processing.
Definition at line 89 of file convolutionmodifier.h.
|
protected |
The size of the set kernel.
Definition at line 95 of file convolutionmodifier.h.
|
protected |
A value over 128 will force a colour closer to White, lower will force a colour closer to black.
Definition at line 98 of file convolutionmodifier.h.