CConvolutionKernel2d.h
Go to the documentation of this file.
1 #ifndef iipr_CConvolutionKernel2d_included
2 #define iipr_CConvolutionKernel2d_included
3 
4 
5 // ACF includes
7 
8 // IACF includes
10 
11 
12 namespace iipr
13 {
14 
15 
22  virtual public imath::CSampledFunction2d,
23  virtual public IConvolutionKernel2d
24 {
25 public:
27 
30  explicit CConvolutionKernel2d(const imath::ISampledFunction2d& function2d);
31  explicit CConvolutionKernel2d(const istd::CIndex2d& kernelSize, double value = 0);
32 
33  double GetKernelDistance(const IConvolutionKernel2d& kernel) const;
34 
35  // reimplemented (iipr::IConvolutionKernel2d)
36  virtual istd::CIndex2d GetKernelSize() const;
37  virtual void SetKernelSize(const istd::CIndex2d& kernelSize, double value = 0.0);
38  virtual double GetKernelElement(const istd::CIndex2d& index) const;
39  virtual bool SetKernelElement(const istd::CIndex2d& index, double value);
40  virtual double GetOffsetValue() const;
41  virtual bool SetOffsetValue(double offset);
42  virtual bool GetCombinedKernel(const IConvolutionKernel2d& kernel, IConvolutionKernel2d& result) const;
43  virtual bool TrySeparateKernels(IConvolutionKernel2d& result1, IConvolutionKernel2d& result2, int separationType = ST_AUTO, double tolerance = I_BIG_EPSILON) const;
44 
45  // reimplemented (iser::ISerializable)
46  virtual bool Serialize(iser::IArchive& archive);
47  virtual quint32 GetMinimalVersion(int versionId) const;
48 
49 private:
50  double m_valueOffset;
51 };
52 
53 
54 } // namespace iipr
55 
56 
57 #endif // !iipr_CConvolutionKernel2d_included
58 
virtual istd::CIndex2d GetKernelSize() const
Get size of this kernel.
virtual void SetKernelSize(const istd::CIndex2d &kernelSize, double value=0.0)
Set size of this kernel.
imath::CSampledFunction2d BaseClass
virtual bool SetKernelElement(const istd::CIndex2d &index, double value)
Set kernel element value at the given position index.
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.
Interface for 2D-convolution filter kernel.
virtual bool Serialize(iser::IArchive &archive)
virtual double GetOffsetValue() const
Get offset value will be added to convolution result.
Implementation of a general 2D convolution kernel.
virtual bool GetCombinedKernel(const IConvolutionKernel2d &kernel, IConvolutionKernel2d &result) const
Get some kernel beeing combination of this and some other kernel.
virtual quint32 GetMinimalVersion(int versionId) const
virtual double GetKernelElement(const istd::CIndex2d &index) const
Get kernel element value at the given position index.
double GetKernelDistance(const IConvolutionKernel2d &kernel) const
virtual bool SetOffsetValue(double offset)
Set offset value will be added to convolution result.

© 2007-2017 Witold Gantzke and Kirill Lepskiy