ICF 3.1.1.10
Technical documentation of ICF Libraries
CConvolutionKernel2d.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iipr_CConvolutionKernel2d_included
7#define iipr_CConvolutionKernel2d_included
8
9
10// ICF includes
13
14
15namespace iipr
16{
17
18
25 virtual public imath::CSampledFunction2d,
26 virtual public IConvolutionKernel2d
27{
28public:
30
34 explicit CConvolutionKernel2d(const istd::CIndex2d& kernelSize, double value = 0);
35
36 double GetKernelDistance(const IConvolutionKernel2d& kernel) const;
37
38 // reimplemented (iipr::IConvolutionKernel2d)
40 virtual void SetKernelSize(const istd::CIndex2d& kernelSize, double value = 0.0);
41 virtual double GetKernelElement(const istd::CIndex2d& index) const;
42 virtual bool SetKernelElement(const istd::CIndex2d& index, double value);
43 virtual double GetOffsetValue() const;
44 virtual bool SetOffsetValue(double offset);
45 virtual bool GetCombinedKernel(const IConvolutionKernel2d& kernel, IConvolutionKernel2d& result) const;
46 virtual bool TrySeparateKernels(IConvolutionKernel2d& result1, IConvolutionKernel2d& result2, int separationType = ST_AUTO, double tolerance = I_BIG_EPSILON) const;
47
48 // reimplemented (iser::ISerializable)
49 virtual bool Serialize(iser::IArchive& archive);
50
51private:
52 double m_valueOffset;
53};
54
55
56} // namespace iipr
57
58
59#endif // !iipr_CConvolutionKernel2d_included
60
Implementation of a general 2D convolution kernel.
CConvolutionKernel2d(const imath::ISampledFunction2d &function2d)
virtual bool SetKernelElement(const istd::CIndex2d &index, double value)
Set kernel element value at the given position index.
CConvolutionKernel2d(const istd::CIndex2d &kernelSize, double value=0)
virtual bool GetCombinedKernel(const IConvolutionKernel2d &kernel, IConvolutionKernel2d &result) const
Get some kernel beeing combination of this and some other kernel.
virtual istd::CIndex2d GetKernelSize() const
Get size of this kernel.
virtual double GetOffsetValue() const
Get offset value will be added to convolution result.
double GetKernelDistance(const IConvolutionKernel2d &kernel) const
CConvolutionKernel2d(const CConvolutionKernel2d &kernel)
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
virtual void SetKernelSize(const istd::CIndex2d &kernelSize, double value=0.0)
Set size of this kernel.
virtual bool TrySeparateKernels(IConvolutionKernel2d &result1, IConvolutionKernel2d &result2, int separationType=ST_AUTO, double tolerance=I_BIG_EPSILON) const
Try separate this kernel into two separated kernels.
virtual double GetKernelElement(const istd::CIndex2d &index) const
Get kernel element value at the given position index.
imath::CSampledFunction2d BaseClass
virtual bool SetOffsetValue(double offset)
Set offset value will be added to convolution result.
Interface for 2D-convolution filter kernel.
Implementation of the resampled 2D-function.
Interface for a resampled function with a regular grid design.
Represent input/output persistence archive.
Definition IArchive.h:34
Index implementation for addressing elements in 2D-space.
Definition CIndex2d.h:25
Contains the image processing classes.

© Witold Gantzke and Kirill Lepskiy