MNE-CPP  beta 1.0
filteroperator.h
Go to the documentation of this file.
1 //=============================================================================================================
48 #ifndef FILTEROPERATOR_H
49 #define FILTEROPERATOR_H
50 
51 //*************************************************************************************************************
52 //=============================================================================================================
53 // INCLUDES
54 //=============================================================================================================
55 
56 #include "mneoperator.h"
57 #include "types.h"
58 
59 
60 //*************************************************************************************************************
61 //=============================================================================================================
62 // MNE INCLUDES
63 //=============================================================================================================
64 
65 #include <fiff/fiff.h>
66 #include <mne/mne.h>
67 #include <utils/parksmcclellan.h>
68 #include <utils/cosinefilter.h>
69 
70 
71 //*************************************************************************************************************
72 //=============================================================================================================
73 // Eigen INCLUDES
74 //=============================================================================================================
75 
76 #include <Eigen/Core>
77 #include <Eigen/SparseCore>
78 #include <unsupported/Eigen/FFT>
79 
80 #ifndef EIGEN_FFTW_DEFAULT
81 #define EIGEN_FFTW_DEFAULT
82 #endif
83 
84 
85 //*************************************************************************************************************
86 //=============================================================================================================
87 // USED NAMESPACES
88 //=============================================================================================================
89 
90 using namespace MNELIB;
91 using namespace Eigen;
92 using namespace UTILSLIB;
93 
94 //*************************************************************************************************************
95 //=============================================================================================================
96 // DEFINE NAMESPACE MNEBrowseRawQt
97 //=============================================================================================================
98 
99 namespace MNEBrowseRawQt
100 {
101 
102 //=============================================================================================================
107 {
108 public:
109  enum DesignMethod {
110  Tschebyscheff,
111  Cosine} m_designMethod;
112 
113  enum FilterType {
114  LPF,
115  HPF,
116  BPF,
117  NOTCH
118  } m_Type;
119 
120  FilterOperator();
121 
122  //=========================================================================================================
135  FilterOperator(QString unique_name, FilterType type, int order, double centerfreq, double bandwidth, double parkswidth, double sFreq, qint32 fftlength=4096, DesignMethod method = Cosine);
136 
137  ~FilterOperator();
138 
139  //=========================================================================================================
143  void fftTransformCoeffs();
144 
145  //=========================================================================================================
152  RowVectorXd applyFFTFilter(const RowVectorXd& data) const;
153 
154  double m_sFreq;
157  double m_dCenterFreq;
158  double m_dBandwidth;
160  QString m_sName;
162  RowVectorXd m_dCoeffA;
163  RowVectorXd m_dCoeffB;
165  RowVectorXcd m_dFFTCoeffA;
166  RowVectorXcd m_dFFTCoeffB;
167 };
168 
169 } // NAMESPACE
170 
171 #endif // FILTEROPERATOR_H
Contains general application specific types.
Contains all MNEOperators.
Declaration of the CosineFilter class.
FIFF class declaration, which provides static wrapper functions to stay consistent with mne matlab to...