00001 /* 00002 * Copyright (c) 2000, University of Amsterdam, The Netherlands. 00003 * All rights reserved. 00004 * 00005 * Author(s): 00006 * Dennis Koelma (koelma@wins.uva.nl) 00007 * 00008 */ 00009 00010 #ifndef HxRgbLuv_h 00011 #define HxRgbLuv_h 00012 00013 #include "HxTagList.h" 00014 #include "HxClassName.h" 00015 #include "HxColConvert.h" 00016 00017 00021 template<class ValT, class ValDoubleT> 00022 class HxRgbLuv 00023 { 00024 public: 00025 HxRgbLuv(HxTagList&) 00026 {} 00027 00028 int doIt(const ValT& pixV) 00029 { 00030 return HxColRGB2int(HxColXYZ2RGB( 00031 HxColLuv2XYZ((HxVec3Double) pixV))); 00032 } 00033 00034 int doItDouble(const ValDoubleT& pixV) 00035 { 00036 return HxColRGB2int(HxColXYZ2RGB( 00037 HxColLuv2XYZ((HxVec3Double) pixV))); 00038 } 00039 00040 static HxString className() 00041 { return HxString("Luv"); } 00042 }; 00043 00044 00045 #endif