MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Member Functions | Static Public Member Functions | List of all members
MNELIB::MNE Class Reference

The MNE class provides wrapper functions to stay consistent with mne matlab toolbox. More...

#include <mne.h>

Public Member Functions

virtual ~MNE ()
 

Static Public Member Functions

static Eigen::VectorXd * combine_xyz (const Eigen::VectorXd &vec)
 
static qint32 find_source_space_hemi (MNEHemisphere &p_Hemisphere)
 
static qint32 get_current_comp (FIFFLIB::FiffInfo *info)
 
static Eigen::SparseMatrix< double > * make_block_diag (const Eigen::MatrixXd &A, qint32 n)
 
static bool make_compensator (const FIFFLIB::FiffInfo &info, FIFFLIB::fiff_int_t from, FIFFLIB::fiff_int_t to, FIFFLIB::FiffCtfComp &ctf_comp, bool exclude_comp_chs=false)
 
static FIFFLIB::fiff_int_t make_projector (const QList< FIFFLIB::FiffProj > &projs, const QStringList &ch_names, Eigen::MatrixXd &proj, const QStringList &bads=FIFFLIB::defaultQStringList, Eigen::MatrixXd &U=FIFFLIB::defaultMatrixXd)
 
static qint32 make_projector (FIFFLIB::FiffInfo &info, Eigen::MatrixXd &proj)
 
static bool patch_info (MNEHemisphere &p_Hemisphere)
 
static MNEInverseOperator prepare_inverse_operator (MNEInverseOperator &orig, qint32 nave, float lambda2, bool dSPM, bool sLORETA=false)
 
static bool read_events (QString t_sEventName, QString t_fileRawName, Eigen::MatrixXi &events)
 
static bool read_events_from_fif (QIODevice &p_IODevice, Eigen::MatrixXi &eventlist)
 
static bool read_events_from_ascii (QIODevice &p_IODevice, Eigen::MatrixXi &eventlist)
 
static void setup_compensators (FIFFLIB::FiffRawData &raw, FIFFLIB::fiff_int_t dest_comp, bool keep_comp)
 
static bool read_cov (FIFFLIB::FiffStream::SPtr &p_pStream, const FIFFLIB::FiffDirNode::SPtr &p_Node, FIFFLIB::fiff_int_t cov_kind, FIFFLIB::FiffCov &p_covData)
 
static bool read_inverse_operator (QIODevice &p_pIODevice, MNEInverseOperator &inv)
 
static bool read_forward_solution (QIODevice &p_IODevice, MNEForwardSolution &fwd, bool force_fixed=false, bool surf_ori=false, const QStringList &include=FIFFLIB::defaultQStringList, const QStringList &exclude=FIFFLIB::defaultQStringList)
 
static bool read_source_spaces (FIFFLIB::FiffStream::SPtr &p_pStream, bool add_geom, MNESourceSpace &p_SourceSpace)
 
static bool read_bem_surface (FIFFLIB::FiffStream::SPtr &p_pStream, bool add_geom, FIFFLIB::FiffDirNode::SPtr &p_Tree, QList< MNESurface::SPtr > &p_Surfaces)
 
static QList< FIFFLIB::FiffChInfoset_current_comp (QList< FIFFLIB::FiffChInfo > &chs, FIFFLIB::fiff_int_t value)
 
static bool transform_source_space_to (MNESourceSpace &p_pMNESourceSpace, FIFFLIB::fiff_int_t dest, FIFFLIB::FiffCoordTrans &trans)
 
static void transpose_named_matrix (FIFFLIB::FiffNamedMatrix &mat)
 

Detailed Description

The MNE class provides wrapper functions to stay consistent with mne matlab toolbox.

DECLARE MNE WRAPPER CLASS

Definition at line 85 of file mne.h.

Constructor & Destructor Documentation

◆ ~MNE()

virtual MNELIB::MNE::~MNE ( )
inlinevirtual

dtor

Definition at line 94 of file mne.h.

Member Function Documentation

◆ combine_xyz()

static Eigen::VectorXd* MNELIB::MNE::combine_xyz ( const Eigen::VectorXd &  vec)
inlinestatic

