X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FAlgorithms%2FRGBToSingleChannelFunctor.h;fp=lib%2FcpExtensions%2FAlgorithms%2FRGBToSingleChannelFunctor.h;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=815b936124cab9e2f8a1fdb0eb2386f6a957098a;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/lib/cpExtensions/Algorithms/RGBToSingleChannelFunctor.h b/lib/cpExtensions/Algorithms/RGBToSingleChannelFunctor.h deleted file mode 100644 index 815b936..0000000 --- a/lib/cpExtensions/Algorithms/RGBToSingleChannelFunctor.h +++ /dev/null @@ -1,86 +0,0 @@ -// ------------------------------------------------------------------------- -// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) -// ------------------------------------------------------------------------- - -#ifndef __cpExtensions__Algorithms__RGBToSingleChannelFunctor__h__ -#define __cpExtensions__Algorithms__RGBToSingleChannelFunctor__h__ - -#include -#include - -namespace cpExtensions -{ - namespace Algorithms - { - /** - */ - template< class _TScalar > - class RGBToSingleChannelFunctor - : public itk::FunctionBase< itk::RGBPixel< _TScalar >, _TScalar > - { - public: - typedef _TScalar TScalar; - typedef itk::RGBPixel< _TScalar > TPixel; - typedef RGBToSingleChannelFunctor Self; - typedef itk::FunctionBase< TPixel, TScalar > Superclass; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; - - enum ChannelType - { - Red = 0, - Green, - Blue, - Hue, - Saturation, - Value - }; - - public: - itkNewMacro( Self ); - itkTypeMacro( RGBToSingleChannelFunctor, itkFunctionBase ); - - itkGetConstMacro( Channel, ChannelType ); - itkSetMacro( Channel, ChannelType ); - - public: - bool IsChannelRed( ) const; - bool IsChannelGreen( ) const; - bool IsChannelBlue( ) const; - bool IsChannelHue( ) const; - bool IsChannelSaturation( ) const; - bool IsChannelValue( ) const; - - void SetChannelToRed( ); - void SetChannelToGreen( ); - void SetChannelToBlue( ); - void SetChannelToHue( ); - void SetChannelToSaturation( ); - void SetChannelToValue( ); - - virtual TScalar Evaluate( const TPixel& pixel ) const override; - - protected: - RGBToSingleChannelFunctor( ); - virtual ~RGBToSingleChannelFunctor( ); - - private: - // Purposely not implemented. - RGBToSingleChannelFunctor( const Self& ); - void operator=( const Self& ); - - protected: - ChannelType m_Channel; - }; - - } // ecapseman - -} // ecapseman - -#ifndef ITK_MANUAL_INSTANTIATION -# include -#endif // ITK_MANUAL_INSTANTIATION - -#endif // __cpExtensions__Algorithms__RGBToSingleChannelFunctor__h__ - -// eof - $RCSfile$