Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxFuncSet.c File Reference

More...

#include "HxFuncSet.h"
#include "HxCategories.h"
#include <memory.h>

Typedefs

typedef HxDataPtr2dScalarTem<
double, HxScalarDouble
DataPtr2dDouble
typedef HxDataPtr2dTem< HxVec2Double,
HxVec2Double
DataPtr2dVec2Double

Functions

template<class DstDataPtrT, class SrcDataPtrT> void HxFuncSet_Row (DstDataPtrT dstPtr, SrcDataPtrT srcPtr, int nPix)
 Set one line of nPix from src to dst. More...

template<> void HxFuncSet_Row< DataPtr2dDouble, DataPtr2dDouble > (DataPtr2dDouble dPtr, DataPtr2dDouble sPtr, int nPix)
 Set one line of nPix from src to dst, template specialization for 2d double images. More...

template<> void HxFuncSet_Row< DataPtr2dVec2Double, DataPtr2dVec2Double > (DataPtr2dVec2Double dPtr, DataPtr2dVec2Double sPtr, int nPix)
 Set one line of nPix from src to dst, template specialization for 2d Vec2Double images. More...

template<class DstDataPtrT, class SrcDataPtrT> void HxFuncSet (DstDataPtrT dstPtr, SrcDataPtrT srcPtr, HxSizes regionSize)
 Set function. More...


Detailed Description


Function Documentation

template<class DstDataPtrT, class SrcDataPtrT>
void HxFuncSet_Row DstDataPtrT    dstPtr,
SrcDataPtrT    srcPtr,
int    nPix
 

Set one line of nPix from src to dst.

00024 {
00025     while (--nPix >= 0)
00026         dstPtr.writeIncX(srcPtr.readIncX());
00027 }

template<>
void HxFuncSet_Row< DataPtr2dDouble, DataPtr2dDouble > DataPtr2dDouble    dPtr,
DataPtr2dDouble    sPtr,
int    nPix
[inline]
 

Set one line of nPix from src to dst, template specialization for 2d double images.

template<>
void HxFuncSet_Row< DataPtr2dVec2Double, DataPtr2dVec2Double > DataPtr2dVec2Double    dPtr,
DataPtr2dVec2Double    sPtr,
int    nPix
[inline]
 

Set one line of nPix from src to dst, template specialization for 2d Vec2Double images.

template<class DstDataPtrT, class SrcDataPtrT>
void HxFuncSet DstDataPtrT    dstPtr,
SrcDataPtrT    srcPtr,
HxSizes    regionSize
 

Set function.

Sets pixels designated by dstPtr equal to pixels designated by srcPtr. regionSize defines the 3D region of pixels involved.

Note that the function does NOT assume the pixels in the region to be contiguous in memory. However, a row of pixels must be contiguous.

00069 {
00070     int y, z;
00071 
00072     int lineSize = regionSize.x();
00073 
00074     for (z = 0; z < regionSize.z(); z++) {
00075         for (y = 0; y < regionSize.y(); y++) {
00076             SrcDataPtrT sPtr(srcPtr);
00077             DstDataPtrT dPtr(dstPtr);
00078             sPtr.incXYZ(0, y, z);
00079             dPtr.incXYZ(0, y, z);
00080             HxFuncSet_Row(dPtr, sPtr, lineSize);
00081         }
00082     }
00083 }


Generated on Tue Feb 3 14:18:47 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001