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

itkColorTable.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkColorTable.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/04/21 19:13:00 $
00007   Version:   $Revision: 1.9 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkColorTable_h
00018 #define __itkColorTable_h
00019 
00020 #include <itkObject.h>
00021 #include <stdio.h>
00022 #include <itkRGBPixel.h>
00023 #include <itkObjectFactory.h>
00024 
00025 namespace itk 
00026 {
00033 template<class TPixel>
00034 class ITK_EXPORT ColorTable : public Object
00035 {
00036 public:
00038   typedef ColorTable   Self;
00039   typedef Object Superclass;
00040   typedef SmartPointer<Self>  Pointer;
00041   typedef SmartPointer<const Self>  ConstPointer;
00042   
00044   itkNewMacro(Self);
00045 
00047   itkTypeMacro(ColorTable,Object);
00048 
00050   void    useDiscrete(void);
00051   void    useGray(int n=256);
00052   void    useHeat(int n=256);
00053   int     size(void);
00054   RGBPixel<TPixel>*          color(int c);
00055   
00058   TPixel  color(int c, char rgb);
00059   char *  colorName(int c);
00060    
00061 protected:
00062   ColorTable();
00063   virtual ~ColorTable();
00064 
00065   int                  m_NumberOfColors;
00066   RGBPixel<TPixel> *   m_Color;
00067   char **              m_ColorName;
00068 
00069 private:
00070   ColorTable(const Self&); //purposely not implemented
00071   void operator=(const Self&); //purposely not implemented
00072 };
00073 
00074 
00075 }// namespace itk
00076 
00077 #ifndef ITK_MANUAL_INSTANTIATION
00078 #include "itkColorTable.txx"
00079 #endif
00080 
00081 #endif

Generated at Fri May 21 01:14:32 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000