v2.0.0
Loading...
Searching...
No Matches
FIFFLIB::FiffInfoBase Class Reference

Stripped FIFF measurement info: channel list, sampling rate, device→head transform and bad-channel list. More...

#include <fiff_info_base.h>

Public Types

using SPtr = QSharedPointer<FiffInfoBase>
using ConstSPtr = QSharedPointer<const FiffInfoBase>
using UPtr = std::unique_ptr<FiffInfoBase>
using ConstUPtr = std::unique_ptr<const FiffInfoBase>

Public Member Functions

 FiffInfoBase ()
 FiffInfoBase (const FiffInfoBase &p_FiffInfoBase)
FiffInfoBase & operator= (const FiffInfoBase &other)=default
virtual ~FiffInfoBase ()
void clear ()
QString channel_type (qint32 idx) const
QMap< QString, QList< int > > channel_indices_by_type (const QList< int > &picks={}) const
bool isEmpty () const
FiffInfoBase pick_info (const Eigen::RowVectorXi *sel=nullptr) const
Eigen::RowVectorXi pick_types (const QString meg, bool eeg=false, bool stim=false, const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList) const
Eigen::RowVectorXi pick_types (bool meg, bool eeg=false, bool stim=false, const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList) const
void mne_read_meg_comp_eeg_ch_info (QList< FiffChInfo > &megp, int &nmegp, QList< FiffChInfo > &meg_compp, int &nmeg_compp, QList< FiffChInfo > &eegp, int &neegp, FiffCoordTrans &meg_head_t, FiffId &idp) const
QStringList get_channel_types ()

Static Public Member Functions

static Eigen::RowVectorXi pick_channels_regexp (const QStringList &ch_names, const QString &regexp)
static Eigen::RowVectorXi pick_channels (const QStringList &ch_names, const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList)
static bool readBadChannelsFromFile (const QString &name, QStringList &listOut)

Public Attributes

QString filename
QStringList bads
FiffId meas_id
fiff_int_t nchan
QList< FiffChInfo > chs
QStringList ch_names
FiffCoordTrans dev_head_t
FiffCoordTrans ctf_head_t
QList< FiffCoordTrans > all_coord_trans

Friends

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

Detailed Description

Stripped FIFF measurement info: channel list, sampling rate, device→head transform and bad-channel list.

Owns just the fields needed to interpret a data matrix: chs, ch_names, nchan, sfreq, bads, dev_head_t, ctf_head_t. Base class of FiffInfo, used directly when the rest of the acquisition metadata is not available (e.g. realtime client streams, trimmed evoked files).

Definition at line 76 of file fiff_info_base.h.

Inheritance diagram for FIFFLIB::FiffInfoBase:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

using FIFFLIB::FiffInfoBase::ConstSPtr = QSharedPointer<const FiffInfoBase>

Const shared pointer type for FiffInfoBase.

Definition at line 80 of file fiff_info_base.h.

◆ ConstUPtr

using FIFFLIB::FiffInfoBase::ConstUPtr = std::unique_ptr<const FiffInfoBase>

Const unique pointer type for FiffInfoBase.

Definition at line 82 of file fiff_info_base.h.

◆ SPtr

using FIFFLIB::FiffInfoBase::SPtr = QSharedPointer<FiffInfoBase>

Shared pointer type for FiffInfoBase.

Definition at line 79 of file fiff_info_base.h.

◆ UPtr

using FIFFLIB::FiffInfoBase::UPtr = std::unique_ptr<FiffInfoBase>

Unique pointer type for FiffInfoBase.

Definition at line 81 of file fiff_info_base.h.

Constructor & Destructor Documentation

◆ FiffInfoBase() [1/2]

FiffInfoBase::FiffInfoBase ( )

Constructors the light fiff measurement file information.

Definition at line 45 of file fiff_info_base.cpp.

◆ FiffInfoBase() [2/2]

FiffInfoBase::FiffInfoBase ( const FiffInfoBase & p_FiffInfoBase)

Copy constructor.

Parameters
[in]p_FiffInfoBaselight FIFF measurement information which should be copied.

Definition at line 53 of file fiff_info_base.cpp.