mne_combine_xyz

MNE toolbox root function

Wrapper for the MNEMath::combine_xyz static function

Compute the three Cartesian components of a vector together

Parameters
[in]vecInput row vector [ x1 y1 z1 ... x_n y_n z_n ].
Returns
Output vector [x1^2+y1^2+z1^2 ... x_n^2+y_n^2+z_n^2 ].

Definition at line 111 of file mne.h.

◆ find_source_space_hemi()

static qint32 MNELIB::MNE::find_source_space_hemi ( MNEHemisphere p_Hemisphere)
inlinestatic

mne_block_diag - decoding part

MNE toolbox root function

Wrapper for the MNEForwardSolution::extract_block_diag static function mne_find_source_space_hemi

MNE toolbox root function

Wrapper for the MNESourceSpace::find_source_space_hemi static function

Returns the hemisphere id (FIFFV_MNE_SURF_LEFT_HEMI or FIFFV_MNE_SURF_RIGHT_HEMI) for a source space.

Parameters
[in]p_HemisphereThe hemisphere to investigate.
Returns
the deduced hemisphere id.

Definition at line 140 of file mne.h.

◆ get_current_comp()

static qint32 MNELIB::MNE::get_current_comp ( FIFFLIB::FiffInfo info)
inlinestatic

mne_get_current_comp

MNE toolbox root function

Wrapper for the FiffInfo get_current_comp member function

Get the current compensation in effect in the data

Parameters
[in]infoFiff measurement info.
Returns
the current compensation.

Definition at line 159 of file mne.h.

◆ make_block_diag()

static Eigen::SparseMatrix<double>* MNELIB::MNE::make_block_diag ( const Eigen::MatrixXd &  A,
qint32  n 
)
inlinestatic

mne_block_diag - encoding part

MNE toolbox root function

Wrapper for the MNEForwardSolution::make_block_diag static function

Make a sparse block diagonal matrix

Returns a sparse block diagonal, diagonalized from the elements in "A". "A" is ma x na, comprising bdn=(na/"n") blocks of submatrices. Each submatrix is ma x "n", and these submatrices are placed down the diagonal of the matrix.

Parameters
[in,out]AMatrix which should be diagonlized.
[in,out]nColumns of the submatrices.
Returns
A sparse block diagonal, diagonalized from the elements in "A".

Definition at line 184 of file mne.h.

◆ make_compensator()

static bool MNELIB::MNE::make_compensator ( const FIFFLIB::FiffInfo info,
FIFFLIB::fiff_int_t  from,
FIFFLIB::fiff_int_t  to,
FIFFLIB::FiffCtfComp ctf_comp,
bool  exclude_comp_chs = false 
)
inlinestatic

mne_make_compensator

MNE toolbox root function

Wrapper for the FiffInfo make_compensator member function

Create a compensation matrix to bring the data from one compensation state to another

Parameters
[in]infomeasurement info as returned by the fif reading routines.
[in]fromcompensation in the input data.
[in]todesired compensation in the output.
[out]ctf_compCompensation Matrix.
[in]exclude_comp_chsexclude compensation channels from the output (optional).
Returns
true if succeeded, false otherwise.

Definition at line 207 of file mne.h.

◆ make_projector() [1/2]

static FIFFLIB::fiff_int_t MNELIB::MNE::make_projector ( const QList< FIFFLIB::FiffProj > &  projs,
const QStringList &  ch_names,
Eigen::MatrixXd &  proj,
const QStringList &  bads = FIFFLIB::defaultQStringList,
Eigen::MatrixXd &  U = FIFFLIB::defaultMatrixXd 
)
inlinestatic

make_projector

MNE toolbox root function

Wrapper for the FiffInfo::make_projector static function There exists also a member function which should be preferred: make_projector(MatrixXd& proj, Eigen::MatrixXd& U = defaultUMatrix)

Make an SSP operator

Parameters
[in]projsA set of projection vectors.
[in]ch_namesA cell array of channel names.
[out]projThe projection operator to apply to the data.
[in]badsBad channels to exclude.
[out]UThe orthogonal basis of the projection vectors (optional).
Returns
nproj - How many items in the projector.

