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

FIFF data tag. More...

#include <fiff_tag.h>

Public Types

typedef QSharedPointer< FiffTagSPtr
typedef QSharedPointer< const FiffTagConstSPtr

Public Member Functions

 FiffTag ()
 FiffTag (const FiffTag &p_FiffTag)=default
 FiffTag (FiffTag &&other)=default
FiffTagoperator= (const FiffTag &other)=default
FiffTagoperator= (FiffTag &&other)=default
 ~FiffTag ()=default
fiff_int_t getMatrixCoding () const
bool isMatrix () const
bool getMatrixDimensions (qint32 &p_ndim, QVector< qint32 > &p_Dims) const
fiff_int_t getType () const
QString getInfo () const
quint8 * toByte () const
quint16 * toUnsignedShort () const
qint16 * toShort () const
quint32 * toUnsignedInt () const
qint32 * toInt () const
qint32 * toJulian () const
float * toFloat () const
double * toDouble () const
QString toString () const
qint16 * toDauPack16 () const
FiffId toFiffID () const
FiffDigPoint toDigPoint () const
FiffCoordTrans toCoordTrans () const
FiffChInfo toChInfo () const
QList< QSharedPointer< FiffDirEntry > > toDirEntry () const
Eigen::MatrixXi toIntMatrix () const
Eigen::MatrixXf toFloatMatrix () const
Eigen::SparseMatrix< double > toSparseFloatMatrix () const

Static Public Member Functions

static void convert_ch_pos (FiffChPos *pos)
static void convert_matrix_from_file_data (FiffTag::SPtr tag)
static void convert_matrix_to_file_data (FiffTag::SPtr tag)
static void convert_tag_data (FiffTag::SPtr tag, int from_endian, int to_endian)
static fiff_int_t fiff_type_fundamental (fiff_int_t type)
static fiff_int_t fiff_type_base (fiff_int_t type)
static fiff_int_t fiff_type_matrix_coding (fiff_int_t type)
static qint32 storageSize ()

Public Attributes

fiff_int_t kind
fiff_int_t type
fiff_int_t next

Detailed Description

FIFF data tag.

Tags are used in front of data items to tell what they are.

Definition at line 151 of file fiff_tag.h.

Inheritance diagram for FIFFLIB::FiffTag:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const FiffTag> FIFFLIB::FiffTag::ConstSPtr

Const shared pointer type for FiffTag.

Definition at line 156 of file fiff_tag.h.

◆ SPtr

typedef QSharedPointer<FiffTag> FIFFLIB::FiffTag::SPtr

Shared pointer type for FiffTag.

Definition at line 155 of file fiff_tag.h.

Constructor & Destructor Documentation

◆ FiffTag() [1/3]

FiffTag::FiffTag ( )

Constructs a default FiffTag.

Definition at line 63 of file fiff_tag.cpp.

◆ FiffTag() [2/3]

FIFFLIB::FiffTag::FiffTag ( const FiffTag & p_FiffTag)
default

Copy constructor.

Parameters
[in]p_FiffTagFiffTag to copy.

◆ FiffTag() [3/3]

FIFFLIB::FiffTag::FiffTag ( FiffTag && other)
default

Move constructor.

◆ ~FiffTag()

FIFFLIB::FiffTag::~FiffTag ( )
default

Destroys the FiffTag.

Member Function Documentation

◆ convert_ch_pos()

void FiffTag::convert_ch_pos ( FiffChPos * pos)
static

Convert coil position descriptor

Parameters
[in,out]poscoil position descriptor to convert.

Machine dependent data type conversions (tag info only)

Definition at line 273 of file fiff_tag.cpp.

◆ convert_matrix_from_file_data()

void FiffTag::convert_matrix_from_file_data ( FiffTag::SPtr tag)
static

Machine dependent data type conversions (tag info only)

from_endian defines the byte order of the input to_endian defines the byte order of the output

Either of these may be specified as FIFFV_LITTLE_ENDIAN, FIFFV_BIG_ENDIAN, or FIFFV_NATIVE_ENDIAN. The last choice means that the native byte order value will be substituted here before proceeding

Definition at line 288 of file fiff_tag.cpp.

◆ convert_matrix_to_file_data()

void FiffTag::convert_matrix_to_file_data ( FiffTag::SPtr tag)
static

Convert matrix data before writing to a file inside a fiff tag

Parameters
[in,out]tagmatrix data to convert.

Definition at line 362 of file fiff_tag.cpp.