◆ ~FiffInfoBase()

FiffInfoBase::~FiffInfoBase ( )
virtual

Destroys the light fiff measurement file information.

Definition at line 68 of file fiff_info_base.cpp.

Member Function Documentation

◆ channel_indices_by_type()

QMap< QString, QList< int > > FiffInfoBase::channel_indices_by_type ( const QList< int > & picks = {}) const

Channel indices of each channel type, like mne.channel_indices_by_type.

Parameters
[in]picksChannels to classify (empty: all).
Returns
Every channel type mapped to the indices of its channels (empty lists for absent types).

Definition at line 119 of file fiff_info_base.cpp.

◆ channel_type()

QString FiffInfoBase::channel_type ( qint32 idx) const

Get channel type.

Parameters
[in]idxIndex of channel.
Returns
Type of channel as in mne.channel_type ('grad', 'mag', 'eeg', 'seeg', 'ecog', 'hbo', 'eyegaze', ...).

Definition at line 109 of file fiff_info_base.cpp.

◆ clear()

void FiffInfoBase::clear ( )

Initializes light FIFF measurement information.

Definition at line 153 of file fiff_info_base.cpp.

◆ get_channel_types()

QStringList FiffInfoBase::get_channel_types ( )

Parses the channel info information and returns a string list of channel types.

Returns
The distinct channel types in channel order, as channel_type() names them (unknown kinds skipped).

Definition at line 301 of file fiff_info_base.cpp.

◆ isEmpty()

bool FIFFLIB::FiffInfoBase::isEmpty ( ) const
inline

True if FIFF measurement file information is empty.

Returns
true if FIFF measurement file information is empty.

Definition at line 298 of file fiff_info_base.h.

◆ mne_read_meg_comp_eeg_ch_info()

void FiffInfoBase::mne_read_meg_comp_eeg_ch_info ( QList< FiffChInfo > & megp,
int & nmegp,
QList< FiffChInfo > & meg_compp,
int & nmeg_compp,
QList< FiffChInfo > & eegp,
int & neegp,
FiffCoordTrans & meg_head_t,
FiffId & idp ) const

Read MEG, compensation, and EEG channel information from this measurement info.

Classifies channels by kind (FIFFV_MEG_CH, FIFFV_REF_MEG_CH, FIFFV_EEG_CH) and returns the device-to-head transform and measurement ID.

Parameters
[out]megpList of MEG channel info descriptors.
[out]nmegpNumber of MEG channels found.
[out]meg_comppList of MEG compensation (reference) channel info descriptors.
[out]nmeg_comppNumber of compensation channels found.
[out]eegpList of EEG channel info descriptors.
[out]neegpNumber of EEG channels found.
[out]meg_head_tDevice-to-head coordinate transformation.
[out]idpMeasurement ID.

Definition at line 274 of file fiff_info_base.cpp.

◆ operator=()

FiffInfoBase & FIFFLIB::FiffInfoBase::operator= ( const FiffInfoBase & other)
default

Copy assignment. Every member has value semantics, so the compiler-generated member-wise assignment is correct. It is declared explicitly because declaring a copy constructor and/or a destructor deprecates the implicitly generated one.

Parameters
[in]otherObject to assign from.
Returns
reference to this object.

◆ pick_channels()

RowVectorXi FiffInfoBase::pick_channels ( const QStringList & ch_names,
const QStringList & include = defaultQStringList,
const QStringList & exclude = defaultQStringList )
static

fiff_pick_channels

Make a selector to pick desired channels from data

Parameters
[in]ch_names- The channel name list to consult.
[in]include- Channels to include (if empty, include all available).
[in]exclude- Channels to exclude (if empty, do not exclude any).
Returns
the selector matrix (row Vector).

Definition at line 229 of file fiff_info_base.cpp.

◆ pick_channels_regexp()

RowVectorXi FiffInfoBase::pick_channels_regexp ( const QStringList & ch_names,
const QString & regexp )
static

Indices of the channel names that match a regular expression from their start, like mne.pick_channels_regexp.

Parameters
[in]ch_namesThe channel names.
[in]regexpThe regular expression (Perl syntax).
Returns
The selector (row vector).

