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

Information about raw data in a FIFF file. More...

#include <mne_raw_info.h>

Public Types

typedef QSharedPointer< MNERawInfoSPtr
typedef QSharedPointer< const MNERawInfoConstSPtr

Public Member Functions

 MNERawInfo ()
 Constructs a default MNERawInfo.
 ~MNERawInfo ()
 Destroys the MNERawInfo and releases owned resources.

Static Public Member Functions

static FIFFLIB::FiffDirNode::SPtr find_meas (const FIFFLIB::FiffDirNode::SPtr &node)
static FIFFLIB::FiffDirNode::SPtr find_meas_info (const FIFFLIB::FiffDirNode::SPtr &node)
static FIFFLIB::FiffDirNode::SPtr find_raw (const FIFFLIB::FiffDirNode::SPtr &node)
static FIFFLIB::FiffDirNode::SPtr find_maxshield (const FIFFLIB::FiffDirNode::SPtr &node)
static int get_meas_info (FIFFLIB::FiffStream::SPtr &stream, FIFFLIB::FiffDirNode::SPtr &node, std::unique_ptr< FIFFLIB::FiffId > &id, int *nchan, float *sfreq, float *highpass, float *lowpass, QList< FIFFLIB::FiffChInfo > &chp, FIFFLIB::FiffCoordTrans &trans, FIFFLIB::FiffTime **start_time)
static int load (const QString &name, int allow_maxshield, std::unique_ptr< MNERawInfo > &infop)

Public Attributes

QString filename
std::unique_ptr< FIFFLIB::FiffIdid
int nchan
QList< FIFFLIB::FiffChInfochInfo
int coord_frame
std::unique_ptr< FIFFLIB::FiffCoordTranstrans
float sfreq
float lowpass
float highpass
FIFFLIB::FiffTime start_time
int buf_size
int maxshield_data
QList< FIFFLIB::FiffDirEntry::SPtrrawDir
int ndir

Detailed Description

Information about raw data in a FIFF file.

Definition at line 85 of file mne_raw_info.h.

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const MNERawInfo> MNELIB::MNERawInfo::ConstSPtr

Const shared pointer type for MNERawInfo.

Definition at line 89 of file mne_raw_info.h.

◆ SPtr

typedef QSharedPointer<MNERawInfo> MNELIB::MNERawInfo::SPtr

Shared pointer type for MNERawInfo.

Definition at line 88 of file mne_raw_info.h.

Constructor & Destructor Documentation

◆ MNERawInfo()

MNERawInfo::MNERawInfo ( )

Constructs a default MNERawInfo.

Definition at line 61 of file mne_raw_info.cpp.

◆ ~MNERawInfo()

MNERawInfo::~MNERawInfo ( )

Destroys the MNERawInfo and releases owned resources.

Definition at line 67 of file mne_raw_info.cpp.

Member Function Documentation

◆ find_maxshield()

FiffDirNode::SPtr MNERawInfo::find_maxshield ( const FIFFLIB::FiffDirNode::SPtr & node)
static

Finds the MaxShield raw data block in the FIFF directory tree.

Searches the tree under the given node for a FIFFB_SMSH_RAW_DATA block, which contains SSS/MaxShield processed raw data.

Parameters
[in]nodeRoot node of the subtree to search.
Returns
Shared pointer to the MaxShield raw data directory node, or an empty shared pointer if no such block is found.

Definition at line 124 of file mne_raw_info.cpp.

◆ find_meas()

FiffDirNode::SPtr MNERawInfo::find_meas ( const FIFFLIB::FiffDirNode::SPtr & node)
static

Finds the nearest FIFFB_MEAS parent node in the FIFF directory tree.

Walks up the tree from the given node by following parent pointers until a node of type FIFFB_MEAS is found.

Parameters
[in]nodeStarting node from which to search upward.
Returns
Shared pointer to the enclosing FIFFB_MEAS node, or an empty shared pointer if no such node is found.

Definition at line 73 of file mne_raw_info.cpp.

◆ find_meas_info()

FiffDirNode::SPtr MNERawInfo::find_meas_info ( const FIFFLIB::FiffDirNode::SPtr & node)
static

Finds the FIFFB_MEAS_INFO child node within the nearest FIFFB_MEAS block.

First locates the enclosing FIFFB_MEAS node by walking up the tree from the given node, then searches its immediate children for a node of type FIFFB_MEAS_INFO.

Parameters
[in]nodeStarting node from which to search.
Returns
Shared pointer to the FIFFB_MEAS_INFO node, or an empty shared pointer if not found.

Definition at line 88 of file mne_raw_info.cpp.

◆ find_raw()

FiffDirNode::SPtr MNERawInfo::find_raw ( const FIFFLIB::FiffDirNode::SPtr & node)
static

Finds the raw data block in the FIFF directory tree.

Searches the tree under the given node for a FIFFB_RAW_DATA block. If none is found, falls back to searching for a FIFFB_CONTINUOUS_DATA block.

