Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

firfilter.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           firfilter.h  -  description
00003                              -------------------
00004     begin                : Wed Jun 11 2003
00005     copyright            : (C) 2003 by Peter Haase
00006     email                : p.haase@tuhh.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 #ifndef FIRFILTER_H
00029 #define FIRFILTER_H
00030 
00031 
00032 #include <simthetic/phbib.h>
00033 #include <simthetic/containers.h>
00034 
00035 namespace simthlib
00036 {
00037 
00038 
00039 template<class T>
00040 class Filter
00041 {
00042   public:
00043     virtual ~Filter() {};
00046     virtual void filter(const simth::Array2d<T>& symbols, simth::Array2d<T>* filteredSymbols) = 0;
00047 
00050     virtual void print(std::ostream &os) const = 0;
00051 };
00052 
00056 template<class T>
00057 class FirFilter2D : public Filter<T>
00058 {
00059   public:
00060 
00063     enum Filter_Shape { RECT, CONE, HAMMING };
00064 
00067     FirFilter2D(int numFilterCoeffDim1,int numFilterCoeffDim2,Filter_Shape filterMode);
00068 
00071     virtual ~FirFilter2D();
00072 
00075     virtual void filter(const simth::Array2d<T>& symbols, simth::Array2d<T>* filteredSymbols);
00076 
00079     virtual void print(std::ostream &os) const;
00080 
00081   private:
00082 
00085     simth::Array2d<double> filterCoefficients;
00086 
00090     int sideLength1;
00091 
00094     int sideLength2;
00095 
00099     std::string fShapeStr;
00100 };
00101 
00102 }
00103 
00104 #endif

Generated on Tue Aug 9 14:35:10 2005 for simtheticlib by  doxygen 1.4.1