Main Page   Class Overview   Pixels   Images   Geometry   Quick Index  

HxImgFtorNgb2d Class Template Reference

Instantiation of generic algorithm for neighborhood operations on 2D images. More...

#include <HxImgFtorNgb2d.h>

Inheritance diagram for HxImgFtorNgb2d::

HxImgFtorI2Cast HxImgFtorI2 HxImgFunctor List of all members.

Public Types

typedef HxImgFtorNgbKey KeyType
 The key type of this class. More...


Public Methods

 HxImgFtorNgb2d ()
 Constructor. More...

virtual ~HxImgFtorNgb2d ()
 Destructor. More...

virtual HxSizes minimumBorderSize (HxTagList &tags) const
 Minimum border size. More...


Protected Methods

virtual void doIt (DstDataPtrType dstPtr, SrcDataPtrType srcPtr, HxSizes dstSize, HxSizes srcSize, HxTagList &tags, HxImgFtorDescription *=0)
 Calls HxFuncNgbOp2d(DstDataPtrT,SrcDataPtrT,HxSizes,NgbT&) to do the actual work. More...


Detailed Description

template<class DstImgSigT, class SrcImgSigT, class NgbT>
class HxImgFtorNgb2d< DstImgSigT, SrcImgSigT, NgbT >

Instantiation of generic algorithm for neighborhood operations on 2D images.


Member Typedef Documentation

template<class DstImgSigT, class SrcImgSigT, class NgbT>
typedef HxImgFtorNgbKey HxImgFtorNgb2d::KeyType
 

The key type of this class.

Reimplemented from HxImgFtorI2Cast.


Constructor & Destructor Documentation

template<class DstImgSigT, class SrcImgSigT, class NgbT>
HxImgFtorNgb2d< DstImgSigT, SrcImgSigT, NgbT >::HxImgFtorNgb2d   [inline]
 

Constructor.

00021     : HxImgFtorI2Cast<DstImgSigT, SrcImgSigT>(
00022         HxImgFtorNgbKey(
00023             HxClassName<DstImgSigT>(), HxClassName<SrcImgSigT>(),
00024             HxClassName<NgbT>()))
00025 {
00026     HxImgFtorRuleBase::instance().setResultType(
00027         HxClassName<DstImgSigT>(), "ngb",
00028         HxClassName<SrcImgSigT>(), HxClassName<NgbT>());
00029 
00030 }

template<class DstImgSigT, class SrcImgSigT, class NgbT>
HxImgFtorNgb2d< DstImgSigT, SrcImgSigT, NgbT >::~HxImgFtorNgb2d   [virtual]
 

Destructor.

00034 {
00035 }


Member Function Documentation

template<class DstImgSigT, class SrcImgSigT, class NgbT>
HxSizes HxImgFtorNgb2d< DstImgSigT, SrcImgSigT, NgbT >::minimumBorderSize HxTagList   tags const [virtual]
 

Minimum border size.

Reimplemented from HxImgFunctor.

00041 {
00042     NgbT ngb(tags);
00043     return ngb.size() / HxSizes(2,2,2);
00044 }

template<class DstImgSigT, class SrcImgSigT, class NgbT>
void HxImgFtorNgb2d< DstImgSigT, SrcImgSigT, NgbT >::doIt DstDataPtrType    dstPtr,
SrcDataPtrType    srcPtr,
HxSizes    dstSize,
HxSizes    srcSize,
HxTagList   tags,
HxImgFtorDescription   description = 0
[protected, virtual]
 

Calls HxFuncNgbOp2d(DstDataPtrT,SrcDataPtrT,HxSizes,NgbT&) to do the actual work.

Reimplemented from HxImgFtorI2Cast.

00052 {
00053     NgbT ngb(tags);
00054 
00055     if (description) {
00056         HxString v(typename NgbT::IteratorCategory().toString());
00057         v += ", ";
00058         v += typename NgbT::PhaseCategory().toString();
00059         v += ", ";
00060         v += typename NgbT::TransVarianceCategory().toString();
00061         description->setVariation(v);
00062     }
00063 
00064     HxSizes borderSize = getBorderSize(
00065         tags, ngb.size().sup(srcSize - dstSize)/ HxSizes(2,2,2));
00066 
00067     srcPtr.incXYZ(borderSize.x(), borderSize.y(), borderSize.z());
00068 
00069     HxFuncNgbOp2d(dstPtr, srcPtr, dstSize, ngb);
00070 }


The documentation for this class was generated from the following files:
Generated on Tue Jan 8 13:59:30 2002 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001