Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's 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 #include "HxCategories.h"
00016 
00017 
00018 template<class DstValT, class SrcValT>
00019 class HxUpoGetPixElt
00020 {
00021 public:
00023     typedef HxTagTransInVar TransVarianceCategory;
00024 
00025                     HxUpoGetPixElt(HxTagList& tags);
00026 
00027     DstValT         doIt(const SrcValT& x)
00028                         { return x.getValue(_dim);}
00029 
00030     static HxString className()
00031                         { return HxString("getPixelElement"); }
00032 
00033 private:
00034     int             _dim;
00035 };
00036 
00037 template<class DstValT, class SrcValT>
00038 inline
00039 HxUpoGetPixElt<DstValT, SrcValT>::HxUpoGetPixElt(HxTagList& tags)
00040 {
00041     _dim = HxGetTag(tags, "dimension", int(1));
00042     if (_dim < 0)
00043         _dim = 1;
00044     _dim = ((_dim - 1) % 3) + 1;
00045 }
00046 
00047 #endif
00048 

Generated on Tue Feb 3 14:18:43 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001