Definition at line 139 of file fiff_info_base.cpp.

◆ pick_info()

FiffInfoBase FiffInfoBase::pick_info ( const Eigen::RowVectorXi * sel = nullptr) const

fiff_pick_info

Pick desired channels from measurement info

Parameters
[in]selList of channels to select.
Returns
Info modified according to sel.

Definition at line 252 of file fiff_info_base.cpp.

◆ pick_types() [1/2]

RowVectorXi FiffInfoBase::pick_types ( bool meg,
bool eeg = false,
bool stim = false,
const QStringList & include = defaultQStringList,
const QStringList & exclude = defaultQStringList ) const

fiff_pick_types

Create a selector to pick desired channel types from data Use overloaded pick_types method to specify meg (grad, mag, ref_meg)type

Parameters
[in]megInclude MEG channels.
[in]eegInclude EEG channels.
[in]stimInclude stimulus channels.
[in]includeAdditional channels to include (if empty, do not add any).
[in]excludeChannels to exclude (if empty, do not exclude any).
Returns
the selector matrix (row vector).

Definition at line 219 of file fiff_info_base.cpp.

◆ pick_types() [2/2]

RowVectorXi FiffInfoBase::pick_types ( const QString meg,
bool eeg = false,
bool stim = false,
const QStringList & include = defaultQStringList,
const QStringList & exclude = defaultQStringList ) const

fiff_pick_types (highy diversity in meg picking)

Create a selector to pick desired channel types from data

Parameters
[in]megIt can be "all", to select all or it can be "mag" or "grad" to select only gradiometers or magnetometers.
[in]eegInclude EEG channels.
[in]stimInclude stimulus channels.
[in]includeAdditional channels to include (if empty, do not add any).
[in]excludeChannels to exclude (if empty, do not exclude any).
Returns
the selector matrix (row vector).

Definition at line 168 of file fiff_info_base.cpp.

◆ readBadChannelsFromFile()

bool FiffInfoBase::readBadChannelsFromFile ( const QString & name,
QStringList & listOut )
static

Read bad channel names from a plain text file (one name per line, '#' comments skipped).

Parameters
[in]namePath to the bad channel file (empty string is a no-op).
[out]listOutThe bad channel names read from the file.
Returns
true on success, false on error.

Definition at line 314 of file fiff_info_base.cpp.

◆ operator==

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

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

Parameters
[in]aThe object which should be compared to.
[in]bRight-hand measurement info.
Returns
true if equal, false otherwise.

Definition at line 305 of file fiff_info_base.h.

Member Data Documentation

◆ all_coord_trans

QList<FiffCoordTrans> FIFFLIB::FiffInfoBase::all_coord_trans

All coordinate transformations stored in the file, in file order.

Definition at line 291 of file fiff_info_base.h.

◆ bads

QStringList FIFFLIB::FiffInfoBase::bads

List of bad channels.

Definition at line 284 of file fiff_info_base.h.

◆ ch_names

QStringList FIFFLIB::FiffInfoBase::ch_names

List of all channel names.

Definition at line 288 of file fiff_info_base.h.

◆ chs

QList<FiffChInfo> FIFFLIB::FiffInfoBase::chs

List of all channel info descriptors.

Definition at line 287 of file fiff_info_base.h.

◆ ctf_head_t

FiffCoordTrans FIFFLIB::FiffInfoBase::ctf_head_t

CTF to head coordinate transformation.

Definition at line 290 of file fiff_info_base.h.

◆ dev_head_t

FiffCoordTrans FIFFLIB::FiffInfoBase::dev_head_t

Device to head coordinate transformation.

Definition at line 289 of file fiff_info_base.h.

◆ filename

QString FIFFLIB::FiffInfoBase::filename

Filename when the info is read of a fiff file.

Definition at line 283 of file fiff_info_base.h.

◆ meas_id

FiffId FIFFLIB::FiffInfoBase::meas_id

Measurement ID.

Definition at line 285 of file fiff_info_base.h.

◆ nchan

fiff_int_t FIFFLIB::FiffInfoBase::nchan

Number of channels.

Definition at line 286 of file fiff_info_base.h.


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