Definition at line 236 of file mne.h.

◆ make_projector() [2/2]

static qint32 MNELIB::MNE::make_projector ( FIFFLIB::FiffInfo info,
Eigen::MatrixXd &  proj 
)
inlinestatic

mne_make_projector_info

MNE toolbox root function

Wrapper for the FiffInfo make_projector_info(MatrixXd& proj) member function

Make a SSP operator using the meas info

Parameters
[in]infoFiff measurement info.
[out]projThe projection operator to apply to the data.
Returns
nproj - How many items in the projector.

Definition at line 264 of file mne.h.

◆ patch_info()

static bool MNELIB::MNE::patch_info ( MNEHemisphere p_Hemisphere)
inlinestatic

mne_patch_info

MNE toolbox root function

Wrapper for the MNESourceSpace::patch_info static function

Parameters
[in,out]p_HemisphereThe source space.
Returns
true if succeeded, false otherwise.

Definition at line 282 of file mne.h.

◆ prepare_inverse_operator()

static MNEInverseOperator MNELIB::MNE::prepare_inverse_operator ( MNEInverseOperator orig,
qint32  nave,
float  lambda2,
bool  dSPM,
bool  sLORETA = false 
)
inlinestatic

mne_prepare_inverse_operator

MNE toolbox root function

Wrapper for the MNEInverseOperator prepare_inverse_operator member function

Prepare for actually computing the inverse

Parameters
[in]origThe inverse operator structure read from a file.
[in]naveNumber of averages (scales the noise covariance).
[in]lambda2The regularization factor.
[in]dSPMCompute the noise-normalization factors for dSPM?.
[in]sLORETACompute the noise-normalization factors for sLORETA?.
Returns
the prepared inverse operator.

Definition at line 305 of file mne.h.

◆ read_bem_surface()

static bool MNELIB::MNE::read_bem_surface ( FIFFLIB::FiffStream::SPtr p_pStream,
bool  add_geom,
FIFFLIB::FiffDirNode::SPtr p_Tree,
QList< MNESurface::SPtr > &  p_Surfaces 
)
inlinestatic

mne_read_bem_surface

MNE toolbox root function

Wrapper for the MNESurface::read static function

Reads a BEM surface from a fif stream

Parameters
[in]p_pStreamThe open fiff file.
[in]add_geomAdd geometry information to the source spaces.
[in]p_TreeSearch for the source spaces here.
[in,out]p_SurfacesThe read bem surfaces.
Returns
true if succeeded, false otherwise.

Definition at line 480 of file mne.h.

◆ read_cov()

static bool MNELIB::MNE::read_cov ( FIFFLIB::FiffStream::SPtr p_pStream,
const FIFFLIB::FiffDirNode::SPtr p_Node,
FIFFLIB::fiff_int_t  cov_kind,
FIFFLIB::FiffCov p_covData 
)
inlinestatic

mne_read_cov

MNE toolbox root function

Wrapper for the FiffStream read_cov member function

Reads a covariance matrix from a fiff file

Parameters
[in]p_pStreaman open fiff file.
[in]p_Nodelook for the matrix in here.
[in]cov_kindwhat kind of a covariance matrix do we want?.
[in,out]p_covDatathe read covariance matrix.
Returns
true if succeeded, false otherwise.

Definition at line 370 of file mne.h.

◆ read_events_from_ascii()

bool MNE::read_events_from_ascii ( QIODevice &  p_IODevice,
Eigen::MatrixXi &  eventlist 
)
static

read_events

Read a list of events from an eve file

Parameters
[in]p_IODeviceThe I/O device to read from.
[in,out]eventListList of events.
Returns
true if succeeded, false otherwise.

Definition at line 283 of file mne.cpp.

◆ read_events_from_fif()

bool MNE::read_events_from_fif ( QIODevice &  p_IODevice,
Eigen::MatrixXi &  eventlist 
)
static

mne_read_events

MNE toolbox root function

Read an event list from a fif file

Parameters
[in]p_IODeviceThe I/O device to read from.
[in,out]eventlistThe read eventlist m x 3; with m events; colum: 1 - position in samples, 3 - eventcode.
Returns
true if succeeded, false otherwise.

