00001 /// \file CATFilter.h 00002 /// \brief Parent filtering class for one-dimensional filters. 00003 /// \ingroup CAT 00004 /// 00005 /// Copyright (c) 2003-2008 by Michael Ellison. 00006 /// See COPYING.txt for the \ref gaslicense License (MIT License). 00007 /// 00008 // $Author: mikeellison $ 00009 // $Date: 2008-01-19 19:19:35 -0600 (Sat, 19 Jan 2008) $ 00010 // $Revision: $ 00011 // $NoKeywords: $ 00012 00013 #ifndef _CATFilter_H_ 00014 #define _CATFilter_H_ 00015 00016 #include "CATInternal.h" 00017 #include "CATMathUtil.h" 00018 00019 /// \class CATFilter 00020 /// \brief Parent filtering class for one-dimensional filters. 00021 /// \ingroup CAT 00022 /// 00023 /// The base class performs no filtering. Filters should be derived 00024 /// from it to present a common interface. 00025 class CATFilter 00026 { 00027 public: 00028 CATFilter(); 00029 virtual ~CATFilter(); 00030 00031 /// Filter() is the primary command for all derived classes, 00032 /// but it's now inlined for speed instead of being virtual. 00033 /// CATFloat32 Filter(); 00034 00035 /// GetLastFiltered() retrieves the last output value from the filter. 00036 /// 00037 /// \return CATFloat32 - last output from Filter() call. 00038 /// \sa Filter(), GetLastRaw() 00039 CATFloat32 GetLastFiltered(); 00040 00041 /// GetCount() retrieves the number of items filtered since the last 00042 /// reset (or since instantiation). 00043 /// 00044 /// \return CATUInt32 - number of filtered inputs 00045 /// \sa Reset() 00046 CATUInt32 GetCount(); 00047 00048 /// Reset() resets the filter and filter count. 00049 virtual void Reset(); 00050 00051 protected: 00052 CATFloat32 fLastFiltered; 00053 }; 00054 00055 00056 #endif // _CATFilter_H_