X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FAlgorithms%2FRGBExtractFunction.h;fp=lib%2FcpExtensions%2FAlgorithms%2FRGBExtractFunction.h;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=ec7126b12ed720e986f30faf47f7cc0dbbb2fb4c;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/lib/cpExtensions/Algorithms/RGBExtractFunction.h b/lib/cpExtensions/Algorithms/RGBExtractFunction.h deleted file mode 100644 index ec7126b..0000000 --- a/lib/cpExtensions/Algorithms/RGBExtractFunction.h +++ /dev/null @@ -1,54 +0,0 @@ -// ------------------------------------------------------------------------- -// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) -// ------------------------------------------------------------------------- - -#ifndef __CPEXTENSIONS__ALGORITHMS__RGBEXTRACTFUNCTION__H__ -#define __CPEXTENSIONS__ALGORITHMS__RGBEXTRACTFUNCTION__H__ - -#include -#include -#include - -#include - -namespace cpExtensions -{ - namespace Algorithms - { - /** - */ - template< class P > - struct RGBExtractFunction - { - typedef RGBExtractFunction Self; - typedef P TOutPixel; - typedef typename P::ValueType TValue; - - template< class Tr, class Tg, class Tb > - P operator()( const Tr& r, const Tg& g, const Tb& b ) const - { - P out; - out[ 0 ] = TValue( r ); - out[ 1 ] = TValue( g ); - out[ 2 ] = TValue( b ); - return( out ); - } - - template< class C > - TOutPixel operator()( const itk::RGBPixel< C >& rgb ) const - { - return( - this->operator()( - rgb.GetRed( ), rgb.GetGreen( ), rgb.GetBlue( ) - ) - ); - } - }; - - } // ecapseman - -} // ecapseman - -#endif // __CPEXTENSIONS__ALGORITHMS__RGBEXTRACTFUNCTION__H__ - -// eof - $RCSfile$