#include <HxImgFtorKernelNgb2d.h>
Inheritance diagram for HxImgFtorKernelNgb2d::

Public Types | |
| typedef HxImgFtorKernelNgbKey | KeyType |
| The key type of this class. More... | |
| typedef SrcImgSigT::DataPtrType | SrcDataPtrType |
| The data pointer type of the source image. More... | |
| typedef KerImgSigT::DataPtrType | KerDataPtrType |
| The data pointer type of the kernel image. More... | |
Public Methods | |
| HxImgFtorKernelNgb2d () | |
| Constructor. More... | |
| virtual | ~HxImgFtorKernelNgb2d () |
| Destructor. More... | |
| virtual HxSizes | minimumBorderSize (HxTagList &tags) const |
| Minimum border size. More... | |
Protected Methods | |
| virtual void | doIt (DstDataPtrType dstPtr, SrcDataPtrType srcPtr, KerDataPtrType kerPtr, HxSizes dstSize, HxSizes srcSize, HxSizes kerSize, HxTagList &tags, HxImgFtorDescription *=0) |
| Calls HxFuncKernelNgbOp2d to do the actual work. More... | |
|
|||||
|
The key type of this class.
Reimplemented from HxImgFtorI3Cast. |
|
|||||
|
The data pointer type of the source image.
|
|
|||||
|
The data pointer type of the kernel image.
|
|
|||||||||
|
Constructor.
00023 : HxImgFtorI3Cast<DstImgSigT, SrcImgSigT, KerImgSigT>( 00024 HxImgFtorKernelNgbKey( 00025 HxClassName<DstImgSigT>(), HxClassName<SrcImgSigT>(), 00026 HxClassName<KerImgSigT>(), HxClassName<NgbT>())) 00027 { 00028 HxImgFtorRuleBase::instance().setResultType( 00029 HxClassName<DstImgSigT>(), "kernelNgb", 00030 HxClassName<SrcImgSigT>(), HxClassName<NgbT>()); 00031 HxImgFtorRuleBase::instance().setKernelType( 00032 HxClassName<KerImgSigT>(), "kernelNgb", 00033 HxClassName<SrcImgSigT>(), HxClassName<NgbT>()); 00034 } |
|
|||||||||
|
Destructor.
00039 {
00040 }
|
|
||||||||||
|
Minimum border size.
Reimplemented from HxImgFunctor.
00047 {
00048 NgbT ngb(tags);
00049 return ngb.size() / HxSizes(2,2,2);
00050 }
|
|
||||||||||||||||||||||||||||||||||||||||
|
Calls HxFuncKernelNgbOp2d to do the actual work.
00060 {
00061 typedef HxKernel2d<KerDataPtrType, typename KerImgSigT::ArithType> KernelType;
00062
00063 NgbT ngb(tags);
00064 KernelType kernel(kerPtr, kerSize, tags);
00065
00066 HxBreakPoint();
00067
00068 if (description) {
00069 HxString v(typename NgbT::IteratorCategory().toString());
00070 v += ", ";
00071 v += typename NgbT::PhaseCategory().toString();
00072 v += ", ";
00073 v += typename NgbT::TransVarianceCategory().toString();
00074 description->setVariation(v);
00075 }
00076
00077 if (kerSize.inf(ngb.size()) != kerSize)
00078 {
00079 HxEnvironment::instance()->errorStream()
00080 << "Error: Kernel neighborhood operator: kernel size smaller than "
00081 << "neighborhood size." << STD_ENDL;
00082 HxEnvironment::instance()->flush();
00083 return;
00084 }
00085
00086 // pre-condition states that source should be large enough
00087
00088 HxSizes borderSize = getBorderSize(
00089 tags, ngb.size().sup(srcSize - dstSize)/HxSizes(2, 2, 2));
00090
00091 srcPtr.incXYZ(borderSize.x(), borderSize.y(), borderSize.z());
00092
00093 HxFuncKernelNgbOp2d(dstPtr, srcPtr, dstSize, ngb, kernel);
00094 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001