v2.0.0
Loading...
Searching...
No Matches
MNELIB::MNESourceSpaces Class Reference

Source Space descritpion. More...

#include <mne_source_spaces.h>

Public Types

using SPtr = std::shared_ptr<MNESourceSpaces>
using ConstSPtr = std::shared_ptr<const MNESourceSpaces>

Public Member Functions

 MNESourceSpaces ()
 MNESourceSpaces (const MNESourceSpaces &p_MNESourceSpaces)
 ~MNESourceSpaces ()
void clear ()
bool isEmpty () const
QList< Eigen::VectorXi > get_vertno () const
QList< Eigen::VectorXi > label_src_vertno_sel (const FSLIB::Label &p_label, Eigen::VectorXi &src_sel) const
MNESourceSpaces pick_regions (const QList< FSLIB::Label > &p_qListLabels) const
qint32 size () const
bool transform_source_space_to (FIFFLIB::fiff_int_t dest, FIFFLIB::FiffCoordTrans &trans)
void writeToStream (FIFFLIB::FiffStream *p_pStream)
MNESourceSpaceoperator[] (qint32 idx)
const MNESourceSpaceoperator[] (qint32 idx) const
MNESourceSpaceoperator[] (QString idt)
const MNESourceSpaceoperator[] (QString idt) const
MNEHemispherehemisphereAt (qint32 idx)
const MNEHemispherehemisphereAt (qint32 idx) const
std::shared_ptr< MNESourceSpace > & at (qint32 idx)
const std::shared_ptr< MNESourceSpace > & at (qint32 idx) const

Static Public Member Functions

static qint32 find_source_space_hemi (MNESourceSpace &p_SourceSpace)
static bool patch_info (MNEHemisphere &p_Hemisphere)
static bool readFromStream (FIFFLIB::FiffStream::SPtr &p_pStream, bool add_geom, MNESourceSpaces &p_SourceSpace)

Friends

bool operator== (const MNESourceSpaces &a, const MNESourceSpaces &b)

Detailed Description

Source Space descritpion.

Source Space descritpion

Definition at line 93 of file mne_source_spaces.h.

Member Typedef Documentation

◆ ConstSPtr

using MNELIB::MNESourceSpaces::ConstSPtr = std::shared_ptr<const MNESourceSpaces>

Const shared pointer type for MNESourceSpaces.

Definition at line 97 of file mne_source_spaces.h.

◆ SPtr

Shared pointer type for MNESourceSpaces.

Definition at line 96 of file mne_source_spaces.h.

Constructor & Destructor Documentation

◆ MNESourceSpaces() [1/2]

MNESourceSpaces::MNESourceSpaces ( )

Default constructor

Definition at line 69 of file mne_source_spaces.cpp.

◆ MNESourceSpaces() [2/2]

MNESourceSpaces::MNESourceSpaces ( const MNESourceSpaces & p_MNESourceSpaces)

Copy constructor.

Parameters
[in]p_MNESourceSpacesMNE forward solution.

Definition at line 75 of file mne_source_spaces.cpp.

◆ ~MNESourceSpaces()

MNESourceSpaces::~MNESourceSpaces ( )

Destroys the MNE forward solution

Definition at line 84 of file mne_source_spaces.cpp.

Member Function Documentation

◆ at() [1/2]

std::shared_ptr< MNESourceSpace > & MNESourceSpaces::at ( qint32 idx)

Access the underlying shared_ptr at the given index.

Parameters
[in]idxthe source space index.
Returns
shared_ptr to the MNESourceSpace.

Definition at line 686 of file mne_source_spaces.cpp.

◆ at() [2/2]

const std::shared_ptr< MNESourceSpace > & MNESourceSpaces::at ( qint32 idx) const

Access the underlying shared_ptr at the given index (const).

Parameters
[in]idxthe source space index.
Returns
const shared_ptr to the MNESourceSpace.

Definition at line 693 of file mne_source_spaces.cpp.

◆ clear()

void MNESourceSpaces::clear ( )

Initializes MNE source space.

Definition at line 90 of file mne_source_spaces.cpp.

◆ find_source_space_hemi()

qint32 MNESourceSpaces::find_source_space_hemi ( MNESourceSpace & p_SourceSpace)
static

MNE toolbox root function ###: Definition of the mne_find_source_space_hemi 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 327 of file mne_source_spaces.cpp.

◆ get_vertno()

QList< VectorXi > MNESourceSpaces::get_vertno ( ) const

Returns the Zero based (different to MATLAB) indices of the used vertices of both hemispheres

Returns
the hemisphere vertices.

Definition at line 97 of file mne_source_spaces.cpp.

◆ hemisphereAt() [1/2]

MNEHemisphere * MNESourceSpaces::hemisphereAt ( qint32 idx)

Safe downcast to MNEHemisphere at the given index.

Parameters
[in]idxthe source space index.
Returns
Pointer to MNEHemisphere, or nullptr if the element is not a hemisphere.

Definition at line 668 of file mne_source_spaces.cpp.

◆ hemisphereAt() [2/2]

const MNEHemisphere * MNESourceSpaces::hemisphereAt ( qint32 idx) const

