91 std::unique_ptr<MNESssData> s;
104 auto s = std::make_unique<MNESssData>();
105 QList<FiffDirNode::SPtr> sss;
114 if (sss.size() > 0) {
122 s->job = *t_pTag->toInt();
127 s->coord_frame = *t_pTag->toInt();
132 r0 = t_pTag->toFloat();
133 Eigen::Map<Eigen::Vector3f>(s->origin) = Eigen::Map<const Eigen::Vector3f>(r0);
138 s->in_order = *t_pTag->toInt();
143 s->out_order = *t_pTag->toInt();
148 s->nchan = *t_pTag->toInt();
154 int ncomp = t_pTag->size()/
sizeof(fiff_int_t);
155 int *raw = t_pTag->toInt();
156 s->comp_info = Eigen::VectorXi::Map(raw, ncomp);
158 if (ncomp != (s->in_order*(2+s->in_order) + s->out_order*(2+s->out_order))) {
159 qCritical(
"Number of SSS components does not match the expansion orders listed in the file");
166 for (j = 0, n = 3, p = 0; j < s->in_order; j++, n = n + 2) {
167 for (q = 0; q < n; q++, p++)
171 for (j = 0, n = 3; j < s->out_order; j++, n = n + 2) {
172 for (q = 0; q < n; q++, p++)
217 for (k = 0; frames[k].
frame != -1; k++) {
218 if (frame == frames[k].frame)
219 return frames[k].
name;
221 return frames[k].
name;
230 out <<
"job : " << this->
job <<
"\n";
232 out <<
"origin : " << qSetFieldWidth(6) << qSetRealNumberPrecision(1) << Qt::fixed
233 << 1000*this->
origin[0] <<
" " << 1000*this->
origin[1] <<
" " << 1000*this->
origin[2] << qSetFieldWidth(0) <<
" mm\n";
234 out <<
"in order : " << this->
in_order <<
"\n";
235 out <<
"out order : " << this->
out_order <<
"\n";
236 out <<
"nchan : " << this->
nchan <<
"\n";
237 out <<
"ncomp : " << this->
comp_info.size() <<
"\n";
238 out <<
"in nuse : " << this->
in_nuse <<
"\n";
239 out <<
"out nuse : " << this->
out_nuse <<
"\n";
244 for (j = 0, n = 3, p = 0; j < this->in_order; j++, n = n + 2) {
247 for (q = 0; q < n; q++, p++)
251 for (j = 0, n = 3; j < this->out_order; j++, n = n + 2) {
254 for (q = 0; q < n; q++, p++)
const char * mne_coord_frame_name_1(int frame)
Signal Space Separation (Maxwell filter) basis metadata stored alongside MEG raw data.
Symbolic FIFF tag, block, value, unit and channel-type constants shared across FIFFLIB.
#define FIFFV_MNE_COORD_MNI_TAL
#define FIFFV_MNE_COORD_FS_TAL_LTZ
#define FIFFV_COORD_MRI_SLICE
#define FIFFV_MNE_COORD_CTF_DEVICE
#define FIFFV_COORD_DEVICE
#define FIFFV_COORD_MRI_DISPLAY
#define FIFFV_MNE_COORD_MRI_VOXEL
#define FIFFV_MNE_COORD_CTF_HEAD
#define FIFFV_COORD_ISOTRAK
#define FIFFV_COORD_UNKNOWN
#define FIFFV_MNE_COORD_FS_TAL_GTZ
#define FIFFV_MNE_COORD_RAS
FIFF tag-kind, block-kind and type-code numerical definitions, authoritative for FIFFLIB.
#define FIFF_SSS_COMPONENTS
#define FIFFV_SSS_JOB_NOTHING
FIFF tag: the 16-byte tag header (kind, type, size, next) plus its decoded payload.
FIFF binary tag-stream layer: wraps a QIODevice to read and write FIFF tags, directories,...
Core MNE data structures (source spaces, source estimates, hemispheres).
FIFF file I/O, in-memory data structures and high-level readers/writers.
QSharedPointer< FiffDirNode > SPtr
FIFF tag-stream reader/writer: wraps a QIODevice and exposes typed read_* / write_* methods for every...
QSharedPointer< FiffStream > SPtr
std::unique_ptr< FiffTag > UPtr
Lookup record mapping a FIFF coordinate frame integer code to its human-readable name.
Eigen::VectorXi comp_info
static std::unique_ptr< MNESssData > read_from_node(QSharedPointer< FIFFLIB::FiffStream > &stream, const QSharedPointer< FIFFLIB::FiffDirNode > &start)
void print(QTextStream &out) const
static std::unique_ptr< MNESssData > read(const QString &name)