itkCustomColormapFunctor.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkCustomColormapFunctor_h
00018 #define __itkCustomColormapFunctor_h
00019
00020 #include "itkColormapFunctor.h"
00021
00022 #include <vector>
00023
00024 namespace itk {
00025
00026 namespace Functor {
00027
00042 template< class TScalar, class TRGBPixel >
00043 class ITK_EXPORT CustomColormapFunctor
00044 : public ColormapFunctor<TScalar, TRGBPixel>
00045 {
00046 public:
00047
00048 typedef CustomColormapFunctor Self;
00049 typedef ColormapFunctor<TScalar, TRGBPixel> Superclass;
00050 typedef SmartPointer<Self> Pointer;
00051 typedef SmartPointer<const Self> ConstPointer;
00052
00054 itkNewMacro( Self );
00055
00056 typedef typename Superclass::RGBPixelType RGBPixelType;
00057 typedef typename Superclass::ScalarType ScalarType;
00058 typedef typename Superclass::RealType RealType;
00059
00060 typedef std::vector<RealType> ChannelType;
00061
00062 virtual RGBPixelType operator()( const TScalar & ) const;
00063
00064 void SetRedChannel( ChannelType red )
00065 {
00066 m_RedChannel = red;
00067 }
00068 ChannelType GetRedChannel() const
00069 {
00070 return m_RedChannel;
00071 }
00072 void SetGreenChannel( ChannelType green )
00073 {
00074 m_GreenChannel = green;
00075 }
00076 ChannelType GetGreenChannel() const
00077 {
00078 return m_GreenChannel;
00079 }
00080 void SetBlueChannel( ChannelType blue )
00081 {
00082 m_BlueChannel = blue;
00083 }
00084 ChannelType GetBlueChannel() const
00085 {
00086 return m_BlueChannel;
00087 }
00088
00089
00090 protected:
00091 CustomColormapFunctor() {};
00092 ~CustomColormapFunctor() {};
00093
00094 private:
00095 CustomColormapFunctor(const Self&);
00096 void operator=(const Self&);
00097
00098 ChannelType m_RedChannel;
00099 ChannelType m_GreenChannel;
00100 ChannelType m_BlueChannel;
00101
00102 };
00103
00104 }
00105
00106 }
00107
00108 #ifndef ITK_MANUAL_INSTANTIATION
00109 #include "itkCustomColormapFunctor.txx"
00110 #endif
00111
00112 #endif
00113