1 // -------------------------------------------------------------------------
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // -------------------------------------------------------------------------
5 #ifndef __CPEXTENSIONS__ALGORITHMS__RGBTORGBFUNCTION__H__
6 #define __CPEXTENSIONS__ALGORITHMS__RGBTORGBFUNCTION__H__
8 #include <itkRGBPixel.h>
10 #include <itkVector.h>
12 namespace cpExtensions
19 struct RGBToRGBFunction
21 typedef RGBToRGBFunction Self;
22 typedef itk::Vector< O, 3 > TOutPixel;
24 template< class Tr, class Tg, class Tb >
25 TOutPixel operator()( const Tr& r, const Tg& g, const Tb& b ) const
35 TOutPixel operator()( const itk::RGBPixel< C >& rgb ) const
39 rgb.GetRed( ), rgb.GetGreen( ), rgb.GetBlue( )
49 #endif // __CPEXTENSIONS__ALGORITHMS__RGBTORGBFUNCTION__H__