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

itkNumericTraitsRGBPixel.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkNumericTraitsRGBPixel.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/09/19 22:32:46 $
00007   Version:   $Revision: 1.11 $
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 __itkNumericTraitsRGBPixel_h
00018 #define __itkNumericTraitsRGBPixel_h
00019 
00020 #include "itkNumericTraits.h"
00021 #include "itkRGBPixel.h"
00022 
00023 namespace itk
00024 {
00025 
00030 template <>
00031 class NumericTraits<RGBPixel<unsigned char> > {
00032 public:
00033   typedef unsigned char ValueType;
00034   typedef RGBPixel<unsigned char> PrintType;
00035   typedef RGBPixel<unsigned char> AbsType;
00036   typedef RGBPixel<unsigned short> AccumulateType;
00037   typedef RGBPixel<double> RealType;
00038   typedef double           ScalarRealType;
00039   typedef RGBPixel<float>  FloatType;
00040   static const RGBPixel<unsigned char> ITKCommon_EXPORT Zero;
00041   static const RGBPixel<unsigned char> ITKCommon_EXPORT One;
00042   static RGBPixel<unsigned char> ZeroValue() { return Zero; }
00043   
00044 };
00049 template <>
00050 class NumericTraits<RGBPixel<unsigned short> > {
00051 public:
00052   typedef unsigned short           ValueType;
00053   typedef RGBPixel<unsigned short> PrintType;
00054   typedef RGBPixel<unsigned short> AbsType;
00055   typedef RGBPixel<unsigned int>   AccumulateType;
00056   typedef RGBPixel<double> RealType;
00057   typedef double           ScalarRealType;
00058   typedef RGBPixel<float>  FloatType;
00059   static const RGBPixel<unsigned short> ITKCommon_EXPORT Zero;
00060   static const RGBPixel<unsigned short> ITKCommon_EXPORT One;
00061   static RGBPixel<unsigned short> ZeroValue() { return Zero; }
00062   
00063 };
00064 
00065 } // end namespace itk
00066 
00067 #endif // __itkNumericTraitsRGBPixel_h
00068 

Generated at Sun Sep 23 13:45:46 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000