X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Ffilter.h;fp=include%2Ffilter.h;h=7b696b29e8553fd89e99d2b7dd67fa53a72a1a47;hp=ca6e67b0314e405d91bbfbf8711bd2353a37f78e;hb=ed576a069b0ba9de2e9153707012eba620ac606e;hpb=7f8f356151b0c8db0dbbf1c1896cc22630d6c774 diff --git a/include/filter.h b/include/filter.h index ca6e67b..7b696b2 100644 --- a/include/filter.h +++ b/include/filter.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: filter.h,v 1.22 2000/12/16 06:12:47 kevin Exp $ +** $Id: filter.h,v 1.23 2001/01/12 21:53:27 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 @@ -116,6 +116,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; @@ -152,8 +158,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)); } };