Parameters
[in]nodeRoot node of the subtree to search.
Returns
Shared pointer to the raw data directory node, or an empty shared pointer if neither raw nor continuous data blocks are found.

Definition at line 107 of file mne_raw_info.cpp.

◆ get_meas_info()

int MNERawInfo::get_meas_info ( FIFFLIB::FiffStream::SPtr & stream,
FIFFLIB::FiffDirNode::SPtr & node,
std::unique_ptr< FIFFLIB::FiffId > & id,
int * nchan,
float * sfreq,
float * highpass,
float * lowpass,
QList< FIFFLIB::FiffChInfo > & chp,
FIFFLIB::FiffCoordTrans & trans,
FIFFLIB::FiffTime ** start_time )
static

Reads measurement information from the nearest FIFFB_MEAS_INFO parent of a node.

Extracts channel information, sampling frequency, filter parameters, coordinate transformation (device-to-head), and measurement ID from the FIFF file. Lowpass and highpass default to sfreq/2 and 0 respectively if not explicitly present in the file.

Parameters
[in]streamOpen FIFF stream to read tags from.
[in]nodeStarting directory node (typically the raw data node).
[out]idMeasurement ID (managed via unique_ptr). Reset if absent.
[out]nchanNumber of channels.
[out]sfreqSampling frequency in Hz.
[out]highpassHighpass filter cutoff frequency in Hz.
[out]lowpassLowpass filter cutoff frequency in Hz.
[out]chpList of channel information structures, one per channel.
[out]transDevice-to-head coordinate transformation.
[out]start_timeMeasurement start time (NULL if absent).
Returns
0 on success, -1 on failure.

Definition at line 137 of file mne_raw_info.cpp.

◆ load()

int MNERawInfo::load ( const QString & name,
int allow_maxshield,
std::unique_ptr< MNERawInfo > & infop )
static

Loads raw data information from a FIFF file.

Opens the specified FIFF file, locates the raw data block (or MaxShield data block if allowed and no standard raw data is found), reads the measurement information, determines the buffer size from the first data buffer tag, and assembles a complete MNERawInfo structure.

Parameters
[in]namePath to the FIFF file to load.
[in]allow_maxshieldIf non-zero, fall back to MaxShield (SSS) data when no standard raw data block is found.
[out]infopPointer to receive the newly allocated MNERawInfo structure. Only valid on success.
Returns
FIFF_OK on success, FIFF_FAIL on failure.

Definition at line 301 of file mne_raw_info.cpp.

Member Data Documentation

◆ buf_size

int MNELIB::MNERawInfo::buf_size

Buffer size in samples.

Definition at line 219 of file mne_raw_info.h.

◆ chInfo

QList<FIFFLIB::FiffChInfo> MNELIB::MNERawInfo::chInfo

Channel info data .

Definition at line 210 of file mne_raw_info.h.

◆ coord_frame

int MNELIB::MNERawInfo::coord_frame

Which coordinate frame are the positions defined in?

Definition at line 211 of file mne_raw_info.h.

◆ filename

QString MNELIB::MNERawInfo::filename

The name of the file this comes from.

Definition at line 207 of file mne_raw_info.h.

◆ highpass

float MNELIB::MNERawInfo::highpass

Highpass filter setting.

Definition at line 217 of file mne_raw_info.h.

◆ id

std::unique_ptr<FIFFLIB::FiffId> MNELIB::MNERawInfo::id

Measurement id from the file.

Definition at line 208 of file mne_raw_info.h.

◆ lowpass

float MNELIB::MNERawInfo::lowpass

Lowpass filter setting.

Definition at line 216 of file mne_raw_info.h.

◆ maxshield_data

int MNELIB::MNERawInfo::maxshield_data

Are these unprocessed MaxShield data.

Definition at line 220 of file mne_raw_info.h.

◆ nchan

int MNELIB::MNERawInfo::nchan

Number of channels.

Definition at line 209 of file mne_raw_info.h.

◆ ndir

int MNELIB::MNERawInfo::ndir

Number of tags in the above directory.

Definition at line 222 of file mne_raw_info.h.

◆ rawDir

QList<FIFFLIB::FiffDirEntry::SPtr> MNELIB::MNERawInfo::rawDir

Directory of raw data tags (FIFF_DATA_BUFFER, FIFF_DATA_SKIP, etc.).

Definition at line 221 of file mne_raw_info.h.

◆ sfreq

float MNELIB::MNERawInfo::sfreq

Sampling frequency.

Definition at line 215 of file mne_raw_info.h.

◆ start_time

FIFFLIB::FiffTime MNELIB::MNERawInfo::start_time

Acquisition start time (from meas date or block id).

Definition at line 218 of file mne_raw_info.h.

◆ trans

std::unique_ptr<FIFFLIB::FiffCoordTrans> MNELIB::MNERawInfo::trans

Coordinate transformation FIFF_COORD_HEAD <-> FIFF_COORD_DEVICE.

Definition at line 214 of file mne_raw_info.h.


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