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

MakeHistogram1dSet.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Histogram_MakeHistogram1dSet_h
00002 #define Impala_Core_Histogram_MakeHistogram1dSet_h
00003 
00004 #include "Core/Array/ArraySet.h"
00005 #include "Core/Histogram/Histogram1dSet.h"
00006 #include "Core/Histogram/MakeHistogram1d.h"
00007 
00008 namespace Impala
00009 {
00010 namespace Core
00011 {
00012 namespace Histogram
00013 {
00014 
00015 
00016 template<class HistArrayT, class ImArrayT>
00017 void
00018 MakeHistogram1dSet(Histogram1dSet<HistArrayT>* hSet,
00019                    Array::ArraySet<ImArrayT> imSet, Geometry::Rectangle rect,
00020                    bool doClearDst)
00021 {
00022     typedef typename Histogram1dSet<HistArrayT>::HistT HistType;
00023 
00024     int start = (doClearDst) ? 0 : hSet->AllocateVector(imSet.Size());
00025     if (doClearDst)
00026     {
00027         hSet->Reserve(imSet.Size(), false);
00028         hSet->SetSize(imSet.Size());
00029     }
00030     for (int i=0 ; i<imSet.Size() ; i++)
00031     {
00032         HistType hist = hSet->Hist(start + i);
00033         MakeHistogram1d(&hist, imSet.Array(i), rect);
00034     }
00035 }
00036 
00037 } // namespace Histogram
00038 } // namespace Core
00039 } // namespace Impala
00040 
00041 #endif

Generated on Fri Mar 19 09:31:10 2010 for ImpalaSrc by  doxygen 1.5.1