X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=include%2Ffilter.h;h=8aa4018970caa4939482bd7d42f003d557f91c39;hb=ca7c001fce978b680543f8338a404b8c0701a935;hp=ca6e67b0314e405d91bbfbf8711bd2353a37f78e;hpb=dc034c9d0b7d9c3874a324a4c2c189a02945adc8;p=ctsim.git diff --git a/include/filter.h b/include/filter.h index ca6e67b..8aa4018 100644 --- a/include/filter.h +++ b/include/filter.h @@ -7,9 +7,9 @@ ** Date Started: June 2000 ** ** This is part of the CTSim program -** Copyright (C) 1983-2000 Kevin Rosenberg +** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: filter.h,v 1.22 2000/12/16 06:12:47 kevin Exp $ +** $Id: filter.h,v 1.26 2001/02/16 00:28:41 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -53,11 +53,13 @@ class SignalFilter { static const int FILTER_ABS_BANDLIMIT; // filter times |x| static const int FILTER_ABS_SINC; static const int FILTER_ABS_G_HAMMING; + static const int FILTER_ABS_HANNING; static const int FILTER_ABS_COSINE; static const int FILTER_SHEPP; static const int FILTER_BANDLIMIT; static const int FILTER_SINC; static const int FILTER_G_HAMMING; + static const int FILTER_HANNING; static const int FILTER_COSINE; static const int FILTER_TRIANGLE; @@ -103,6 +105,8 @@ class SignalFilter { static void setNumIntegral(int nIntegral) {N_INTEGRAL = nIntegral;} static const int getFilterCount() {return s_iFilterCount;} + static const int getReconstructFilterCount() { return s_iReconstructFilterCount; } + static const char** getFilterNameArray() {return s_aszFilterName;} static const char** getFilterTitleArray() {return s_aszFilterTitle;} static int convertFilterNameToID (const char* const filterName); @@ -116,6 +120,12 @@ class SignalFilter { static const char* convertDomainIDToName (const int idDomain); static const char* convertDomainIDToTitle (const int idDomain); + static double sinc (double x) + { return (fabs(x) > F_EPSILON ? (sin (x) / x) : 1.0); } + + static double sinc (double x, double mult) + { return (fabs(x) > F_EPSILON ? (sin (x * mult) / x) : 1.0); } + private: int m_nFilterPoints; double m_dBandwidth; @@ -136,6 +146,7 @@ class SignalFilter { static const char* s_aszFilterName[]; static const char* s_aszFilterTitle[]; static const int s_iFilterCount; + static const int s_iReconstructFilterCount; static const char* s_aszDomainName[]; static const char* s_aszDomainTitle[]; static const int s_iDomainCount; @@ -152,8 +163,6 @@ class SignalFilter { double spatialResponseAnalytic (double x) const; double frequencyResponse (double u) const; - static double sinc (double x, double mult) - { return (fabs(x) > F_EPSILON ? (sin (x * mult) / x) : 1.0); } static double integral_abscos (double u, double w) { return (fabs (u) > F_EPSILON ? (cos (u * w) - 1) / (u * u) + w / u * sin (u * w) : (w * w / 2)); } };