MNE-CPP
0.1.9
A Framework for Electrophysiology
|
The Fiff class provides static wrapper functions to stay consistent with mne matlab toolbox Note: avoid using the wrappers, prefer the wrapped methods! More...
#include <fiff.h>
Public Member Functions | |
virtual | ~Fiff () |
Static Public Member Functions | |
static bool | copy_tree (FiffStream::SPtr p_pStreamIn, const FiffId &in_id, const QList< FiffDirNode::SPtr > &p_Nodes, FiffStream::SPtr &p_pStreamOut) |
static void | end_block (FiffStream *p_pStream, fiff_int_t kind) |
static void | end_file (FiffStream *p_pStream) |
static void | finish_writing_raw (FiffStream *p_pStream) |
static QList< FiffDirNode::SPtr > | dir_tree_find (const FiffDirNode::SPtr &p_Node, fiff_int_t p_kind) |
static bool | invert_transform (FiffCoordTrans &p_Transform) |
static bool | open (QIODevice &p_IODevice, FiffStream::SPtr &p_pStream) |
static Eigen::RowVectorXi | pick_channels (QStringList &ch_names, const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList) |
static FiffEvokedSet | pick_channels (FiffEvokedSet &orig, const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList) |
static bool | find_evoked (FiffEvokedSet &orig) |
static FiffInfo | pick_info (const FiffInfo &info, const Eigen::RowVectorXi &sel=defaultVectorXi) |
static Eigen::RowVectorXi | pick_types (FiffInfo &info, bool meg, bool eeg=false, bool stim=false, const QStringList &include=defaultQStringList, const QStringList &exclude=defaultQStringList) |
static QStringList | read_bad_channels (FiffStream::SPtr &p_pStream, FiffDirNode::SPtr &p_Node) |
static QList< FiffCtfComp > | read_ctf_comp (FiffStream::SPtr &p_pStream, const FiffDirNode::SPtr &p_Node, const QList< FiffChInfo > &p_Chs) |
static bool | read_evoked (QIODevice &p_IODevice, FiffEvoked &data, QVariant setno=0, QPair< float, float > baseline=defaultFloatPair, bool proj=true, fiff_int_t p_aspect_kind=FIFFV_ASPECT_AVERAGE) |
static bool | read_evoked_set (QIODevice &p_IODevice, FiffEvokedSet &data) |
static bool | read_meas_info (FiffStream::SPtr &p_pStream, const FiffDirNode::SPtr &p_Node, FiffInfo &p_Info, FiffDirNode::SPtr &p_NodeInfo) |
static bool | read_named_matrix (FiffStream::SPtr &p_pStream, const FiffDirNode::SPtr &p_Node, fiff_int_t matkind, FiffNamedMatrix &mat) |
static QList< FiffProj > | read_proj (FiffStream::SPtr &p_pStream, const FiffDirNode::SPtr &p_Node) |
static bool | read_raw_segment (FiffRawData &raw, Eigen::MatrixXd &data, Eigen::MatrixXd ×, fiff_int_t from=-1, fiff_int_t to=-1, Eigen::MatrixXi sel=defaultMatrixXi) |
static bool | read_raw_segment (FiffRawData &raw, Eigen::MatrixXd &data, Eigen::MatrixXd ×, Eigen::SparseMatrix< double > &mult, fiff_int_t from=-1, fiff_int_t to=-1, Eigen::MatrixXi sel=defaultMatrixXi) |
static bool | read_tag (FiffStream::SPtr &p_pStream, FiffTag::SPtr &p_pTag, qint64 pos=-1) |
static bool | read_tag_info (FiffStream::SPtr &p_pStream, FiffTag::SPtr &p_pTag) |
static bool | setup_read_raw (QIODevice &p_IODevice, FiffRawData &data, bool allow_maxshield=false) |
static QStringList | split_name_list (QString p_sNameList) |
static void | start_block (FiffStream *p_pStream, fiff_int_t kind) |
static FiffStream::SPtr | start_file (QIODevice &p_IODevice) |
static FiffStream::SPtr | start_writing_raw (QIODevice &p_IODevice, const FiffInfo &info, Eigen::RowVectorXd &cals, Eigen::MatrixXi sel=defaultMatrixXi) |
static void | write_ch_info (FiffStream *p_pStream, const FiffChInfo &ch) |
static void | write_coord_trans (FiffStream *p_pStream, FiffCoordTrans &trans) |
static void | write_ctf_comp (FiffStream *p_pStream, QList< FiffCtfComp > &comps) |
static void | write_dig_point (FiffStream *p_pStream, FiffDigPoint &dig) |
static void | write_id (FiffStream *p_pStream, fiff_int_t kind, FiffId &id=FiffId::getDefault()) |
static void | write_int (FiffStream *p_pStream, fiff_int_t kind, const fiff_int_t *data, fiff_int_t nel=1) |
static void | write_float (FiffStream *p_pStream, fiff_int_t kind, float *data, fiff_int_t nel=1) |
static void | write_float_matrix (FiffStream *p_pStream, fiff_int_t kind, Eigen::MatrixXf &mat) |
static void | write_name_list (FiffStream *p_pStream, fiff_int_t kind, QStringList &data) |
static void | write_named_matrix (FiffStream *p_pStream, fiff_int_t kind, FiffNamedMatrix &mat) |
static void | write_proj (FiffStream *p_pStream, QList< FiffProj > &projs) |
static bool | write_raw_buffer (FiffStream *p_pStream, const Eigen::MatrixXd &buf, const Eigen::MatrixXd &cals) |
static void | write_string (FiffStream *p_pStream, fiff_int_t kind, QString &data) |
The Fiff class provides static wrapper functions to stay consistent with mne matlab toolbox Note: avoid using the wrappers, prefer the wrapped methods!
DECLARE CLASS Fiff
|
inlinestatic |
fiff_copy_tree
Wrapper for the static FiffDirNode::copy_tree function
Copies directory subtrees from fidin to fidout
[in] | p_pStreamIn | fiff file to copy from. |
[in] | in_id | file id description. |
[out] | p_Nodes | subtree directories to be copied. |
[in] | p_pStreamOut | fiff file to write to. |
|
inlinestatic |
fiff_dir_tree_find
Wrapper for the FiffDirNode dir_tree_find member function
Find nodes of the given kind from a directory tree structure
[in] | p_Node | The directory tree structure. |
[in] | p_kind | The given kind. |
|
inlinestatic |
fiff_end_block
Wrapper for the FiffStream end_block member function
Writes a FIFF_BLOCK_END tag
[in] | p_pStream | the opened fiff file. |
[in] | kind | The block kind to end. |
|
inlinestatic |
fiff_end_file
Wrapper for the FiffStream end_file member function
Writes the closing tags to a fif file and closes the file
[in] | p_pStream | the opened fiff file. |
|
inlinestatic |
|
inlinestatic |
fiff_finish_writing_raw
Wrapper for the FiffStream finish_writing_raw member function
Finishes a raw file by writing all necessary end tags.
[in] | p_pStream | the opened fiff file. |
|
inlinestatic |
fiff_invert_transform
Wrapper for the static FiffCoordTrans::invert_transform function
Invert a coordinate transformation
[in] | p_Transform | The transformation which should be inverted. |
|
inlinestatic |
fiff_open
Wrapper for the FiffStream open member function
Opens a fif file and provides the directory of tags
[in] | p_IODevice | A fiff IO device like a fiff QFile or QTCPSocket. |
[out] | p_pStream | file which is openened. |
|
inlinestatic |
fiff_pick_channels_evoked
Wrapper for the FiffEvokedDataSet pick_channels_evoked member function
Pick desired channels from evoked-response data
[in] | orig | The original data. |
[in] | include | - Channels to include (if empty, include all available). |
[in] | exclude | - Channels to exclude (if empty, do not exclude any). |
|
inlinestatic |
fiff_pick_channels
Wrapper for the FiffInfo::pick_channels static function
Make a selector to pick desired channels from data
[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). |
|
inlinestatic |
fiff_pick_types
Wrapper for the FiffInfo pick_types member function
Create a selector to pick desired channel types from data
[in] | info | The measurement info. |
[in] | meg | Include MEG channels. |
[in] | eeg | Include EEG channels. |
[in] | stim | Include stimulus channels. |
[in] | include | Additional channels to include (if empty, do not add any). |
[in] | exclude | Channels to exclude (if empty, do not exclude any). |
|
inlinestatic |
fiff_read_bad_channels
Wrapper for the FiffStream read_bad_channels member function
Reads the bad channel list from a node if it exists
[in] | p_pStream | The opened fif file to read from. |
[in] | p_Node | The node of interest. |
|
inlinestatic |
fiff_read_ctf_comp
Wrapper for the FiffStream read_ctf_comp member function
Read the CTF software compensation data from the given node
[in] | p_pStream | The opened fif file to read from. |
[in] | p_Node | The node of interest. |
[in] | p_Chs | channels with the calibration info. |
|
inlinestatic |
fiff_read_evoked
Wrapper for the FiffEvoked::read static function
Read one evoked data set
[in] | p_IODevice | A fiff IO device like a fiff QFile or QTCPSocket. |
[out] | data | The read evoked data. |
[in] | setno | the set to pick. |
[in] | baseline | The time interval to apply rescaling / baseline correction. If None do not apply it. If baseline is (a, b). the interval is between "a (s)" and "b (s)". If a is None the beginning of the data is used and if b is None then b is set to the end of the interval. If baseline is equal ot (None, None) all the time interval is used. If None, no correction is applied. |
[in] | proj | Apply SSP projection vectors (optional, default = true). |
[in] | p_aspect_kind | Either "FIFFV_ASPECT_AVERAGE" or "FIFFV_ASPECT_STD_ERR". The type of data to read. Only used if "setno" is a str. |
|
inlinestatic |
|
inlinestatic |
fiff_read_meas_info
Wrapper for the FiffStream read_meas_info member function
Read the measurement info Source is assumed to be an open fiff stream.
[in] | p_pStream | The opened fiff stream to read from. |
[in] | p_Node | The node of interest. |
[out] | p_Info | The read measurement info. |
[out] | p_NodeInfo | The to measurement corresponding fiff_dir_tree. |
|
inlinestatic |
fiff_read_named_matrix
Wrapper for the FiffStream read_named_matrix member function
Reads a named matrix.
[in] | p_pStream | The opened fif file to read from. |
[in] | p_Node | The node of interest. |
[in] | matkind | The matrix kind to look for. |
[out] | mat | The named matrix. |
|
inlinestatic |
[ projdata ] = fiff_read_proj(fid,node)
Read the SSP data under a given directory node
Wrapper for the FiffStream read_proj member function
[in] | p_pStream | The opened fif file to read from. |
[in] | p_Node | The node of interest. |
|
inlinestatic |
fiff_read_raw_segment
Wrapper for the FiffRawData read_raw_segment member function
Read a specific raw data segment
[in] | raw | structure returned by fiff_setup_read_raw. |
[out] | data | returns the data matrix (channels x samples). |
[out] | times | returns the time values corresponding to the samples. |
[out] | mult | matrix to store used multiplication matrix (compensator,projection,calibration). |
[in] | from | first sample to include. If omitted, defaults to the first sample in data (optional). |
[in] | to | last sample to include. If omitted, defaults to the last sample in data (optional). |
[in] | sel | channel selection vector (optional). |
|
inlinestatic |
fiff_read_raw_segment
Wrapper for the FiffRawData read_raw_segment member function
Read a specific raw data segment
[in] | raw | structure returned by fiff_setup_read_raw. |
[out] | data | returns the data matrix (channels x samples). |
[out] | times | returns the time values corresponding to the samples. |
[in] | from | first sample to include. If omitted, defaults to the first sample in data (optional). |
[in] | to | last sample to include. If omitted, defaults to the last sample in data (optional). |
[in] | sel | channel selection vector (optional). |
|
inlinestatic |
fiff_read_tag
Wrapper for the FiffTag::read_tag function
Read one tag from a fif file. if pos is not provided, reading starts from the current file position
[in] | p_pStream | opened fif file. |
[out] | p_pTag | the read tag. |
[in] | pos | position of the tag inside the fif file. |
|
inlinestatic |
fiff_read_tag_info
Wrapper for the FiffTag::read_tag_info function
Read tag information of one tag from a fif file. if pos is not provided, reading starts from the current file position
[in] | p_pStream | opened fif file. |
[out] | p_pTag | the read tag info. |
|
inlinestatic |
fiff_setup_read_raw
Wrapper for the FiffStream::setup_read_raw static function
Read information about raw data file
[in] | p_IODevice | A fiff IO device like a fiff QFile or QTCPSocket. |
[out] | data | The raw data information - contains the opened fiff file. |
[in] | allow_maxshield | Accept unprocessed MaxShield data. |
|
inlinestatic |
fiff_split_name_list
Wrapper for the FiffStream::split_name_list static function
Splits a string by looking for seperator ":"
[in] | p_sNameList | string to split. |
|
inlinestatic |
fiff_start_block
Wrapper for the FiffStream start_block member function
Writes a FIFF_BLOCK_START tag
[in] | p_pStream | An open fif file to write to. |
[in] | kind | The block kind to start. |
|
inlinestatic |
fiff_start_file
Wrapper for the FiffStream::start_file static function
Opens a fiff file for writing and writes the compulsory header tags
[in] | p_IODevice | A fiff IO device like a fiff QFile or QTCPSocket. |
|
inlinestatic |
fiff_start_writing_raw
Wrapper for the FiffStream::start_writing_raw static function
function [fid,cals] = fiff_start_writing_raw(name,info,sel)
[in] | p_IODevice | A fiff IO device like a fiff QFile or QTCPSocket. |
[in] | info | The measurement info block of the source file. |
[out] | cals | Thecalibration matrix. |
[in] | sel | Which channels will be included in the output file (optional). |
|
inlinestatic |
fiff_write_ch_info
Wrapper for the FiffStream write_ch_info member function
Writes a channel information record to a fif file The type, cal, unit, and pos members are explained in Table 9.5 of the MNE manual
[in] | p_pStream | An open fif file. |
[in] | ch | The channel information structure to write. |
|
inlinestatic |
fiff_write_coord_trans
Wrapper for the FiffStream write_coord_trans member function
Writes a coordinate transformation structure
[in] | p_pStream | An open fif file. |
[in] | trans | The coordinate transfomation structure. |
|
inlinestatic |
fiff_write_ctf_comp
Wrapper for the FiffStream write_ctf_comp member function
Writes the CTF compensation data into a fif file
[in] | p_pStream | An open fif file. |
[in] | comps | The compensation data to write. |
|
inlinestatic |
fiff_write_dig_point
Wrapper for the FiffStream write_dig_point member function
Writes a digitizer data point into a fif file
[in] | p_pStream | An open fif file. |
[in] | dig | The point to write. |
|
inlinestatic |
fiff_write_float
Wrapper for the FiffStream write_float member function
Writes a single-precision floating point tag to a fif file
[in] | p_pStream | An open fif file. |
[in] | kind | Tag kind. |
[in] | data | The float data pointer. |
[in] | nel | Number of floats to write (default = 1). |
|
inlinestatic |
fiff_write_float_matrix
Wrapper for the FiffStream write_float_matrix member function
Writes a single-precision floating-point matrix tag
[in] | p_pStream | An open fif file. |
[in] | kind | The tag kind. |
[in] | mat | The data matrix. |
|
inlinestatic |
fiff_write_id
Wrapper for the FiffStream write_id member function
Writes fiff id If the id argument is missing it will be generated here
[in] | p_pStream | An open fif file. |
[in] | kind | The tag kind. |
[in] | id | The id to write. |
|
inlinestatic |
fiff_write_int
Wrapper for the FiffStream write_int member function
Writes a 32-bit integer tag to a fif file
[in] | p_pStream | An open fif file. |
[in] | kind | Tag kind. |
[in] | data | The integer data pointer. |
[in] | nel | Number of integers to write (default = 1). |
|
inlinestatic |
fiff_write_name_list
Wrapper for the FiffStream write_name_list member function
Writes a colon-separated list of names
[in] | p_pStream | An open fif file. |
[in] | kind | The tag kind. |
[in] | data | An array of names to create the list from. |
|
inlinestatic |
fiff_write_named_matrix
Wrapper for the FiffStream write_named_matrix member function
Writes a named single-precision floating-point matrix
[in] | p_pStream | An open fif file. |
[in] | kind | The tag kind to use for the data. |
[in] | mat | The data matrix. |
|
inlinestatic |
fiff_write_proj
Wrapper for the FiffStream write_proj member function
Writes the projection data into a fif file
[in] | p_pStream | An open fif file. |
[in] | projs | The compensation data to write. |
|
inlinestatic |
fiff_write_raw_buffer
Wrapper for the FiffStream write_raw_buffer member function
Writes a raw buffer.
[in] | p_pStream | An open fif file. |
[in] | buf | the buffer to write. |
[in] | cals | calibration factors. |
|
inlinestatic |
fiff_write_string
Wrapper for the FiffStream write_string member function
Writes a string tag
[in] | p_pStream | An open fif file. |
[in] | kind | The tag kind. |
[in] | data | The string data to write. |