ConnectivitySettings
Namespace: CONNECTIVITYLIB · Library: Connectivity Library · Source: connectivity/connectivitysettings.h
#include <connectivity/connectivitysettings.h>
class CONNECTIVITYLIB::ConnectivitySettings
Mutable container that aggregates the inputs and intermediate spectral results required by every metric implementation in CONNECTIVITYLIB.
Each call to CONNECTIVITYLIB::ConnectivitySettings::append "append" adds one trial; the trial matrices live in m_trialData, while DPSS tapered spectra, cross-spectral densities and their imaginary-part derivatives are filled in lazily by whichever metric runs first. Cross-trial sums accumulate in m_intermediateSumData so that a second metric run on the same data set reuses those sums and skips the FFT pass entirely. Node positions can be derived from a FiffInfo (sensor space) or from a forward solution + FsSurfaceSet (source space) and are propagated into the resulting Network nodes.
Aggregates trial data, spectral cache and node geometry shared by all CONNECTIVITYLIB metrics.
Public Methods
ConnectivitySettings()
Constructs a ConnectivitySettings object.
clearAllData()
clearIntermediateData()
append(matInputData)
append(matInputData)
append(inputData)
at(i)
size()
isEmpty()
removeFirst(iAmount)
removeLast(iAmount)
setConnectivityMethods(sConnectivityMethods)
getConnectivityMethods()
setSamplingFrequency(iSFreq)
getSamplingFrequency()
setFFTSize(iNfft)
getFFTSize()
setWindowType(sWindowType)
getWindowType()
setNodePositions(fiffInfo, picks)
setNodePositions(forwardSolution, surfSet)
setNodePositions(matNodePositions)
getNodePositions()
getTrialData()
getIntermediateSumData()
Used in examples
ex_connectivity
Sensor- or source-level functional connectivity of averaged MEG/EEG data with a selectable metric, shown as a 3D network.
ConnectivitySettings m_settings;
RtConnectivity::SPtr m_pRtConnectivity;
QList<Network> m_networkData;
QMap<QString, Vector4i> mColor;
ex_dsp_rt
DSP real-time workers: averaging, covariance, noise spectrum, connectivity, HPI fitting and inverse operators.
// ---------------------------------------------------------------------------------------------------------
// Connectivity: the same network as Connectivity::calculate, computed on a worker thread
ConnectivitySettings settings;
for (int trial = 0; trial < 5; ++trial) {
MatrixXd data(2, 256);
for (int t = 0; t < 256; ++t) {
const double alpha = std::sin(2.0 * kPi * 10.0 * t / 256.0 + trial);
data(0, t) = alpha + 0.3 * normal(gen) * 1e12;
data(1, t) = alpha + 0.3 * normal(gen) * 1e12;
}
settings.append(data);
}
settings.setSamplingFrequency(256);
settings.setFFTSize(256);
ex_connectivity_comparison
Compare connectivity metrics side by side on the same averaged sensor- or source-level data.
ConnectivitySettings conSettings;
Also used in ex_connectivity_metrics, ex_connectivity_performance.
Authors of this file
- Lorenz Esch <lorenz.esch@tu-ilmenau.de>
- Daniel Strohmeier <daniel.strohmeier@gmail.com>
- Gabriel Motta <gabrielbenmotta@gmail.com>
- Christoph Dinh <christoph.dinh@mne-cpp.org>