Skip to main content

FiffChPos

Namespace: FIFFLIB  ·  Library: FIFF Library

#include <fiff/fiff_ch_pos.h>

class FIFFLIB::FiffChPos

Channel coil-frame placement: origin r0 (m) and orthonormal axes ex / ey / ez in FIFFV_COORD_DEVICE.

Twelve floats laid out exactly like the fiffChPosRec struct: three for r0 and three each for ex, ey, ez. Consumed by forward-solution coil integration and by sensor visualization to draw oriented coil glyphs in the device frame.

src/examples/ex_fiff_api/main.cpp
QFile rawFile(dir + "/sample_audvis_trunc_raw.fif");
FiffRawData raw(rawFile); // reads the measurement info, raw data is read on demand
const FiffInfo& info = raw.info; // channels, sampling rate, bads, projectors, digitizer, transforms
const FiffChInfo& first = info.chs[0];
const RowVectorXi megPicks = info.pick_types(true, false, false, QStringList(), info.bads); // good MEG channels

Public Methods​

FiffChPos()​

Constructs the coil position descriptor.


FiffChPos(p_FiffChPos)​

Copy constructor.

Parameters:

  • p_FiffChPos : const FiffChPos & Coil position descriptor which should be copied.

operator=(other)​

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:

  • other : const FiffChPos & Object to assign from.

Returns:


~FiffChPos()​

Destroys the coil position descriptor.


Static Methods​

storageSize()​

Size of the old struct (fiffChPosRec) 13int = 134 = 52.

Returns:

  • qint32 — the size of the old struct fiffChPosRec.

Example​

Used in examples​

ex_fiff_api​

FIFF library: measurement info, channels, digitizer, transforms, projectors, covariance, events,.

src/examples/ex_fiff_api/main.cpp, line 117
"FiffInfo: 376 channels at 300.307 Hz, 2 bads, 4 projectors, 305 good MEG channels");
// ch 0: MEG 0113, planar gradiometer 3012 at (-0.1066, 0.0464, -0.0604) m, cal 3.16e-9
ok &= expect(first.ch_name == "MEG0113" && first.kind == FIFFV_MEG_CH && first.chpos.coil_type == FIFFV_COIL_VV_PLANAR_T1 && (first.chpos.r0 - Vector3f(-0.1066f, 0.0464f, -0.0604f)).norm() < 1e-6f && near(first.cal, 3.1600000394149674e-09),
"FiffChInfo/FiffChPos: MEG0113 is a 3012 planar gradiometer at (-0.1066, 0.0464, -0.0604) m");

Authors of this file​