46 #include <fiff/fiff_evoked.h>
60 #include <QGuiApplication>
70 using namespace FSLIB;
90 int main(
int argc,
char *argv[])
92 QGuiApplication a(argc, argv);
97 QFile t_fileFwd(
"./MNE-sample-data/MEG/sample/sample_audvis-meg-eeg-oct-6-fwd.fif");
98 QFile t_fileCov(
"./MNE-sample-data/MEG/sample/sample_audvis-cov.fif");
99 QFile t_fileEvoked(
"./MNE-sample-data/MEG/sample/sample_audvis-ave.fif");
100 AnnotationSet t_annotationSet(
"sample", 2,
"aparc.a2009s",
"./MNE-sample-data/subjects");
101 SurfaceSet t_surfSet(
"sample", 2,
"white",
"./MNE-sample-data/subjects");
104 QString t_sFileClusteredInverse(
"");
107 double lambda2 = 1.0 / pow(snr, 2);
108 QString method(
"dSPM");
111 fiff_int_t setno = 1;
112 QPair<QVariant, QVariant> baseline(QVariant(), 0);
113 FiffEvoked evoked(t_fileEvoked, setno, baseline);
117 std::cout <<
"Evoked description: " << evoked.comment.toLatin1().constData() << std::endl;
126 noise_cov = noise_cov.regularize(evoked.info, 0.05, 0.05, 0.1,
true);
140 if(!t_sFileClusteredInverse.isEmpty())
142 QFile t_fileClusteredInverse(t_sFileClusteredInverse);
143 inverse_operator.write(t_fileClusteredInverse);
149 MinimumNorm minimumNorm(inverse_operator, lambda2, method);
165 QList<Label> t_qListLabels;
166 QList<RowVector4i> t_qListRGBAs;
169 t_annotationSet.toLabels(t_surfSet, t_qListLabels, t_qListRGBAs);
171 InverseView view(minimumNorm.getSourceSpace(), t_qListLabels, t_qListRGBAs, 24,
true,
false);
173 if (view.stereoType() != QGLView::RedCyanAnaglyph)
174 view.camera()->setEyeSeparation(0.3f);
175 QStringList args = QCoreApplication::arguments();
176 int w_pos = args.indexOf(
"-width");
177 int h_pos = args.indexOf(
"-height");
178 if (w_pos >= 0 && h_pos >= 0)
181 int w = args.at(w_pos + 1).toInt(&ok);
184 qWarning() <<
"Could not parse width argument:" << args;
187 int h = args.at(h_pos + 1).toInt(&ok);
190 qWarning() <<
"Could not parse height argument:" << args;
197 view.resize(800, 600);
199 view.setTitle(QString(
"Online Brain Monitoring - %1").arg(evoked.comment));
217 view.pushSourceEstimate(sourceEstimate);
FIFF measurement file information.
MNEForwardSolution cluster_forward_solution(const AnnotationSet &p_AnnotationSet, qint32 p_iClusterSize, MatrixXd &p_D=defaultD, const FiffCov &p_pNoise_cov=defaultCov, const FiffInfo &p_pInfo=defaultInfo, QString p_sMethod="cityblock") const
Minimum norm class declaration.
Surface class declaration.
MNESourceEstimate class declaration.
AnnotationSet class declaration.
InverseView class declaration.
A hemisphere set of surfaces.