Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkCustomColormapFunctor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCustomColormapFunctor.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-05-15 19:22:31 $
00007   Version:   $Revision: 1.2 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
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&); //purposely not implemented
00096   void operator=(const Self&); //purposely not implemented
00097 
00098   ChannelType        m_RedChannel;
00099   ChannelType        m_GreenChannel;
00100   ChannelType        m_BlueChannel;
00101 
00102 };
00103 
00104 } // end namespace functor
00105 
00106 } // end namespace itk
00107 
00108 #ifndef ITK_MANUAL_INSTANTIATION
00109 #include "itkCustomColormapFunctor.txx"
00110 #endif
00111 
00112 #endif
00113 

Generated at Mon Jul 12 2010 18:11:28 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000