Safe downcast to MNEHemisphere at the given index (const).

Parameters
[in]idxthe source space index.
Returns
Const pointer to MNEHemisphere, or nullptr if the element is not a hemisphere.

Definition at line 677 of file mne_source_spaces.cpp.

◆ isEmpty()

bool MNELIB::MNESourceSpaces::isEmpty ( ) const
inline

True if MNE Source Space is empty.

Returns
true if MNE Source Space is empty.

Definition at line 367 of file mne_source_spaces.h.

◆ label_src_vertno_sel()

QList< VectorXi > MNESourceSpaces::label_src_vertno_sel ( const FSLIB::Label & p_label,
Eigen::VectorXi & src_sel ) const

Find vertex numbers and indices from label

Parameters
[in]labelSource space label.
[out]src_selarray of int (idx.size() = vertno[0].size() + vertno[1].size()). Indices of the selected vertices in sourse space
Returns
vertno list of length 2 Vertex numbers for lh and rh.

Definition at line 107 of file mne_source_spaces.cpp.

◆ operator[]() [1/4]

MNESourceSpace & MNESourceSpaces::operator[] ( qint32 idx)

Subscript operator [] to access source spaces by index.

Parameters
[in]idxthe source space index (0 or 1).
Returns
Reference to the source space at the given index.

Definition at line 612 of file mne_source_spaces.cpp.

◆ operator[]() [2/4]

const MNESourceSpace & MNESourceSpaces::operator[] ( qint32 idx) const

Subscript operator [] to access source spaces by index.

Parameters
[in]idxthe source space index (0 or 1).
Returns
Const reference to the source space at the given index.

Definition at line 625 of file mne_source_spaces.cpp.

◆ operator[]() [3/4]

MNESourceSpace & MNESourceSpaces::operator[] ( QString idt)

Subscript operator [] to access source spaces by hemisphere identifier.

Parameters
[in]idtthe hemisphere identifier ("lh" or "rh").
Returns
Reference to the source space for the given hemisphere.

Definition at line 638 of file mne_source_spaces.cpp.

◆ operator[]() [4/4]

const MNESourceSpace & MNESourceSpaces::operator[] ( QString idt) const

Subscript operator [] to access source spaces by hemisphere identifier.

Parameters
[in]idtthe hemisphere identifier ("lh" or "rh").
Returns
Const reference to the source space for the given hemisphere.

Definition at line 653 of file mne_source_spaces.cpp.

◆ patch_info()

bool MNESourceSpaces::patch_info ( MNEHemisphere & p_Hemisphere)
static

MNE toolbox root function ###: Definition of the mne_patch_info function

Generate the patch information from the 'nearest' vector in a source space. For vertex in the source space it provides the list of neighboring vertices in the high resolution triangulation.

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

Definition at line 581 of file mne_source_spaces.cpp.

◆ pick_regions()

MNESourceSpaces MNESourceSpaces::pick_regions ( const QList< FSLIB::Label > & p_qListLabels) const

Reduces a source space to selected regions

Parameters
[in]p_qListLabelsROIs.
Returns
the reduced source space.

Definition at line 165 of file mne_source_spaces.cpp.

◆ readFromStream()

bool MNESourceSpaces::readFromStream ( FIFFLIB::FiffStream::SPtr & p_pStream,
bool add_geom,
MNESourceSpaces & p_SourceSpace )
static

MNE toolbox root function ###: Definition of the mne_read_source_spaces function

Reads source spaces from a fif file

Parameters
[in,out]p_pStreamThe opened fif 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 265 of file mne_source_spaces.cpp.

◆ size()

qint32 MNELIB::MNESourceSpaces::size ( ) const
inline

Returns the number of stored hemispheres 0, 1 or 2

Returns
number of stored hemispheres.

Definition at line 374 of file mne_source_spaces.h.

◆ transform_source_space_to()

bool MNESourceSpaces::transform_source_space_to ( FIFFLIB::fiff_int_t dest,
FIFFLIB::FiffCoordTrans & trans )

MNE toolbox root function ###: Definition of the mne_transform_source_space_to function

Wrapper for the MNESourceSpaces transform_source_space_to member function

Note: In difference to mne-matlab this is not a static function. This is a method of the MNESourceSpaces class, that's why a tree object doesn't need to be handed to the function.

Transforms source space data to the desired coordinate system

Parameters
[in]destdestination check code.
[in]transtransformation information.
Returns
true if succeeded, false otherwise.

Definition at line 334 of file mne_source_spaces.cpp.

◆ writeToStream()

void MNESourceSpaces::writeToStream ( FIFFLIB::FiffStream * p_pStream)

MNE toolbox root function ###: Definition of the write_source_spaces_to_fid function

Write the source spaces to a FIF stream

Parameters
[in]p_pStreamThe stream to write to.

Definition at line 595 of file mne_source_spaces.cpp.

◆ operator==

bool operator== ( const MNESourceSpaces & a,
const MNESourceSpaces & b )
friend

Overloaded == operator to compare an object to this instance.

Parameters
[in]objectThe object which should be compared to.
Returns
true if equal, false otherwise.

Definition at line 381 of file mne_source_spaces.h.


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