#include <HxMfKernelNgb.h>
Public Methods | |
HxMfKernelNgb (HxImageData *source, HxImageData *kernel, HxString ngbName, HxTagList &tags) | |
Constructor. More... | |
~HxMfKernelNgb () | |
Destructor. More... | |
HxImageData * | source () const |
The source image of the frame. More... | |
HxImageData * | kernel () const |
The kernel image of the frame. More... | |
HxImageData * | result () const |
The result image of the frame. More... | |
bool | preOpIsOk () const |
Indicates whether initialization was OK. More... |
A result image will be allocated with the same size as the source image. The type of the result image is obtained from the HxImgFtorRuleBase via
resulttype of kernelNgb<source,ngbName>
The required type for the kernel is obtained via
kerneltype of kernelNgb<source,ngbName>
|
Constructor.
00021 : _source(srcImg), _kernel(kernel), _result(0), 00022 _tmpKernel(0), _preOpIsOk(true) 00023 { 00024 if (!_source || !_kernel) 00025 { 00026 _preOpIsOk = false; 00027 return; 00028 } 00029 00030 HxImageSignature srcSig(_source->signature()); 00031 00032 HxImageSignature resultSig 00033 = HxImgFtorRuleBase::instance().getResultType( 00034 srcSig, "kernelNgb", srcSig.toString(), ngbName); 00035 00036 HxImageSignature kernelSig 00037 = HxImgFtorRuleBase::instance().getKernelType( 00038 _kernel->signature(), "kernelNgb", srcSig.toString(), ngbName); 00039 00040 _result = HxImgDataFactory::instance().makeImage(resultSig, srcImg->sizes()); 00041 00042 if (kernelSig != _kernel->signature()) 00043 { 00044 _tmpKernel = HxImgDataFactory::instance().makeImage( 00045 kernelSig, _kernel->sizes()); 00046 _tmpKernel->setPartImage(_kernel); 00047 _tmpKernel->weight(_kernel->weight().x()); 00048 _kernel = _tmpKernel; 00049 } 00050 } |
|
Destructor.
00053 { 00054 if (_tmpKernel) 00055 delete _tmpKernel; 00056 } |
|
The source image of the frame.
00060 { 00061 return _source; 00062 } |
|
The kernel image of the frame.
00066 { 00067 return _kernel; 00068 } |
|
The result image of the frame.
00072 { 00073 return _result; 00074 } |
|
Indicates whether initialization was OK.
00064 { 00065 return _preOpIsOk; 00066 } |