eLynx SDK
v3.3.0 C++ image processing API reference |
00001 //============================================================================ 00002 // KernelPSF.h Image.Component package 00003 //============================================================================ 00004 // Usage : simple point spread function implementation, that uses convolution 00005 // kernel elxKernel as PSF 00006 // 00007 //---------------------------------------------------------------------------- 00008 // Copyright (C) 2006 by eLynx project 00009 // 00010 // This library is free software; you can redistribute it and/or 00011 // modify it under the terms of the GNU Library General Public 00012 // License as published by the Free Software Foundation; either 00013 // version 2 of the License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, 00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00018 // See the GNU Library General Public License for more details. 00019 //---------------------------------------------------------------------------- 00020 #ifndef __kernelPSF_h__ 00021 #define __kernelPSF_h__ 00022 00023 #include "IImagePSF.h" 00024 #include "elx/math/ConvolutionKernel.h" 00025 00026 namespace eLynx { 00027 namespace Image { 00028 00035 class ExportedByImage KernelPSF : public IImagePSF 00036 { 00037 public: 00038 00041 KernelPSF(const Math::ConvolutionKerneld &iKernel); 00042 00044 KernelPSF(const Math::ConvolutionKerneld &iKernel1, 00045 const Math::ConvolutionKerneld &iKernel2); 00046 00049 KernelPSF(const KernelPSF &iC); 00050 00054 KernelPSF& operator = (const KernelPSF &iC); 00055 00058 bool IsSeparable() const; 00059 00062 const Math::ConvolutionKerneld& GetKernel() const; 00063 Math::ConvolutionKerneld& GetKernel(); 00064 00068 const Math::ConvolutionKerneld& GetKernel2() const; 00069 Math::ConvolutionKerneld& GetKernel2(); 00070 00073 void SetKernel(const Math::ConvolutionKerneld &iKernel); 00074 00078 void SetKernel2(const Math::ConvolutionKerneld &iKernel); 00079 00082 virtual uint32 GetWidth() const; 00083 virtual uint32 GetHeight() const; 00084 virtual double EvalPSF(uint32 iX, uint32 iY, int32 iDX, int32 iDY) const; 00086 00087 private: 00088 00091 void CopyData(const KernelPSF &iC); 00092 00094 Math::ConvolutionKerneld _kernel; 00095 00097 Math::ConvolutionKerneld _kernel2; 00098 00100 bool _bSeparable; 00101 }; 00102 00103 } // namespace Image 00104 } // namespace eLynx 00105 00106 #endif // __kernelPSF_h__ 00107