56 #include <QtCore/QCoreApplication>
64 using namespace FIFFLIB;
65 using namespace MNELIB;
82 int main(
int argc,
char *argv[])
84 QCoreApplication a(argc, argv);
86 QFile t_fileRaw(
"./MNE-sample-data/MEG/sample/sample_audvis_raw.fif");
91 bool in_samples =
false;
93 bool keep_comp =
true;
105 include <<
"STI 014";
106 bool want_meg =
true;
107 bool want_eeg =
false;
108 bool want_stim =
false;
110 RowVectorXi picks = raw.info.pick_types(want_meg, want_eeg, want_stim, include, raw.info.bads);
116 if (raw.info.projs.size() == 0)
117 printf(
"No projector specified for these data\n");
123 for (k = 0; k < raw.info.projs.size(); ++k)
124 raw.info.projs[k].active =
true;
126 printf(
"%d projection items activated\n",raw.info.projs.size());
130 fiff_int_t nproj = raw.info.make_projector(raw.proj);
133 printf(
"The projection vectors do not apply to these channels\n");
135 printf(
"Created an SSP operator (subspace dimension = %d)\n",nproj);
141 qint32 current_comp = raw.info.get_current_comp();
142 qint32 dest_comp = -1;
144 if (current_comp > 0)
145 printf(
"Current compensation grade : %d\n",current_comp);
148 dest_comp = current_comp;
150 if (current_comp != dest_comp)
152 qDebug() <<
"This part needs to be debugged";
153 if(MNE::make_compensator(raw.info, current_comp, dest_comp, raw.comp))
155 raw.info.set_current_comp(dest_comp);
156 printf(
"Appropriate compensator added to change to grade %d.\n",dest_comp);
160 printf(
"Could not make the compensator\n");
168 bool readSuccessful =
false;
172 readSuccessful = raw.read_raw_segment(data, times, (qint32)from, (qint32)to, picks);
174 readSuccessful = raw.read_raw_segment_times(data, times, from, to, picks);
178 printf(
"Could not read raw segment.\n");
182 printf(
"Read %d samples.\n",(qint32)data.cols());
185 std::cout << data.block(0,0,10,10) << std::endl;
MNE class declaration, which provides static wrapper functions to stay consistent with mne matlab too...
FIFF raw measurement data.
FIFF class declaration, which provides static wrapper functions to stay consistent with mne matlab to...