MNE-CPP
beta 1.0
|
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=defaultQStringList, const QStringList &exclude=defaultQStringList, bool bExcludeBads=false) | |
MNEForwardSolution (const MNEForwardSolution &p_MNEForwardSolution) | |
~MNEForwardSolution () | |
void | clear () |
MNEForwardSolution | cluster_forward_solution (const AnnotationSet &p_AnnotationSet, qint32 p_iClusterSize, MatrixXd &p_D=defaultD, const FiffCov &p_pNoise_cov=defaultCov, const FiffInfo &p_pInfo=defaultInfo, QString p_sMethod="cityblock") const |
FiffCov | compute_orient_prior (float loose=0.2) |
bool | isClustered () const |
bool | isEmpty () const |
bool | isFixedOrient () const |
MNEForwardSolution | pick_channels (const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList) const |
MNEForwardSolution | pick_regions (const QList< Label > &p_qListLabels) const |
MNEForwardSolution | pick_types (bool meg, bool eeg, const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList) const |
void | prepare_forward (const FiffInfo &p_info, const FiffCov &p_noise_cov, bool p_pca, FiffInfo &p_outFwdInfo, MatrixXd &gain, FiffCov &p_outNoiseCov, MatrixXd &p_outWhitener, qint32 &p_outNumNonZero) const |
VectorXi | tripletSelection (const VectorXi &p_vecIdxSelection) const |
MNEForwardSolution | reduce_forward_solution (qint32 p_iNumDipoles, MatrixXd &p_D) const |
void | to_fixed_ori () |
Static Public Member Functions | |
static FiffCov | compute_depth_prior (const MatrixXd &Gain, const FiffInfo &gain_info, bool is_fixed_ori, double exp=0.8, double limit=10.0, const MatrixXd &patch_areas=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=defaultQStringList, const QStringList &exclude=defaultQStringList, bool bExcludeBads=true) |
static void | restrict_gain_matrix (MatrixXd &G, const FiffInfo &info) |
Public Attributes | |
FiffInfoBase | info |
fiff_int_t | source_ori |
bool | surf_ori |
fiff_int_t | coord_frame |
fiff_int_t | nsource |
fiff_int_t | nchan |
FiffNamedMatrix::SDPtr | sol |
FiffNamedMatrix::SDPtr | sol_grad |
FiffCoordTrans | mri_head_t |
MNESourceSpace | src |
MatrixX3f | source_rr |
MatrixX3f | source_nn |
Friends | |
std::ostream & | operator<< (std::ostream &out, const MNELIB::MNEForwardSolution &p_MNEForwardSolution) |
typedef QSharedPointer<const MNEForwardSolution> MNELIB::MNEForwardSolution::ConstSPtr |
Const shared pointer type for MNEForwardSolution.
Definition at line 210 of file mne_forwardsolution.h.
typedef QSharedPointer<MNEForwardSolution> MNELIB::MNEForwardSolution::SPtr |
Shared pointer type for MNEForwardSolution.
Definition at line 209 of file mne_forwardsolution.h.
MNEForwardSolution::MNEForwardSolution | ( | ) |
Default constructor.
Definition at line 80 of file mne_forwardsolution.cpp.
MNEForwardSolution::MNEForwardSolution | ( | QIODevice & | p_IODevice, |
bool | force_fixed = false , |
||
bool | surf_ori = false , |
||
const QStringList & | include = defaultQStringList , |
||
const QStringList & | exclude = 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 122 of file mne_forwardsolution.cpp.
MNEForwardSolution::~MNEForwardSolution | ( | ) |
Destroys the MNEForwardSolution.
Definition at line 142 of file mne_forwardsolution.cpp.
void MNEForwardSolution::clear | ( | ) |
Initializes the MNE forward solution.
Definition at line 150 of file mne_forwardsolution.cpp.
MNEForwardSolution MNEForwardSolution::cluster_forward_solution | ( | const AnnotationSet & | p_AnnotationSet, |
qint32 | p_iClusterSize, | ||
MatrixXd & | p_D = defaultD , |
||
const FiffCov & | p_pNoise_cov = defaultCov , |
||
const 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 169 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 811 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 921 of file mne_forwardsolution.cpp.
|
inline |
Indicates whether fwd conatins a clustered forward solution.
Definition at line 523 of file mne_forwardsolution.h.
|
inline |
True if FIFF measurement file information is empty.
Definition at line 531 of file mne_forwardsolution.h.
|
inline |
Has forward operator fixed orientation?
Definition at line 539 of file mne_forwardsolution.h.
MNEForwardSolution MNEForwardSolution::pick_channels | ( | const QStringList & | include = defaultQStringList , |
const QStringList & | exclude = 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 970 of file mne_forwardsolution.cpp.
MNEForwardSolution MNEForwardSolution::pick_regions | ( | const QList< Label > & | p_qListLabels | ) | const |
Reduces a forward solution to selected regions
[in] | p_qListLabels | ROIs |
Definition at line 1034 of file mne_forwardsolution.cpp.
MNEForwardSolution MNEForwardSolution::pick_types | ( | bool | meg, |
bool | eeg, | ||
const QStringList & | include = defaultQStringList , |
||
const QStringList & | exclude = 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 1086 of file mne_forwardsolution.cpp.
void MNEForwardSolution::prepare_forward | ( | const FiffInfo & | p_info, |
const FiffCov & | p_noise_cov, | ||
bool | p_pca, | ||
FiffInfo & | p_outFwdInfo, | ||
MatrixXd & | gain, | ||
FiffCov & | p_outNoiseCov, | ||
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 1100 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, |
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 703 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 1769 of file mne_forwardsolution.cpp.
void MNEForwardSolution::to_fixed_ori | ( | ) |
Helper to convert the forward solution to fixed ori from free
Definition at line 1815 of file mne_forwardsolution.cpp.
|
inline |
Prepares a forward solution, Bad channels, after clustering etc ToDo...
[in] | p_FiffInfo | Fif measurement info |
Definition at line 416 of file mne_forwardsolution.h.
|
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 547 of file mne_forwardsolution.h.
fiff_int_t MNELIB::MNEForwardSolution::coord_frame |
Coil coordinate system definition
Definition at line 507 of file mne_forwardsolution.h.
FiffInfoBase MNELIB::MNEForwardSolution::info |
light weighted measurement info
Definition at line 504 of file mne_forwardsolution.h.
FiffCoordTrans MNELIB::MNEForwardSolution::mri_head_t |
MRI head coordinate transformation
Definition at line 512 of file mne_forwardsolution.h.
fiff_int_t MNELIB::MNEForwardSolution::nchan |
Number of channels
Definition at line 509 of file mne_forwardsolution.h.
fiff_int_t MNELIB::MNEForwardSolution::nsource |
Number of source dipoles
Definition at line 508 of file mne_forwardsolution.h.
FiffNamedMatrix::SDPtr MNELIB::MNEForwardSolution::sol |
Forward solution
Definition at line 510 of file mne_forwardsolution.h.
FiffNamedMatrix::SDPtr MNELIB::MNEForwardSolution::sol_grad |
ToDo...
Definition at line 511 of file mne_forwardsolution.h.
MatrixX3f MNELIB::MNEForwardSolution::source_nn |
Source normals (number depends on fixed or free orientation)
Definition at line 515 of file mne_forwardsolution.h.
fiff_int_t MNELIB::MNEForwardSolution::source_ori |
Source orientation: fixed or free
Definition at line 505 of file mne_forwardsolution.h.
MatrixX3f MNELIB::MNEForwardSolution::source_rr |
Source locations
Definition at line 514 of file mne_forwardsolution.h.
MNESourceSpace MNELIB::MNEForwardSolution::src |
Geometric description of the source spaces (hemispheres)
Definition at line 513 of file mne_forwardsolution.h.
bool MNELIB::MNEForwardSolution::surf_ori |
If surface oriented
Definition at line 506 of file mne_forwardsolution.h.