◆ convert_tag_data()

void FiffTag::convert_tag_data ( FiffTag::SPtr tag,
int from_endian,
int to_endian )
static

Machine dependent data type conversions (tag info only)

from_endian defines the byte order of the input to_endian defines the byte order of the output

Either of these may be specified as FIFFV_LITTLE_ENDIAN, FIFFV_BIG_ENDIAN, or FIFFV_NATIVE_ENDIAN. The last choice means that the native byte order value will be substituted here before proceeding

Parameters
[in,out]tagmatrix data to convert.
[in]from_endianfrom endian encoding.
[in]to_endianto endian encoding.

Definition at line 438 of file fiff_tag.cpp.

◆ fiff_type_base()

fiff_int_t FiffTag::fiff_type_base ( fiff_int_t type)
static

These return information about fiff type base.

Parameters
[in]typeThe fiff data type to query.
Returns
fiff type.

Definition at line 700 of file fiff_tag.cpp.

◆ fiff_type_fundamental()

fiff_int_t FiffTag::fiff_type_fundamental ( fiff_int_t type)
static

These return information about a fiff type.

Parameters
[in]typeThe fiff data type to query.
Returns
fiff type.

Definition at line 693 of file fiff_tag.cpp.

◆ fiff_type_matrix_coding()

fiff_int_t FiffTag::fiff_type_matrix_coding ( fiff_int_t type)
static

These return information about the matrix coding.

Parameters
[in]typeThe fiff data type to query.
Returns
matrix coding.

Definition at line 707 of file fiff_tag.cpp.

◆ getInfo()

QString FiffTag::getInfo ( ) const

Type information as a string

Returns
the tag type information.

Definition at line 138 of file fiff_tag.cpp.

◆ getMatrixCoding()

fiff_int_t FiffTag::getMatrixCoding ( ) const

Provides information about matrix coding

Returns
Matrix coding.

Definition at line 74 of file fiff_tag.cpp.

◆ getMatrixDimensions()

bool FiffTag::getMatrixDimensions ( qint32 & p_ndim,
QVector< qint32 > & p_Dims ) const

Returns matrix dimensions Refactors: fiff_get_matrix_dims (fiff_matrix.c)

Parameters
[out]p_ndimnumber of dimensions.
[out]p_Dimsvector containing the size of each dimension.
Returns
true if dimensions are available.

Definition at line 91 of file fiff_tag.cpp.

◆ getType()

fiff_int_t FiffTag::getType ( ) const

Provides the tag type information

Returns
the tag type.

Definition at line 124 of file fiff_tag.cpp.

◆ isMatrix()

bool FiffTag::isMatrix ( ) const

Provides information if tag contains a matrix

Returns
true if tag contains a matrix.

Definition at line 81 of file fiff_tag.cpp.

◆ operator=() [1/2]

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

Copy assignment operator.

◆ operator=() [2/2]

FiffTag & FIFFLIB::FiffTag::operator= ( FiffTag && other)
default

Move assignment operator.

◆ storageSize()

qint32 FIFFLIB::FiffTag::storageSize ( )
inlinestatic

Size of the on-disk tag info header: kind + type + size + next = 4 x fiff_int_t. This corresponds to the old sizeof(fiffTagRec) - sizeof(fiff_data_t *).

Returns
the byte size of the on-disk tag info header.

Definition at line 521 of file fiff_tag.h.

◆ toByte()

quint8 * FIFFLIB::FiffTag::toByte ( ) const
inline

to Byte Fast access; Data are deleted if tag gets deleted, and vice versa

Returns
type cast of the tag data pointer.

Definition at line 535 of file fiff_tag.h.

◆ toChInfo()

FiffChInfo FIFFLIB::FiffTag::toChInfo ( ) const
inline

to fiff CH INFO

Returns
Fiff channel info descriptor.

to fiff CH INFO STRUCT

Definition at line 762 of file fiff_tag.h.

◆ toCoordTrans()

FiffCoordTrans FIFFLIB::FiffTag::toCoordTrans ( ) const
inline

to fiff COORD TRANS

Returns
Fiff coordinate transformation descriptor.

Definition at line 720 of file fiff_tag.h.

◆ toDauPack16()

qint16 * FIFFLIB::FiffTag::toDauPack16 ( ) const
inline

to DauPack16 Fast access; Data are deleted if tag gets deleted, and vice versa

Returns
type cast of the tag data pointer.

