Main Page   Class Overview   Pixels   Images   Geometry   Quick Index  

HxUpoGetPixElt.h

00001 /*
00002  *  Copyright (c) 2000, University of Amsterdam, The Netherlands.
00003  *  All rights reserved.
00004  *
00005  *  Author(s):
00006  *  Edo Poll (poll@wins.uva.nl)
00007  *
00008  */
00009 
00010 #ifndef HxUpoGetPixElt_h
00011 #define HxUpoGetPixElt_h
00012 
00013 #include "HxTagList.h"
00014 #include "HxClassName.h"
00015 
00016 
00017 template<class DstValT, class SrcValT>
00018 class HxUpoGetPixElt
00019 {
00020 public:
00021                     HxUpoGetPixElt(HxTagList& tags);
00022 
00023     DstValT         doIt(const SrcValT& x)
00024                         { return x.getValue(_dim);}
00025 
00026     static HxString className()
00027                         { return HxString("getPixelElement"); }
00028 
00029 private:
00030     int             _dim;
00031 };
00032 
00033 template<class DstValT, class SrcValT>
00034 inline
00035 HxUpoGetPixElt<DstValT, SrcValT>::HxUpoGetPixElt(HxTagList& tags)
00036 {
00037     _dim = HxGetTag(tags, "dimension", int(1));
00038     if (_dim < 0)
00039         _dim = 1;
00040     _dim = ((_dim - 1) % 3) + 1;
00041 }
00042 
00043 #endif
00044 

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