Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxUpoThreshold.h

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 HxUpoThreshold_h
00011 #define HxUpoThreshold_h
00012 
00013 #include "HxValue.h"
00014 #include "HxTagList.h"
00015 #include "HxClassName.h"
00016 #include "HxScalarInt.h"
00017 #include "HxCategories.h"
00018 
00019 
00020 template<class DstValT, class SrcValT>
00021 class HxUpoThreshold
00022 {
00023 public:
00025     typedef HxTagTransInVar TransVarianceCategory;
00026 
00027                     HxUpoThreshold(HxTagList& tags)
00028                         { _level = HxGetTag<HxValue>(tags, "level"); }
00029 
00030     DstValT         doIt(const SrcValT& x)
00031                         { return x >= _level ? HxScalarInt(1) : HxScalarInt(0);}
00032 
00033     static HxString className()
00034                         { return HxString("threshold"); }
00035 
00036 private:
00037     SrcValT         _level;
00038 };
00039 
00040 #endif
00041 

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