53 #define VEC_COPY(to,from) {\
69 using namespace Eigen;
70 using namespace MNELIB;
71 using namespace FIFFLIB;
77 MneSssData::MneSssData()
79 , coord_frame(FIFFV_COORD_UNKNOWN)
93 : job(p_MneSssData.job)
94 , coord_frame(p_MneSssData.coord_frame)
95 , nchan(p_MneSssData.nchan)
96 , out_order(p_MneSssData.out_order)
97 , in_order(p_MneSssData.in_order)
98 , ncomp(p_MneSssData.ncomp)
99 , in_nuse(p_MneSssData.in_nuse)
100 , out_nuse(p_MneSssData.out_nuse)
141 QList<FiffDirNode::SPtr> sss;
150 if (sss.size() > 0) {
157 s->
job = *t_pTag->toInt();
165 r0 = t_pTag->toFloat();
178 s->
nchan = *t_pTag->toInt();
182 qDebug() <<
"ToDo: Check whether comp_info contains the right stuff!!! - use VectorXi instead";
184 s->
ncomp = t_pTag->size()/
sizeof(fiff_int_t);
187 printf(
"Number of SSS components does not match the expansion orders listed in the file");
193 for (j = 0, n = 3, p = 0; j < s->
in_order; j++, n = n + 2) {
194 for (q = 0; q < n; q++, p++)
198 for (j = 0, n = 3; j < s->
out_order; j++, n = n + 2) {
199 for (q = 0; q < n; q++, p++)
231 const char *mne_coord_frame_name_1(
int frame)
234 {FIFFV_COORD_UNKNOWN,
"unknown"},
235 {FIFFV_COORD_DEVICE,
"MEG device"},
236 {FIFFV_COORD_ISOTRAK,
"isotrak"},
237 {FIFFV_COORD_HPI,
"hpi"},
238 {FIFFV_COORD_HEAD,
"head"},
239 {FIFFV_COORD_MRI,
"MRI (surface RAS)"},
241 {FIFFV_COORD_MRI_SLICE,
"MRI slice"},
242 {FIFFV_COORD_MRI_DISPLAY,
"MRI display"},
252 for (
k = 0; frames[
k].frame != -1;
k++) {
253 if (frame == frames[
k].frame)
254 return frames[
k].name;
256 return frames[
k].name;
265 fprintf(f,
"job : %d\n",this->
job);
266 fprintf(f,
"coord frame : %s\n",mne_coord_frame_name_1(this->
coord_frame));
267 fprintf(f,
"origin : %6.1f %6.1f %6.1f mm\n",1000*this->
origin[0],1000*this->
origin[1],1000*this->
origin[2]);
268 fprintf(f,
"in order : %d\n",this->
in_order);
269 fprintf(f,
"out order : %d\n",this->
out_order);
270 fprintf(f,
"nchan : %d\n",this->
nchan);
271 fprintf(f,
"ncomp : %d\n",this->
ncomp);
272 fprintf(f,
"in nuse : %d\n",this->
in_nuse);
273 fprintf(f,
"out nuse : %d\n",this->
out_nuse);
274 fprintf(f,
"comps : ");
278 for (j = 0, n = 3, p = 0; j < this->
in_order; j++, n = n + 2) {
281 for (q = 0; q < n; q++, p++)
285 for (j = 0, n = 3; j < this->
out_order; j++, n = n + 2) {
288 for (q = 0; q < n; q++, p++)