Definition at line 629 of file fiff_tag.h.

◆ toDigPoint()

FiffDigPoint FIFFLIB::FiffTag::toDigPoint ( ) const
inline

to fiff DIG POINT

Returns
Fiff point descriptor.

Definition at line 694 of file fiff_tag.h.

◆ toDirEntry()

QList< QSharedPointer< FiffDirEntry > > FIFFLIB::FiffTag::toDirEntry ( ) const
inline

to fiff OLD PACK to fiff DIR ENTRY

Returns
List of directory entry descriptors.

to fiff OLD PACK

Definition at line 858 of file fiff_tag.h.

◆ toDouble()

double * FIFFLIB::FiffTag::toDouble ( ) const
inline

to Double Fast access; Data are deleted if tag gets deleted, and vice versa

Returns
type cast of the tag data pointer.

Definition at line 609 of file fiff_tag.h.

◆ toFiffID()

FiffId FIFFLIB::FiffTag::toFiffID ( ) const
inline

to fiff ID

Returns
Fiff universially unique identifier.

Definition at line 673 of file fiff_tag.h.

◆ toFloat()

float * FIFFLIB::FiffTag::toFloat ( ) const
inline

to Float Fast access; Data are deleted if tag gets deleted, and vice versa

Returns
type cast of the tag data pointer.

Definition at line 599 of file fiff_tag.h.

◆ toFloatMatrix()

Eigen::MatrixXf FIFFLIB::FiffTag::toFloatMatrix ( ) const
inline

to fiff FIFFT FLOAT MATRIX

parses a fiff float matrix

Returns
the parsed float matrix.

Definition at line 911 of file fiff_tag.h.

◆ toInt()

qint32 * FIFFLIB::FiffTag::toInt ( ) const
inline

to Int Fast access; Data are deleted if tag gets deleted, and vice versa

Returns
type cast of the tag data pointer.

Definition at line 575 of file fiff_tag.h.

◆ toIntMatrix()

Eigen::MatrixXi FIFFLIB::FiffTag::toIntMatrix ( ) const
inline

to fiff FIFFT INT MATRIX

Returns
Integer matrix.

Definition at line 887 of file fiff_tag.h.

◆ toJulian()

qint32 * FIFFLIB::FiffTag::toJulian ( ) const
inline

to Julian Fast access; Data are deleted if tag gets deleted, and vice versa

Returns
type cast of the tag data pointer.

Definition at line 587 of file fiff_tag.h.

◆ toShort()

qint16 * FIFFLIB::FiffTag::toShort ( ) const
inline

to Short Fast access; Data are deleted if tag gets deleted, and vice versa

Returns
type cast of the tag data pointer.

Definition at line 555 of file fiff_tag.h.

◆ toSparseFloatMatrix()

Eigen::SparseMatrix< double > FIFFLIB::FiffTag::toSparseFloatMatrix ( ) const
inline

to sparse fiff FIFFT FLOAT MATRIX

parses a sparse fiff float matrix and returns a double sparse matrix to make sure only double is used

Returns
a sparse double matrix which is newly created from the parsed float.

Definition at line 940 of file fiff_tag.h.

◆ toString()

QString FIFFLIB::FiffTag::toString ( ) const
inline

to String

Returns
converts data to a string.

Definition at line 619 of file fiff_tag.h.

◆ toUnsignedInt()

quint32 * FIFFLIB::FiffTag::toUnsignedInt ( ) const
inline

to Int Fast access; Data are deleted if tag gets deleted, and vice versa

Returns
type cast of the tag data pointer.

Definition at line 565 of file fiff_tag.h.

◆ toUnsignedShort()

quint16 * FIFFLIB::FiffTag::toUnsignedShort ( ) const
inline

to unsigned Short Fast access; Data are deleted if tag gets deleted, and vice versa

Returns
type cast of the tag data pointer.

Definition at line 545 of file fiff_tag.h.

Member Data Documentation

◆ kind

fiff_int_t FIFFLIB::FiffTag::kind

Tag number. This defines the meaning of the item

Definition at line 507 of file fiff_tag.h.

◆ next

fiff_int_t FIFFLIB::FiffTag::next

Pointer to the next object. Zero if the object follows sequentially in file. Negative at the end of file

Definition at line 511 of file fiff_tag.h.

◆ type

fiff_int_t FIFFLIB::FiffTag::type

Data type. This defines the representation of the data.

Definition at line 509 of file fiff_tag.h.


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