Ogre Procedural  0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Procedural::Blur Class Reference

Reduce sharpness on input image. More...

#include <ProceduralTextureModifiers.h>

Inheritance diagram for Procedural::Blur:
Inheritance graph
[legend]

Public Types

enum  BLUR_TYPE { BLUR_BOX, BLUR_MEAN, BLUR_GAUSSIAN }
 List of algorithms to blur. More...
 

Public Member Functions

 Blur (TextureBufferPtr pBuffer)
 Default constructor. More...
 
BlursetSize (Ogre::uchar size)
 Set the gaussian block size. More...
 
BlursetSigma (Ogre::uchar sigma)
 Set sigma constant for gaussian filter. More...
 
BlursetType (BLUR_TYPE type)
 Set the algorithm to blur. More...
 
TextureBufferPtr process ()
 Run image manipulation. More...
 
Ogre::String getName ()
 Get name of the filter as string. More...
 
void setLog (bool enable=true)
 Enable/Disable logging. More...
 

Protected Member Functions

void logMsg (Ogre::String msg)
 

Protected Attributes

TextureBufferPtr mBuffer
 
Ogre::String mName
 
bool mLog
 

Detailed Description

Reduce sharpness on input image.

Blurs the input image by a specified algorithm.

Examples: BLUR_MEAN (default)

Procedural::TextureBuffer bufferImage(256);
Procedural::Image(&bufferImage).setFile("red_brick.jpg").process();

dot_texture_05a.png

BLUR_GAUSSIAN

Procedural::TextureBuffer bufferImage(256);
Procedural::Image(&bufferImage).setFile("red_brick.jpg").process();

dot_texture_05b.png

Member Enumeration Documentation

◆ BLUR_TYPE

List of algorithms to blur.

Enumerator
BLUR_BOX 

Use simplified block filter to blur.

BLUR_MEAN 

Use mean filter to blur.

BLUR_GAUSSIAN 

Use gaussian filter to blur.

Constructor & Destructor Documentation

◆ Blur()

Procedural::Blur::Blur ( TextureBufferPtr  pBuffer)

Default constructor.

Parameters
pBufferImage buffer where to modify the image.

Member Function Documentation

◆ getName()

Ogre::String Procedural::TextureProcessing::getName ( )
inherited

Get name of the filter as string.

◆ logMsg()

void Procedural::TextureProcessing::logMsg ( Ogre::String  msg)
protectedinherited

◆ process()

TextureBufferPtr Procedural::Blur::process ( )
virtual

Run image manipulation.

Returns
Pointer to image buffer which has been set in the constructor.

Implements Procedural::TextureProcessing.

◆ setLog()

void Procedural::TextureProcessing::setLog ( bool  enable = true)
inherited

Enable/Disable logging.

Parameters
enabletrue enables logging of filter actions

◆ setSigma()

Blur& Procedural::Blur::setSigma ( Ogre::uchar  sigma)

Set sigma constant for gaussian filter.

Parameters
sigmaNew sigma constant for gaussian blur filter [0, 255] (default 92)

◆ setSize()

Blur& Procedural::Blur::setSize ( Ogre::uchar  size)

Set the gaussian block size.

Parameters
sizeNew block size for gaussian blur filter [3, 255] (default 5)

◆ setType()

Blur& Procedural::Blur::setType ( BLUR_TYPE  type)

Set the algorithm to blur.

Parameters
typeNew algorithm to blur (default BLUR_BOX)

Member Data Documentation

◆ mBuffer

TextureBufferPtr Procedural::TextureProcessing::mBuffer
protectedinherited

◆ mLog

bool Procedural::TextureProcessing::mLog
protectedinherited

◆ mName

Ogre::String Procedural::TextureProcessing::mName
protectedinherited

The documentation for this class was generated from the following file:
Procedural::Image::process
TextureBufferPtr process()
Run image generation.
Procedural::Image
Load an image from a resource.
Definition: ProceduralTextureGenerator.h:334
Procedural::Blur::BLUR_GAUSSIAN
@ BLUR_GAUSSIAN
Use gaussian filter to blur.
Definition: ProceduralTextureModifiers.h:434
Procedural::Blur::BLUR_MEAN
@ BLUR_MEAN
Use mean filter to blur.
Definition: ProceduralTextureModifiers.h:433
Procedural::Blur::process
TextureBufferPtr process()
Run image manipulation.
Procedural::TextureBuffer
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50
Procedural::Image::setFile
Image & setFile(Ogre::String filename, Ogre::String groupname=Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Set the colour of the background.
Procedural::Blur::setType
Blur & setType(BLUR_TYPE type)
Set the algorithm to blur.
Procedural::Blur
Reduce sharpness on input image.
Definition: ProceduralTextureModifiers.h:426