Main Page   Class Overview   Pixels   Images   Geometry   Quick Index  

HxUpoColSpace.h

00001 /*
00002  *  Copyright (c) 2001, University of Amsterdam, The Netherlands.
00003  *  All rights reserved.
00004  *
00005  *  Author(s):
00006  *  Jan-Mark Geusebroek (mark@science.uva.nl)
00007  */
00008 
00009 #ifndef HxUpoColSpace_h
00010 #define HxUpoColSpace_h
00011 
00012 #include "HxTagList.h"
00013 #include "HxClassName.h"
00014 #include "HxColor.h"
00015 
00016 
00019 template<class DstValT, class SrcValT>
00020 class HxUpoColSpace
00021 {
00022 public:
00024                     HxUpoColSpace(HxTagList& tags)
00025                         {
00026                             _fromSpace = HxGetTag<HxColorModel>(tags,
00027                                 "fromColorSpace");
00028                             _toSpace = HxGetTag<HxColorModel>(tags,
00029                                 "toColorSpace");
00030                         }
00031 
00033     DstValT         doIt(const SrcValT& x)
00034                         { return HxColor(x,_fromSpace).convert(_toSpace).value();}
00035 
00037     static HxString className()
00038                         { return HxString("colorSpace"); }
00039 
00040 private:
00041     HxColorModel _fromSpace;
00042     HxColorModel _toSpace;
00043 };
00044 
00045 #endif

Generated on Tue Jan 8 13:59:17 2002 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001