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

RgbBinary.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Trait_RgbBinary_h
00002 #define Impala_Core_Array_Trait_RgbBinary_h
00003 
00004 #include "Core/Array/Element/E1Cast.h"
00005 
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Array
00011 {
00012 namespace Trait
00013 {
00014 
00015 
00019 template<class ValT>
00020 class RgbBinary
00021 {
00022 public:
00024     RgbBinary()
00025     {
00026     }
00027 
00029     void
00030     DoIt(const ValT& pixV, UInt8* rgbPtr)
00031     {
00032         ValT v = Element::E1Cast(0, ValT());
00033         if (pixV == v)
00034         {
00035             /*black*/
00036             *rgbPtr++ = 0x00;
00037             *rgbPtr++ = 0x00;
00038             *rgbPtr++ = 0x00;
00039         }
00040         else
00041         {
00042             /*red*/
00043             *rgbPtr++ = 0xFF;
00044             *rgbPtr++ = 0x00;
00045             *rgbPtr++ = 0x00;
00046         }
00047     }
00048 };
00049 
00050 } // namespace Trait
00051 } // namespace Array
00052 } // namespace Core
00053 } // namespace Impala
00054 
00055 #endif

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