Definition at line 144 of file mne.cpp.

◆ read_forward_solution()

static bool MNELIB::MNE::read_forward_solution ( QIODevice &  p_IODevice,
MNEForwardSolution fwd,
bool  force_fixed = false,
bool  surf_ori = false,
const QStringList &  include = FIFFLIB::defaultQStringList,
const QStringList &  exclude = FIFFLIB::defaultQStringList 
)
inlinestatic

mne_read_forward_solution

MNE toolbox root function

Wrapper for the MNEForwardSolution::read_forward_solution static function

Reads a forward solution from a fif file

Parameters
[in]p_IODeviceA fiff IO device like a fiff QFile or QTCPSocket.
[in,out]fwdA forward solution from a fif file.
[in]force_fixedForce fixed source orientation mode? (optional).
[in]surf_oriUse surface based source coordinate system? (optional).
[in]includeInclude these channels (optional).
[in]excludeExclude these channels (optional).
Returns
true if succeeded, false otherwise.

Definition at line 421 of file mne.h.

◆ read_inverse_operator()

static bool MNELIB::MNE::read_inverse_operator ( QIODevice &  p_pIODevice,
MNEInverseOperator inv 
)
inlinestatic

mne_read_inverse_operator

MNE toolbox root function

Wrapper for the MNEInverseOperator::read_inverse_operator static function

Reads the inverse operator decomposition from a fif file

Parameters
[in]p_pIODeviceA fiff IO device like a fiff QFile or QTCPSocket.
[in,out]invThe read inverse operator.
Returns
true if succeeded, false otherwise.

Definition at line 395 of file mne.h.

◆ read_source_spaces()

static bool MNELIB::MNE::read_source_spaces ( FIFFLIB::FiffStream::SPtr p_pStream,
bool  add_geom,
MNESourceSpace p_SourceSpace 
)
inlinestatic

mne_read_forward_solution

MNE toolbox root function

Wrapper for the MNESourceSpace::read_source_spaces static function

Reads source spaces from a fif file

Parameters
[in]p_pStreamThe open fiff file.
[in]add_geomAdd geometry information to the source spaces.
[in,out]p_SourceSpaceThe read source spaces.
Returns
true if succeeded, false otherwise.

Definition at line 453 of file mne.h.

◆ set_current_comp()

static QList<FIFFLIB::FiffChInfo> MNELIB::MNE::set_current_comp ( QList< FIFFLIB::FiffChInfo > &  chs,
FIFFLIB::fiff_int_t  value 
)
inlinestatic

mne_set_current_comp

MNE toolbox root function

Wrapper for the FiffInfo::set_current_comp static function Consider taking the member function of a FiffInfo set_current_comp(fiff_int_t value), when compensation should be applied to the channels of FiffInfo

Set the current compensation value in the channel info structures

Parameters
[in]chsfiff channel info list.
[in]valuecompensation value.
Returns
the current compensation.

Definition at line 509 of file mne.h.

◆ transform_source_space_to()

static bool MNELIB::MNE::transform_source_space_to ( MNESourceSpace p_pMNESourceSpace,
FIFFLIB::fiff_int_t  dest,
FIFFLIB::FiffCoordTrans trans 
)
inlinestatic

mne_transform_source_space_to

MNE toolbox root function

Wrapper for the MNESourceSpace transform_source_space_to member function

Transforms source space data to the desired coordinate system

Parameters
[in,out]p_pMNESourceSpacethe source space which is should be transformed.
[in]destdestination check code.
[in]transtransformation information.
Returns
true if succeeded, false otherwise.

Definition at line 532 of file mne.h.

◆ transpose_named_matrix()

static void MNELIB::MNE::transpose_named_matrix ( FIFFLIB::FiffNamedMatrix mat)
inlinestatic

mne_transpose_named_matrix

MNE toolbox root function

Wrapper for the FiffNamedMatrix transpose_named_matrix member function

Transpose a named matrix (FiffNamedMatrix)

Parameters
[in,out]matFiffNamedMatrix which shoul be transposed.

Definition at line 553 of file mne.h.


The documentation for this class was generated from the following files: