50 #include <Eigen/SparseCore>
62 using namespace FIFFLIB;
63 using namespace Eigen;
71 qRegisterMetaType<FIFFLIB::FiffEvokedSet>(
"FIFFLIB::FiffEvokedSet");
72 qRegisterMetaType<FIFFLIB::FiffEvokedSet::SPtr>(
"FIFFLIB::FiffEvokedSet::SPtr");
79 qRegisterMetaType<FIFFLIB::FiffEvokedSet>(
"FIFFLIB::FiffEvokedSet");
80 qRegisterMetaType<FIFFLIB::FiffEvokedSet::SPtr>(
"FIFFLIB::FiffEvokedSet::SPtr");
84 printf(
"\tFiff evoked data set not found.\n");
92 : info(p_FiffEvokedSet.info)
93 , evoked(p_FiffEvokedSet.evoked)
114 const QStringList& exclude)
const
118 QList<FiffEvoked>::ConstIterator ev;
120 res.
evoked.push_back(ev->pick_channels(include, exclude));
173 printf(
"Data is already compensated as desired.\n");
180 for(qint16 i=0; i < p_FiffEvokedSet.
evoked.size(); ++i)
182 p_FiffEvokedSet.
evoked[i].data = ctf_comp.data->data*p_FiffEvokedSet.
evoked[i].data;
195 if(!p_FiffEvokedSet.
evoked.size()) {
196 printf(
"No evoked response data sets in %s\n",p_FiffEvokedSet.
info.
filename.toUtf8().constData());
200 printf(
"\nFound %lld evoked response data sets in %s :\n",p_FiffEvokedSet.
evoked.size(),p_FiffEvokedSet.
info.
filename.toUtf8().constData());
202 for(qint32 i = 0; i < p_FiffEvokedSet.
evoked.size(); ++i) {
203 printf(
"%s (%s)\n",p_FiffEvokedSet.
evoked.at(i).comment.toUtf8().constData(),p_FiffEvokedSet.
evoked.at(i).aspectKindToString().toUtf8().constBegin());
215 p_FiffEvokedSet.
clear();
221 QString t_sFileName = t_pStream->streamName();
223 printf(
"Exploring %s ...\n",t_sFileName.toUtf8().constData());
225 if(!t_pStream->open())
231 if(!t_pStream->read_meas_info(t_pStream->dirtree(), p_FiffEvokedSet.
info, meas))
237 QList<FiffDirNode::SPtr> processed = meas->dir_tree_find(FIFFB_PROCESSED_DATA);
238 if (processed.size() == 0)
240 qWarning(
"Could not find processed data");
244 QList<FiffDirNode::SPtr> evoked_node = meas->dir_tree_find(FIFFB_EVOKED);
245 if (evoked_node.size() == 0)
247 qWarning(
"Could not find evoked data");
251 QStringList comments;
252 QList<fiff_int_t> aspect_kinds;
254 if(!t_pStream->get_evoked_entries(evoked_node, comments, aspect_kinds, t))
255 t = QString(
"None found, must use integer");
256 printf(
"\tFound %lld datasets\n", evoked_node.size());
258 for(qint32 i = 0; i < comments.size(); ++i)
261 printf(
">> Processing %s <<\n", comments[i].toUtf8().constData());
264 p_FiffEvokedSet.
evoked.push_back(t_FiffEvoked);