MNE-CPP
0.1.9
A Framework for Electrophysiology
|
Filter declarations. More...
#include "rtprocessing_global.h"
#include "helpers/filterkernel.h"
#include <fiff/fiff_info.h>
#include <QSharedPointer>
#include <QtConcurrent/QtConcurrent>
#include <Eigen/Core>
#include <unsupported/Eigen/FFT>
Go to the source code of this file.
Classes | |
struct | RTPROCESSINGLIB::FilterObject |
class | RTPROCESSINGLIB::FilterOverlapAdd |
Filtering with FFT convolution and the overlap add method for continous data streams. More... | |
Functions | |
RTPROCESINGSHARED_EXPORT bool | RTPROCESSINGLIB::filterFile (QIODevice &pIODevice, QSharedPointer< FIFFLIB::FiffRawData > pFiffRawData, int type, double dCenterfreq, double dBandwidth, double dTransition, double dSFreq, int iOrder=4096, int designMethod=FilterKernel::m_designMethods.indexOf(FilterParameter("Cosine")), const Eigen::RowVectorXi &vecPicks=Eigen::RowVectorXi(), bool bUseThreads=true) |
RTPROCESINGSHARED_EXPORT bool | RTPROCESSINGLIB::filterFile (QIODevice &pIODevice, QSharedPointer< FIFFLIB::FiffRawData > pFiffRawData, const RTPROCESSINGLIB::FilterKernel &filterKernel, const Eigen::RowVectorXi &vecPicks=Eigen::RowVectorXi(), bool bUseThreads=false) |
RTPROCESINGSHARED_EXPORT Eigen::MatrixXd | RTPROCESSINGLIB::filterData (const Eigen::MatrixXd &matData, int type, double dCenterfreq, double dBandwidth, double dTransition, double dSFreq, int iOrder=1024, int designMethod=FilterKernel::m_designMethods.indexOf(FilterParameter("Cosine")), const Eigen::RowVectorXi &vecPicks=Eigen::RowVectorXi(), bool bUseThreads=true, bool bKeepOverhead=false) |
RTPROCESINGSHARED_EXPORT Eigen::MatrixXd | RTPROCESSINGLIB::filterData (const Eigen::MatrixXd &mataData, const RTPROCESSINGLIB::FilterKernel &filterKernel, const Eigen::RowVectorXi &vecPicks=Eigen::RowVectorXi(), bool bUseThreads=true, bool bKeepOverhead=false) |
RTPROCESINGSHARED_EXPORT Eigen::MatrixXd | RTPROCESSINGLIB::filterDataBlock (const Eigen::MatrixXd &mataData, const Eigen::RowVectorXi &vecPicks, const RTPROCESSINGLIB::FilterKernel &filterKernel, bool bUseThreads=true) |
RTPROCESINGSHARED_EXPORT void | RTPROCESSINGLIB::filterChannel (FilterObject &channelDataTime) |
Filter declarations.
Copyright (C) 2020, Ruben Doerfel, Lorenz Esch. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file filter.h.
void RTPROCESSINGLIB::filterChannel | ( | RTPROCESSINGLIB::FilterObject & | channelDataTime | ) |
This function is used to filter row-wise in parallel threads
[in] | channelDataTime | The channel data to perform the filtering on. |
Definition at line 376 of file filter.cpp.
RTPROCESINGSHARED_EXPORT Eigen::MatrixXd RTPROCESSINGLIB::filterData | ( | const Eigen::MatrixXd & | mataData, |
const RTPROCESSINGLIB::FilterKernel & | filterKernel, | ||
const Eigen::RowVectorXi & | vecPicks = Eigen::RowVectorXi() , |
||
bool | bUseThreads = true , |
||
bool | bKeepOverhead = false |
||
) |
Calculates the filtered version of the raw input data based on a given list filters The data needs to be present all at once. For continous filtering via overlap add use the FilterOverlapAdd class.
[in] | mataData | The data which is to be filtered. |
[in] | filterKernel | The list of filter kernels to use. |
[in] | vecPicks | Channel indexes to filter. Default is filter all channels. |
[in] | bUseThreads | Whether to use multiple threads. Default is set to true. |
[in] | bKeepOverhead | Whether to keep the delayed part of the data after filtering. Default is set to false . |
RTPROCESINGSHARED_EXPORT Eigen::MatrixXd RTPROCESSINGLIB::filterData | ( | const Eigen::MatrixXd & | matData, |
int | type, | ||
double | dCenterfreq, | ||
double | dBandwidth, | ||
double | dTransition, | ||
double | dSFreq, | ||
int | iOrder = 1024 , |
||
int | designMethod = FilterKernel::m_designMethods.indexOf(FilterParameter("Cosine")) , |
||
const Eigen::RowVectorXi & | vecPicks = Eigen::RowVectorXi() , |
||
bool | bUseThreads = true , |
||
bool | bKeepOverhead = false |
||
) |
Creates a user designed filter kernel and filters the raw input data. The data needs to be present all at once. For continous filtering via overlap add use the FilterOverlapAdd class.
[in] | matData | The data which is to be filtered. |
[in] | type | The type of the filter: LPF, HPF, BPF, NOTCH (from enum FilterType). |
[in] | dCenterfreq | The center of the frequency. |
[in] | dBandwidth | The filter bandwidth. Ignored if FilterType is set to LPF,HPF. If NOTCH/BPF: bandwidth of stop-/passband. |
[in] | dTransition | The transistion band determines the width of the filter slopes (steepness). |
[in] | dSFreq | The input data sampling frequency. |
[in] | iOrder | Represents the order of the filter, the higher the higher is the stopband attenuation. Default is 1024 taps. |
[in] | designMethod | The design method to use. Choose between Cosine and Tschebyscheff. Defaul is set to Cosine. |
[in] | vecPicks | Channel indexes to filter. Default is filter all channels. |
[in] | bUseThreads | Whether to use multiple threads. Default is set to true. |
[in] | bKeepOverhead | Whether to keep the delayed part of the data after filtering. Default is set to false . |
RTPROCESINGSHARED_EXPORT Eigen::MatrixXd RTPROCESSINGLIB::filterDataBlock | ( | const Eigen::MatrixXd & | mataData, |
const Eigen::RowVectorXi & | vecPicks, | ||
const RTPROCESSINGLIB::FilterKernel & | filterKernel, | ||
bool | bUseThreads = true |
||
) |
Calculates the filtered version of the raw input data block. Always returns the data with half the filter length delay in the front and back.
[in] | mataData | The data which is to be filtered. |
[in] | vecPicks | The used channel as index in RowVector. |
[in] | filterKernel | The FilterKernel to to filter the data with. |
[in] | bUseThreads | Whether to use multiple threads. |
RTPROCESINGSHARED_EXPORT bool RTPROCESSINGLIB::filterFile | ( | QIODevice & | pIODevice, |
QSharedPointer< FIFFLIB::FiffRawData > | pFiffRawData, | ||
const RTPROCESSINGLIB::FilterKernel & | filterKernel, | ||
const Eigen::RowVectorXi & | vecPicks = Eigen::RowVectorXi() , |
||
bool | bUseThreads = false |
||
) |
Filters data from an input file based on an exisiting filter kernel and writes the filtered data to a pIODevice.
[in] | pIODevice | The IO device to write to. |
[in] | pFiffRawData | The fiff raw data object to read from. |
[in] | filterKernel | The list of filter kernels to use. |
[in] | vecPicks | Channel indexes to filter. Default is filter all channels. |
[in] | bUseThreads | hether to use multiple threads. Default is set to true. |
RTPROCESINGSHARED_EXPORT bool RTPROCESSINGLIB::filterFile | ( | QIODevice & | pIODevice, |
QSharedPointer< FIFFLIB::FiffRawData > | pFiffRawData, | ||
int | type, | ||
double | dCenterfreq, | ||
double | dBandwidth, | ||
double | dTransition, | ||
double | dSFreq, | ||
int | iOrder = 4096 , |
||
int | designMethod = FilterKernel::m_designMethods.indexOf(FilterParameter("Cosine")) , |
||
const Eigen::RowVectorXi & | vecPicks = Eigen::RowVectorXi() , |
||
bool | bUseThreads = true |
||
) |
Creates a user designed filter kernel, filters data from an input file and writes the filtered data to a pIODevice.
[in] | pIODevice | The IO device to write to. |
[in] | pFiffRawData | The fiff raw data object to read from. |
[in] | type | The type of the filter: LPF, HPF, BPF, NOTCH (from enum FilterType). |
[in] | dCenterfreq | The center of the frequency. |
[in] | dBandwidth | The filter bandwidth. Ignored if FilterType is set to LPF,HPF. If NOTCH/BPF: bandwidth of stop-/passband. |
[in] | dTransition | The transistion band determines the width of the filter slopes (steepness). |
[in] | dSFreq | The input data sampling frequency. |
[in] | iOrder | Represents the order of the filter, the higher the higher is the stopband attenuation. Default is 4096 taps. |
[in] | designMethod | The design method to use. Choose between Cosine and Tschebyscheff. Defaul is set to Cosine. |
[in] | vecPicks | Channel indexes to filter. Default is filter all channels. |
[in] | bUseThreads | hether to use multiple threads. Default is set to true. |