MNE-CPP  beta 1.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
FIFFLIB::FiffTag Class Reference

FIFF data tag. More...

#include <fiff_tag.h>

Inheritance diagram for FIFFLIB::FiffTag:

Public Types

typedef QSharedPointer< FiffTagSPtr
 
typedef QSharedPointer< const FiffTagConstSPtr
 

Public Member Functions

 FiffTag ()
 
 FiffTag (const FiffTag *p_pFiffTag)
 
 ~FiffTag ()
 
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 ()
 
quint16 * toUnsignedShort ()
 
qint16 * toShort ()
 
quint32 * toUnsignedInt ()
 
qint32 * toInt ()
 
float * toFloat ()
 
double * toDouble ()
 
QString toString ()
 
qint16 * toDauPack16 ()
 
std::complex< float > * toComplexFloat ()
 
std::complex< double > * toComplexDouble ()
 
FiffId toFiffID () const
 
FiffDigPoint toDigPoint () const
 
FiffCoordTrans toCoordTrans () const
 
FiffChInfo toChInfo () const
 
QList< FiffDirEntrytoDirEntry () const
 
MatrixXi toIntMatrix () const
 
MatrixXf toFloatMatrix () const
 
SparseMatrix< double > toSparseFloatMatrix () const
 

Static Public Member Functions

static bool read_tag_data (FiffStream *p_pStream, FiffTag::SPtr &p_pTag, qint64 pos=-1)
 
static bool read_tag_info (FiffStream *p_pStream, FiffTag::SPtr &p_pTag, bool p_bDoSkip=true)
 
static bool read_rt_tag (FiffStream *p_pStream, FiffTag::SPtr &p_pTag)
 
static bool read_tag (FiffStream *p_pStream, FiffTag::SPtr &p_pTag, qint64 pos=-1)
 
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)
 

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 163 of file fiff_tag.h.

Member Typedef Documentation

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

Const shared pointer type for FiffTag.

Definition at line 167 of file fiff_tag.h.

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

Shared pointer type for FiffTag.

Definition at line 166 of file fiff_tag.h.

Constructor & Destructor Documentation

FiffTag::FiffTag ( )

ctor //ToDo add FiffStream to constructor and remove static implementations –> make them members

Definition at line 68 of file fiff_tag.cpp.

FiffTag::FiffTag ( const FiffTag p_pFiffTag)

copy ctor //ToDo add FiffStream to constructor and remove static implementations –> make them members

Definition at line 77 of file fiff_tag.cpp.

FiffTag::~FiffTag ( )

Destroys the FiffTag.

Definition at line 98 of file fiff_tag.cpp.

Member Function Documentation

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 449 of file fiff_tag.cpp.

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

Convert matrix data read from a file inside a fiff tag

Parameters
[in,out]tagmatrix data to convert

Definition at line 465 of file fiff_tag.cpp.

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 540 of file fiff_tag.cpp.

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 617 of file fiff_tag.cpp.

fiff_int_t FiffTag::fiff_type_base ( fiff_int_t  type)
static

These return information about fiff type base.

Returns
fiff type

Definition at line 880 of file fiff_tag.cpp.

fiff_int_t FiffTag::fiff_type_fundamental ( fiff_int_t  type)
static

These return information about a fiff type.

Returns
fiff type

Definition at line 872 of file fiff_tag.cpp.

fiff_int_t FiffTag::fiff_type_matrix_coding ( fiff_int_t  type)
static

These return information about the matrix coding.

Returns
matrix coding

Definition at line 888 of file fiff_tag.cpp.

QString FiffTag::getInfo ( ) const

Type information as a string

Returns
the tag type information

Definition at line 311 of file fiff_tag.cpp.

fiff_int_t FiffTag::getMatrixCoding ( ) const

Provides information about matrix coding

Returns
Matrix coding

Definition at line 243 of file fiff_tag.cpp.

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

Returns matrix dimensions

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

Definition at line 262 of file fiff_tag.cpp.

fiff_int_t FiffTag::getType ( ) const

Provides the tag type information

Returns
the tag type

Definition at line 296 of file fiff_tag.cpp.

bool FiffTag::isMatrix ( ) const

Provides information if tag contains a matrix

Returns
true if tag contains a matrix

Definition at line 251 of file fiff_tag.cpp.

bool FiffTag::read_rt_tag ( FiffStream p_pStream,
FiffTag::SPtr p_pTag 
)
static

Read one tag from a fif real-time stream. difference to the other read tag functions is: that this function has blocking behaviour (waitForReadyRead)

