projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r521: no message
[ctsim.git]
/
include
/
filter.h
diff --git
a/include/filter.h
b/include/filter.h
index 492f93dd2030be17cb72402801a4f2556fe1ce04..2dd5ed5f074d7dee0fb9572cd84125747c9cf325 100644
(file)
--- a/
include/filter.h
+++ b/
include/filter.h
@@
-7,9
+7,9
@@
** Date Started: June 2000
**
** This is part of the CTSim program
** 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.2
0 2000/08/19 22:59:06
kevin Exp $
+** $Id: filter.h,v 1.2
5 2001/02/11 04:56:37
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
**
** 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
@@
-37,8
+37,6
@@
#include <rfftw.h>
#endif
#include <rfftw.h>
#endif
-#include <complex>
-
// CLASS IDENTIFICATION
// SignalFilter A filter used to process signals
// CLASS IDENTIFICATION
// SignalFilter A filter used to process signals
@@
-79,10
+77,10
@@
class SignalFilter {
{ return m_adFilter; }
bool fail(void) const {return m_fail;}
{ return m_adFilter; }
bool fail(void) const {return m_fail;}
- const string& failMessage(void) const {return m_failMessage;}
+ const st
d::st
ring& failMessage(void) const {return m_failMessage;}
- const st
ring& nameFilter(void) const
{ return m_nameFilter;}
- const st
ring& nameDomain(void) const
{ return m_nameDomain;}
+ const st
d::string& nameFilter(void) const
{ return m_nameFilter;}
+ const st
d::string& nameDomain(void) const
{ return m_nameDomain;}
const int idFilter(void) const { return m_idFilter;}
const int idDomain(void) const { return m_idDomain;}
const int idFilter(void) const { return m_idFilter;}
const int idDomain(void) const { return m_idDomain;}
@@
-105,6
+103,8
@@
class SignalFilter {
static void setNumIntegral(int nIntegral) {N_INTEGRAL = nIntegral;}
static const int getFilterCount() {return s_iFilterCount;}
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);
static const char** getFilterNameArray() {return s_aszFilterName;}
static const char** getFilterTitleArray() {return s_aszFilterTitle;}
static int convertFilterNameToID (const char* const filterName);
@@
-118,6
+118,12
@@
class SignalFilter {
static const char* convertDomainIDToName (const int idDomain);
static const char* convertDomainIDToTitle (const int idDomain);
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;
private:
int m_nFilterPoints;
double m_dBandwidth;
@@
-127,17
+133,18
@@
class SignalFilter {
double m_dFilterMax;
double* m_adFilter;
double m_dFilterMax;
double* m_adFilter;
- string m_nameFilter;
- string m_nameDomain;
+ st
d::st
ring m_nameFilter;
+ st
d::st
ring m_nameDomain;
int m_idFilter;
int m_idDomain;
bool m_fail;
int m_idFilter;
int m_idDomain;
bool m_fail;
- string m_failMessage;
+ st
d::st
ring m_failMessage;
static const char* s_aszFilterName[];
static const char* s_aszFilterTitle[];
static const int s_iFilterCount;
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;
static const char* s_aszDomainName[];
static const char* s_aszDomainTitle[];
static const int s_iDomainCount;
@@
-154,8
+161,6
@@
class SignalFilter {
double spatialResponseAnalytic (double x) const;
double frequencyResponse (double u) const;
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)); }
};
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)); }
};