Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

MakeBlocks.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_MakeBlocks_h
00002 #define Impala_Core_Array_MakeBlocks_h
00003 
00004 #include "Core/Array/Trait/InOutBlocks.h"
00005 #include "Core/Array/Pattern/PatInOutOp.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Core
00010 {
00011 namespace Array
00012 {
00013 
00014 
00015 /*
00016 template<class ArrayT>
00017 inline ArrayT*
00018 MakeBlocks(typename ArrayT::ArithType value, int cw, int ch, int bw = 0,
00019              int bh = 0)
00020 {
00021     ArrayT* dst = ArrayCreate<ArrayT>(cw, ch, bw, bh);
00022     MakeBlocks(dst, value);
00023     return dst;
00024 }
00025 */
00026 
00027 // offSetX,Y is position of first block
00028 // marginX,Y is distance between blocks
00029 template<class ArrayT>
00030 inline void
00031 MakeBlocks(ArrayT*& dst, int offsetX, int offsetY,
00032              int blockWidth, int blockHeight,
00033              int marginX, int marginY,
00034              typename ArrayT::ArithType borderValue,
00035              typename ArrayT::ArithType blockValue,
00036              typename ArrayT::ArithType blockValueIncr,
00037              int maxNrBlocksX = -1, int maxNrBlocksY = -1)
00038 {
00039     Trait::InOutBlocks<ArrayT> blocks(offsetX, offsetY, blockWidth, blockHeight,
00040                                       marginX, marginY, borderValue, blockValue,
00041                                       blockValueIncr, maxNrBlocksX, maxNrBlocksY,
00042                                       dst->CW(), dst->CH());
00043     Pattern::PatInOutOp(dst, blocks);
00044 }
00045 
00046 } // namespace Array
00047 } // namespace Core
00048 } // namespace Impala
00049 
00050 #endif

Generated on Fri Mar 19 09:30:48 2010 for ImpalaSrc by  doxygen 1.5.1