Parameters
[in]p_pStreamopened fif file
[out]p_pTagthe read tag
Returns
true if succeeded, false otherwise

Definition at line 184 of file fiff_tag.cpp.

bool FiffTag::read_tag ( FiffStream p_pStream,
FiffTag::SPtr p_pTag,
qint64  pos = -1 
)
static

MNE toolbox root function ###: Implementation of the fiff_read_tag function

Read one tag from a fif file. if pos is not provided, reading starts from the current file position

Parameters
[in]p_pStreamopened fif file
[out]p_pTagthe read tag
[in]posposition of the tag inside the fif file
Returns
true if succeeded, false otherwise

Definition at line 204 of file fiff_tag.cpp.

bool FiffTag::read_tag_data ( FiffStream p_pStream,
FiffTag::SPtr p_pTag,
qint64  pos = -1 
)
static

MNE toolbox root function ###: Implementation of the fiff_read_tag function

Read tag data from a fif file. if pos is not provided, reading starts from the current file position

Parameters
[in]p_pStreamopened fif file
[out]p_pTagthe read tag
[in]posposition of the tag inside the fif file
Returns
true if succeeded, false otherwise

Definition at line 109 of file fiff_tag.cpp.

bool FiffTag::read_tag_info ( FiffStream p_pStream,
FiffTag::SPtr p_pTag,
bool  p_bDoSkip = true 
)
static

MNE toolbox root function ###: Implementation of the fiff_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

Parameters
[in]p_pStreamopened fif file
[out]p_pTagthe read tag info
[in]p_bDoSkipif true it skips the data of the tag (optional, default = true)
Returns
true if succeeded, false otherwise

Definition at line 137 of file fiff_tag.cpp.

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

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

Returns
type cast of the tag data pointer

Definition at line 606 of file fiff_tag.h.

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

to fiff CH INFO

Returns
Fiff channel info descriptor.

to fiff CH INFO STRUCT

Definition at line 834 of file fiff_tag.h.

std::complex< double > * FIFFLIB::FiffTag::toComplexDouble ( )
inline

to complex double Allocates new memory - pointer has to be deleted ater use

Returns
complex double array

Definition at line 722 of file fiff_tag.h.

std::complex< float > * FIFFLIB::FiffTag::toComplexFloat ( )
inline

to complex float Allocates new memory - pointer has to be deleted ater use

Returns
complex float array

Definition at line 705 of file fiff_tag.h.

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

to fiff COORD TRANS

Returns
Fiff coordinate transformation descriptor

Definition at line 791 of file fiff_tag.h.

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

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

Returns
type cast of the tag data pointer

Definition at line 694 of file fiff_tag.h.

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

to fiff DIG POINT

Returns
Fiff point descriptor

Definition at line 764 of file fiff_tag.h.

QList< 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 921 of file fiff_tag.h.

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

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

Returns
type cast of the tag data pointer

Definition at line 672 of file fiff_tag.h.

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

to fiff ID

Returns
Fiff universially unique identifier

Definition at line 741 of file fiff_tag.h.

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

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

Returns
type cast of the tag data pointer

Definition at line 661 of file fiff_tag.h.

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

to fiff FIFFT FLOAT MATRIX

parses a fiff float matrix

Returns
the parsed float matrix

Definition at line 976 of file fiff_tag.h.

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

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

Returns
type cast of the tag data pointer

Definition at line 650 of file fiff_tag.h.

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

to fiff FIFFT INT MATRIX

Returns
Integer matrix

Definition at line 951 of file fiff_tag.h.

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

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

Returns
type cast of the tag data pointer

Definition at line 628 of file fiff_tag.h.

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 wich is newly created from the parsed float

Definition at line 1006 of file fiff_tag.h.

QString FIFFLIB::FiffTag::toString ( )
inline

to String

Returns
converts data to a string

Definition at line 683 of file fiff_tag.h.

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

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

Returns
type cast of the tag data pointer

Definition at line 639 of file fiff_tag.h.

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

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

Returns
type cast of the tag data pointer

Definition at line 617 of file fiff_tag.h.

Member Data Documentation

fiff_int_t FIFFLIB::FiffTag::kind

Tag number. This defines the meaning of the item

Definition at line 576 of file fiff_tag.h.

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 583 of file fiff_tag.h.

fiff_int_t FIFFLIB::FiffTag::type

Data type. This defines the reperentation of the data.

Definition at line 578 of file fiff_tag.h.


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