MNE-CPP
0.1.9
A Framework for Electrophysiology
|
Forward operator. More...
#include <mne_forwardsolution.h>
Public Types | |
typedef QSharedPointer< MNEForwardSolution > | SPtr |
typedef QSharedPointer< const MNEForwardSolution > | ConstSPtr |
Public Member Functions | |
MNEForwardSolution () | |
MNEForwardSolution (QIODevice &p_IODevice, bool force_fixed=false, bool surf_ori=false, const QStringList &include=FIFFLIB::defaultQStringList, const QStringList &exclude=FIFFLIB::defaultQStringList, bool bExcludeBads=false) | |
MNEForwardSolution (const MNEForwardSolution &p_MNEForwardSolution) | |
~MNEForwardSolution () | |
void | clear () |
MNEForwardSolution | cluster_forward_solution (const FSLIB::AnnotationSet &p_AnnotationSet, qint32 p_iClusterSize, Eigen::MatrixXd &p_D=defaultD, const FIFFLIB::FiffCov &p_pNoise_cov=defaultCov, const FIFFLIB::FiffInfo &p_pInfo=defaultInfo, QString p_sMethod="cityblock") const |
FIFFLIB::FiffCov | compute_orient_prior (float loose=0.2) |
bool | isClustered () const |
bool | isEmpty () const |
bool | isFixedOrient () const |
MNEForwardSolution | pick_channels (const QStringList &include=FIFFLIB::defaultQStringList, const QStringList &exclude=FIFFLIB::defaultQStringList) const |
MNEForwardSolution | pick_regions (const QList< FSLIB::Label > &p_qListLabels) const |
MNEForwardSolution | pick_types (bool meg, bool eeg, const QStringList &include=FIFFLIB::defaultQStringList, const QStringList &exclude=FIFFLIB::defaultQStringList) const |
void | prepare_forward (const FIFFLIB::FiffInfo &p_info, const FIFFLIB::FiffCov &p_noise_cov, bool p_pca, FIFFLIB::FiffInfo &p_outFwdInfo, Eigen::MatrixXd &gain, FIFFLIB::FiffCov &p_outNoiseCov, Eigen::MatrixXd &p_outWhitener, qint32 &p_outNumNonZero) const |
Eigen::VectorXi | tripletSelection (const Eigen::VectorXi &p_vecIdxSelection) const |
MNEForwardSolution | reduce_forward_solution (qint32 p_iNumDipoles, Eigen::MatrixXd &p_D) const |
void | to_fixed_ori () |
Eigen::MatrixX3f | getSourcePositionsByLabel (const QList< FSLIB::Label > &lPickedLabels, const FSLIB::SurfaceSet &tSurfSetInflated) |
Static Public Member Functions | |
static FIFFLIB::FiffCov | compute_depth_prior (const Eigen::MatrixXd &Gain, const FIFFLIB::FiffInfo &gain_info, bool is_fixed_ori, double exp=0.8, double limit=10.0, const Eigen::MatrixXd &patch_areas=FIFFLIB::defaultConstMatrixXd, bool limit_depth_chs=false) |
static bool | read (QIODevice &p_IODevice, MNEForwardSolution &fwd, bool force_fixed=false, bool surf_ori=false, const QStringList &include=FIFFLIB::defaultQStringList, const QStringList &exclude=FIFFLIB::defaultQStringList, bool bExcludeBads=true) |
static void | restrict_gain_matrix (Eigen::MatrixXd &G, const FIFFLIB::FiffInfo &info) |
Public Attributes | |
FIFFLIB::FiffInfoBase | info |
FIFFLIB::fiff_int_t | source_ori |
bool | surf_ori |
FIFFLIB::fiff_int_t | coord_frame |
FIFFLIB::fiff_int_t | nsource |
FIFFLIB::fiff_int_t | nchan |
FIFFLIB::FiffNamedMatrix::SDPtr | sol |
FIFFLIB::FiffNamedMatrix::SDPtr | sol_grad |
FIFFLIB::FiffCoordTrans | mri_head_t |
MNESourceSpace | src |
Eigen::MatrixX3f | source_rr |
Eigen::MatrixX3f | source_nn |
Friends | |
std::ostream & | operator<< (std::ostream &out, const MNELIB::MNEForwardSolution &p_MNEForwardSolution) |
bool | operator== (const MNEForwardSolution &a, const MNEForwardSolution &b) |
typedef QSharedPointer<const MNEForwardSolution> MNELIB::MNEForwardSolution::ConstSPtr |
Const shared pointer type for MNEForwardSolution.
Definition at line 174 of file mne_forwardsolution.h.
typedef QSharedPointer<MNEForwardSolution> MNELIB::MNEForwardSolution::SPtr |
Shared pointer type for MNEForwardSolution.
Definition at line 173 of file mne_forwardsolution.h.
MNEForwardSolution::MNEForwardSolution | ( | ) |
Default constructor.
Definition at line 82 of file mne_forwardsolution.cpp.
MNEForwardSolution::MNEForwardSolution | ( | QIODevice & | p_IODevice, |
bool | force_fixed = false , |
||
bool | surf_ori = false , |
||
const QStringList & | include = FIFFLIB::defaultQStringList , |
||
const QStringList & | exclude = FIFFLIB::defaultQStringList , |
||
bool | bExcludeBads = false |
||
) |
Constructs a forward operator, by reading from a IO device.
[in] | p_IODevice | IO device to read from the forward operator. |
[in] | force_fixed | Force fixed source orientation mode? (optional). |
[in] | surf_ori | Use surface based source coordinate system? (optional). |
[in] | include | Include these channels (optional). |
[in] | exclude | Exclude these channels (optional). |
[in] | bExcludeBads | If true bads are also read; default = false (optional). |
Definition at line 99 of file mne_forwardsolution.cpp.
MNEForwardSolution::MNEForwardSolution | ( | const MNEForwardSolution & | p_MNEForwardSolution | ) |
Copy constructor.
[in] | p_MNEForwardSolution | MNE forward solution. |
Definition at line 121 of file mne_forwardsolution.cpp.
MNEForwardSolution::~MNEForwardSolution | ( | ) |
Destroys the MNEForwardSolution.
Definition at line 139 of file mne_forwardsolution.cpp.
void MNEForwardSolution::clear | ( | ) |
Initializes the MNE forward solution.
Definition at line 145 of file mne_forwardsolution.cpp.
MNEForwardSolution MNEForwardSolution::cluster_forward_solution | ( | const FSLIB::AnnotationSet & | p_AnnotationSet, |
qint32 | p_iClusterSize, | ||
Eigen::MatrixXd & | p_D = defaultD , |
||
const FIFFLIB::FiffCov & | p_pNoise_cov = defaultCov , |
||
const FIFFLIB::FiffInfo & | p_pInfo = defaultInfo , |
||
QString | p_sMethod = "cityblock" |
||
) | const |
Cluster the forward solution and stores the result to p_fwdOut. The clustering is done by using the provided annotations
[in] | p_AnnotationSet | Annotation set containing the annotation of left & right hemisphere. |
[in] | p_iClusterSize | Maximal cluster size per roi. |
[out] | p_D | The cluster operator. |
[in] | p_pNoise_cov. | |
[in] | p_pInfo. | |
[in] | p_sMethod | "cityblock" or "sqeuclidean". |
Definition at line 163 of file mne_forwardsolution.cpp.
|
static |
Compute weighting for depth prior. ToDo move this to FiffCov
[in] | Gain | gain matrix. |
[in] | gain_info | The measurement info to specify the channels to include. |
[in] | is_fixed_ori | Fixed orientation?. |
[in] | exp | float in [0, 1]. Depth weighting coefficients. If None, no depth weighting is performed. (optional; default = 0.8). |
[in] | limit | (optional; default = 10.0). |
[in] | patch_areas | (optional). |
[in] | limit_depth_chs | If True, use only grad channels in depth weighting (equivalent to MNE C code). If grad chanels aren't present, only mag channels will be used (if no mag, then eeg). If False, use all channels. (optional). |
Definition at line 807 of file mne_forwardsolution.cpp.
FiffCov MNEForwardSolution::compute_orient_prior | ( | float | loose = 0.2 | ) |
Compute orientation prior
[in] | loose | The loose orientation parameter. |
Definition at line 916 of file mne_forwardsolution.cpp.
MatrixX3f MNEForwardSolution::getSourcePositionsByLabel | ( | const QList< FSLIB::Label > & | lPickedLabels, |
const FSLIB::SurfaceSet & | tSurfSetInflated | ||
) |
Returns the positions of the specified sources based on their beloning labels
[in] | lPickedLabels | The stream to which the MNE forward solution should be assigned to. |
[in] | tSurfSetInflated | The surface used to pick the source from, based on their index specified bzy this forward solution. |
Definition at line 1835 of file mne_forwardsolution.cpp.
|
inline |
Indicates whether fwd conatins a clustered forward solution.
Definition at line 538 of file mne_forwardsolution.h.
|
inline |
True if FIFF measurement file information is empty.
Definition at line 545 of file mne_forwardsolution.h.
|
inline |
Has forward operator fixed orientation?
Definition at line 552 of file mne_forwardsolution.h.
MNEForwardSolution MNEForwardSolution::pick_channels | ( | const QStringList & | include = FIFFLIB::defaultQStringList , |
const QStringList & | exclude = FIFFLIB::defaultQStringList |
||
) | const |
mne.fiff.pick_channels_forward
Pick channels from forward operator
[in] | include | List of channels to include. (if None, include all available). |
[in] | exclude | Channels to exclude (if None, do not exclude any). |
Definition at line 965 of file mne_forwardsolution.cpp.
MNEForwardSolution MNEForwardSolution::pick_regions | ( | const QList< FSLIB::Label > & | p_qListLabels | ) | const |
Reduces a forward solution to selected regions
[in] | p_qListLabels | ROIs. |
Definition at line 1029 of file mne_forwardsolution.cpp.
MNEForwardSolution MNEForwardSolution::pick_types | ( | bool | meg, |
bool | eeg, | ||
const QStringList & | include = FIFFLIB::defaultQStringList , |
||
const QStringList & | exclude = FIFFLIB::defaultQStringList |
||
) | const |
mne.fiff.pick_types_forward
Pick by channel type and names from a forward operator
[in] | meg | Include MEG channels. |
[in] | eeg | Include EEG channels. |
[in] | include | Additional channels to include (if empty, do not add any). |
[in] | exclude | Channels to exclude (if empty, do not exclude any). |
Definition at line 1080 of file mne_forwardsolution.cpp.
void MNEForwardSolution::prepare_forward | ( | const FIFFLIB::FiffInfo & | p_info, |
const FIFFLIB::FiffCov & | p_noise_cov, | ||
bool | p_pca, | ||
FIFFLIB::FiffInfo & | p_outFwdInfo, | ||
Eigen::MatrixXd & | gain, | ||
FIFFLIB::FiffCov & | p_outNoiseCov, | ||
Eigen::MatrixXd & | p_outWhitener, | ||
qint32 & | p_outNumNonZero | ||
) | const |
Prepare forward for assembling the inverse operator
[in] | p_info | The measurement info to specify the channels to include. Bad channels in info['bads'] are not used. |
[in] | p_noise_cov | The noise covariance matrix. |
[in] | p_pca | Calculate pca or not. |
[out] | ch_names | Selected channel names. |
[out] | gain | Gain matrix. |
[out] | p_outNoiseCov | noise covariance matrix. |
[out] | p_outWhitener | Whitener. |
[out] | p_outNumNonZero | the rank (non zeros). |
Definition at line 1093 of file mne_forwardsolution.cpp.
|
static |
Reads a forward solution from a fif file
[in] | p_IODevice | A fiff IO device like a fiff QFile or QTCPSocket. |
[out] | fwd | A forward solution from a fif file. |
[in] | force_fixed | Force fixed source orientation mode? (optional). |
[in] | surf_ori | Use surface based source coordinate system? (optional). |
[in] | include | Include these channels (optional). |
[in] | exclude | Exclude these channels (optional). |
[in] | bExcludeBads | If true bads are also read; default = false (optional). |
Definition at line 1192 of file mne_forwardsolution.cpp.
MNEForwardSolution MNEForwardSolution::reduce_forward_solution | ( | qint32 | p_iNumDipoles, |
Eigen::MatrixXd & | p_D | ||
) | const |
reduces the forward solution and stores the result to p_fwdOut.
[in] | p_iNumDipoles | Desired number of dipoles. |
[out] | p_D | The reduction operator. |
Definition at line 702 of file mne_forwardsolution.cpp.
|
static |
Restrict gain matrix entries for optimal depth weighting
[in,out] | G | Gain matrix to be restricted; result is stored in place. |
[in] | info | Fiff information. |
Definition at line 1772 of file mne_forwardsolution.cpp.
void MNEForwardSolution::to_fixed_ori | ( | ) |
Helper to convert the forward solution to fixed ori from free
Definition at line 1817 of file mne_forwardsolution.cpp.
|
friend |
overloading the stream out operator<<
[in] | out | The stream to which the MNE forward solution should be assigned to. |
[in] | p_MNEForwardSolution | MNE forward solution which should be assigned to the stream. |
Definition at line 559 of file mne_forwardsolution.h.
|
friend |
Overloaded == operator to compare an object to this instance.
[in] | object | The object which should be compared to. |
Definition at line 575 of file mne_forwardsolution.h.
FIFFLIB::fiff_int_t MNELIB::MNEForwardSolution::coord_frame |
Coil coordinate system definition.
Definition at line 523 of file mne_forwardsolution.h.
FIFFLIB::FiffInfoBase MNELIB::MNEForwardSolution::info |
light weighted measurement info.
Definition at line 520 of file mne_forwardsolution.h.
FIFFLIB::FiffCoordTrans MNELIB::MNEForwardSolution::mri_head_t |
MRI head coordinate transformation.
Definition at line 528 of file mne_forwardsolution.h.
FIFFLIB::fiff_int_t MNELIB::MNEForwardSolution::nchan |
Number of channels.
Definition at line 525 of file mne_forwardsolution.h.
FIFFLIB::fiff_int_t MNELIB::MNEForwardSolution::nsource |
Number of source dipoles.
Definition at line 524 of file mne_forwardsolution.h.
FIFFLIB::FiffNamedMatrix::SDPtr MNELIB::MNEForwardSolution::sol |
Forward solution.
Definition at line 526 of file mne_forwardsolution.h.
FIFFLIB::FiffNamedMatrix::SDPtr MNELIB::MNEForwardSolution::sol_grad |
ToDo...
Definition at line 527 of file mne_forwardsolution.h.
Eigen::MatrixX3f MNELIB::MNEForwardSolution::source_nn |
Source normals (number depends on fixed or free orientation).
Definition at line 531 of file mne_forwardsolution.h.
FIFFLIB::fiff_int_t MNELIB::MNEForwardSolution::source_ori |
Source orientation: fixed or free.
Definition at line 521 of file mne_forwardsolution.h.
Eigen::MatrixX3f MNELIB::MNEForwardSolution::source_rr |
Source locations.
Definition at line 530 of file mne_forwardsolution.h.
MNESourceSpace MNELIB::MNEForwardSolution::src |
Geometric description of the source spaces (hemispheres).
Definition at line 529 of file mne_forwardsolution.h.
bool MNELIB::MNEForwardSolution::surf_ori |
If surface oriented.
Definition at line 522 of file mne_forwardsolution.h.