LibreOffice Module vcl (master) 1
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
BitmapGaussianSeparableBlurFilter Class Referencefinal

#include <BitmapGaussianSeparableBlurFilter.hxx>

Inheritance diagram for BitmapGaussianSeparableBlurFilter:
[legend]
Collaboration diagram for BitmapGaussianSeparableBlurFilter:
[legend]

Public Member Functions

 BitmapGaussianSeparableBlurFilter (double fRadius)
 
virtual BitmapEx execute (BitmapEx const &rBitmapEx) const override
 Separable Gaussian Blur filter and accepts a blur radius as a parameter so the user can change the strength of the blur. More...
 
- Public Member Functions inherited from BitmapFilter
 BitmapFilter ()
 
virtual ~BitmapFilter ()
 
virtual BitmapEx execute (BitmapEx const &rBitmapEx) const =0
 

Static Private Member Functions

static bool convolutionPass (const Bitmap &rBitmap, Bitmap &aNewBitmap, BitmapReadAccess const *pReadAcc, int aNumberOfContributions, const double *pWeights, int const *pPixels, const int *pCount)
 
static std::vector< double > makeBlurKernel (const double radius, int &rows)
 
static void blurContributions (const int aSize, const int aNumberOfContributions, const std::vector< double > &rBlurVector, std::vector< double > &rWeights, std::vector< int > &rPixels, std::vector< int > &rCounts)
 

Private Attributes

double mfRadius
 

Additional Inherited Members

- Static Public Member Functions inherited from BitmapFilter
static bool Filter (BitmapEx &rBmpEx, BitmapFilter const &rFilter)
 
static bool Filter (Animation &rBmpEx, BitmapFilter const &rFilter)
 

Detailed Description

Definition at line 19 of file BitmapGaussianSeparableBlurFilter.hxx.

Constructor & Destructor Documentation

◆ BitmapGaussianSeparableBlurFilter()

BitmapGaussianSeparableBlurFilter::BitmapGaussianSeparableBlurFilter ( double  fRadius)
inline

Definition at line 22 of file BitmapGaussianSeparableBlurFilter.hxx.

Member Function Documentation

◆ blurContributions()

void BitmapGaussianSeparableBlurFilter::blurContributions ( const int  aSize,
const int  aNumberOfContributions,
const std::vector< double > &  rBlurVector,
std::vector< double > &  rWeights,
std::vector< int > &  rPixels,
std::vector< int > &  rCounts 
)
staticprivate

Definition at line 166 of file BitmapGaussianSeparableBlurFilter.cxx.

References i.

Referenced by execute().

◆ convolutionPass()

bool BitmapGaussianSeparableBlurFilter::convolutionPass ( const Bitmap rBitmap,
Bitmap aNewBitmap,
BitmapReadAccess const *  pReadAcc,
int  aNumberOfContributions,
const double *  pWeights,
int const *  pPixels,
const int pCount 
)
staticprivate

◆ execute()

BitmapEx BitmapGaussianSeparableBlurFilter::execute ( BitmapEx const &  rBitmapEx) const
overridevirtual

Separable Gaussian Blur filter and accepts a blur radius as a parameter so the user can change the strength of the blur.

Radius of 1.0 is 3 * standard deviation of gauss function.

Separable Blur implementation uses 2x separable 1D convolution to process the image.

Implements BitmapFilter.

Definition at line 19 of file BitmapGaussianSeparableBlurFilter.cxx.

References blurContributions(), convolutionPass(), vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::get(), BitmapEx::GetBitmap(), Bitmap::GetSizePixel(), Size::Height(), makeBlurKernel(), mfRadius, vcl::N24_BPP, Bitmap::ReassignWithSize(), vcl::ScopedBitmapAccess< Access, Bitmap, Acquire >::reset(), and Size::Width().

◆ makeBlurKernel()

std::vector< double > BitmapGaussianSeparableBlurFilter::makeBlurKernel ( const double  radius,
int rows 
)
staticprivate

Definition at line 140 of file BitmapGaussianSeparableBlurFilter.cxx.

References distance, and index.

Referenced by execute().

Member Data Documentation

◆ mfRadius

double BitmapGaussianSeparableBlurFilter::mfRadius
private

Definition at line 37 of file BitmapGaussianSeparableBlurFilter.hxx.

Referenced by execute().


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