Blender V5.0
Freestyle::GaussianFilter Class Reference

#include <GaussianFilter.h>

Public Member Functions

 GaussianFilter (float iSigma=1.0f)
 GaussianFilter (const GaussianFilter &)
GaussianFilteroperator= (const GaussianFilter &)
virtual ~GaussianFilter ()
template<class Map>
float getSmoothedPixel (Map *map, int x, int y)
float sigma () const
int maskSize () const
int getBound ()
void setSigma (float sigma)

Static Public Member Functions

static int computeMaskSize (float sigma)

Protected Member Functions

void computeMask ()

Protected Attributes

float _sigma
float_mask
int _bound
int _maskSize
int _storedMaskSize

Detailed Description

Definition at line 21 of file GaussianFilter.h.

Constructor & Destructor Documentation

◆ GaussianFilter() [1/2]

Freestyle::GaussianFilter::GaussianFilter ( float iSigma = 1.0f)

Definition at line 18 of file GaussianFilter.cpp.

References _mask, _sigma, and computeMask().

Referenced by GaussianFilter(), and operator=().

◆ GaussianFilter() [2/2]

Freestyle::GaussianFilter::GaussianFilter ( const GaussianFilter & iBrother)

Definition at line 25 of file GaussianFilter.cpp.

References _bound, _mask, _maskSize, _sigma, _storedMaskSize, and GaussianFilter().

◆ ~GaussianFilter()

Freestyle::GaussianFilter::~GaussianFilter ( )
virtual

Definition at line 46 of file GaussianFilter.cpp.

References _mask.

Member Function Documentation

◆ computeMask()

void Freestyle::GaussianFilter::computeMask ( )
protected

Definition at line 67 of file GaussianFilter.cpp.

References _bound, _mask, _maskSize, _sigma, _storedMaskSize, computeMaskSize(), exp, float, i, M_PI, and norm().

Referenced by GaussianFilter(), and setSigma().

◆ computeMaskSize()

int Freestyle::GaussianFilter::computeMaskSize ( float sigma)
static

Compute the mask size and returns the REAL mask size ((2*_maskSize)-1) This method is provided for convenience.

Definition at line 51 of file GaussianFilter.cpp.

References floor, maskSize(), and sigma().

Referenced by computeMask().

◆ getBound()

int Freestyle::GaussianFilter::getBound ( )
inline

Definition at line 71 of file GaussianFilter.h.

References _bound.

◆ getSmoothedPixel()

template<class Map>
float Freestyle::GaussianFilter::getSmoothedPixel ( Map * map,
int x,
int y )

Returns the value for pixel x,y of image "map" after a gaussian blur, made using the sigma value. The sigma value determines the mask size (~ 2 x sigma).

Parameters
mapThe image we wish to work on. The Map template must implement the following methods:
  • float pixel(uint x, uint y) const;
  • uint width() const;
  • uint height() const;
xThe abscissa of the pixel where we want to evaluate the gaussian blur.
yThe ordinate of the pixel where we want to evaluate the gaussian blur.

Definition at line 104 of file GaussianFilter.h.

References _bound, _mask, _storedMaskSize, abs, i, L, w(), Freestyle::x, and y.

Referenced by Freestyle::GaussianPyramid::BuildPyramid(), and Freestyle::Canvas::loadMap().

◆ maskSize()

int Freestyle::GaussianFilter::maskSize ( ) const
inline

Definition at line 66 of file GaussianFilter.h.

References _maskSize.

Referenced by computeMaskSize().

◆ operator=()

GaussianFilter & Freestyle::GaussianFilter::operator= ( const GaussianFilter & iBrother)

Definition at line 35 of file GaussianFilter.cpp.

References _bound, _mask, _maskSize, _sigma, _storedMaskSize, and GaussianFilter().

◆ setSigma()

void Freestyle::GaussianFilter::setSigma ( float sigma)

modifiers

Definition at line 61 of file GaussianFilter.cpp.

References _sigma, computeMask(), and sigma().

◆ sigma()

float Freestyle::GaussianFilter::sigma ( ) const
inline

accessors

Definition at line 61 of file GaussianFilter.h.

References _sigma.

Referenced by computeMaskSize(), and setSigma().

Member Data Documentation

◆ _bound

int Freestyle::GaussianFilter::_bound
protected

Definition at line 31 of file GaussianFilter.h.

Referenced by computeMask(), GaussianFilter(), getBound(), getSmoothedPixel(), and operator=().

◆ _mask

float* Freestyle::GaussianFilter::_mask
protected

◆ _maskSize

int Freestyle::GaussianFilter::_maskSize
protected

Definition at line 34 of file GaussianFilter.h.

Referenced by computeMask(), GaussianFilter(), maskSize(), and operator=().

◆ _sigma

float Freestyle::GaussianFilter::_sigma
protected

The sigma value of the gaussian function.

Definition at line 29 of file GaussianFilter.h.

Referenced by computeMask(), GaussianFilter(), GaussianFilter(), operator=(), setSigma(), and sigma().

◆ _storedMaskSize

int Freestyle::GaussianFilter::_storedMaskSize
protected

Definition at line 35 of file GaussianFilter.h.

Referenced by computeMask(), GaussianFilter(), getSmoothedPixel(), and operator=().


The documentation for this class was generated from the following files: