#include "HxFuncMNpo.h"
#include "HxCategories.h"
Functions | |
template<class DstDataPtrArray, class SrcDataPtrArray, class MNpoT> void | HxFuncMNpo (DstDataPtrArray &dstPtrs, SrcDataPtrArray &srcPtrs, HxSizes dstSize, MNpoT &mpo, HxTagTransInVar) |
Translation invariant M output, N input pixel operation. More... | |
template<class DstDataPtrArray, class SrcDataPtrArray, class MNpoT> void | HxFuncMNpoDispatch (DstDataPtrArray &dstPtrs, SrcDataPtrArray &srcPtrs, HxSizes dstSize, MNpoT &mnpo) |
Dispatch function for M output, N input pixel operation. More... |
|
Translation invariant M output, N input pixel operation.
00026 { 00027 int nPix = dstSize.x() * dstSize.y() * dstSize.z(); 00028 int n = srcPtrs.size(); 00029 int m = dstPtrs.size(); 00030 typename SrcDataPtrArray::ArithType *src = 00031 new typename SrcDataPtrArray::ArithType [n]; 00032 typename DstDataPtrArray::ArithType *dst = 00033 new typename DstDataPtrArray::ArithType [m]; 00034 00035 while (--nPix >= 0) { 00036 int i; 00037 for (i=0; i < n; i++) 00038 src[i] = srcPtrs[i].readIncX(); 00039 00040 mpo.doIt(dst, src); 00041 00042 for (i=0; i < m; i++) 00043 dstPtrs[i].writeIncX(dst[i]); 00044 } 00045 00046 delete [] dst; 00047 delete [] src; 00048 } |
|
Dispatch function for M output, N input pixel operation. Dispatch is based on the TransVarianceCategory category defined in MNpoT. Calls HxFuncMNpo(DstDataPtrArray&,SrcDataPtrArray&,HxSizes,MNpoT&,HxTagTransInVar) or HxFuncMNpo(DstDataPtrArray&,SrcDataPtrArray&,HxSizes,MNpoT&,HxTagTransInVar).
00095 { 00096 HxFuncMNpo( 00097 dstPtrs, srcPtrs, dstSize, mnpo, 00098 typename MNpoT::TransVarianceCategory()); 00099 } |