Main Page   Class Overview   Pixels   Images   Geometry   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 
00018 
00019 template<class DstValT, class SrcValT>
00020 class HxUpoThreshold
00021 {
00022 public:
00023                     HxUpoThreshold(HxTagList& tags)
00024                         { _level = HxGetTag<HxValue>(tags, "level"); }
00025 
00026     DstValT         doIt(const SrcValT& x)
00027                         { return x >= _level ? HxScalarInt(1) : HxScalarInt(0);}
00028 
00029     static HxString className()
00030                         { return HxString("threshold"); }
00031 
00032 private:
00033     SrcValT         _level;
00034 };
00035 
00036 #endif
00037 

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