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

RoughlyEqual.h

00001 #ifndef RoughlyEqual_h
00002 #define RoughlyEqual_h
00003 
00004 
00005 template <class ImgT>
00006 bool 
00007 roughlyEqual(ImgT a, ImgT b, ImgT tolerance) {
00008     ImgT diff=(a-b).abs();
00009     return diff<tolerance;
00010     /*
00011     bool eq=true;
00012     for (int i=0; i<diff.dim(); i++)
00013         eq = eq && diff.getValue(i+1)<tolerance.getValue(i+1);
00014     return eq;
00015     */
00016 }
00017 
00018 
00019 #endif

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