40 #include "ui_fwdsettingsview.h"
49 #include <QFileDialog>
50 #include <QMessageBox>
61 using namespace DISPLIB;
62 using namespace FSLIB;
76 , m_bAnnotaionsLoaded(false)
77 , m_pUi(new Ui::FwdSettingsViewWidget)
83 m_pUi->m_checkBox_bDoRecomputation->setChecked(
false);
84 m_pUi->m_checkBox_bDoClustering->setChecked(
false);
85 m_pUi->m_lineEdit_iNChan->setText(QString::number(0));
86 m_pUi->m_lineEdit_iNSourceSpace->setText(QString::number(0));
87 m_pUi->m_lineEdit_iNDipole->setText(QString::number(0));
88 m_pUi->m_lineEdit_sSourceOri->setText(
"fixed");
89 m_pUi->m_lineEdit_sCoordFrame->setText(
"Head Space");
90 m_pUi->m_lineEdit_iNDipoleClustered->setText(
"Not Clustered");
93 QString t_sAtlasDir = QCoreApplication::applicationDirPath() +
"/../resources/data/MNE-sample-data/subjects/sample/label";
94 m_pUi->m_qLineEdit_AtlasDirName->setText(t_sAtlasDir);
98 if(!t_pAnnotationSet->isEmpty() && t_pAnnotationSet->size() == 2)
101 m_pUi->m_qLabel_atlasStat->setText(
"loaded");
106 m_pUi->m_qLabel_atlasStat->setText(
"not loaded");
110 connect(
m_pUi->m_checkBox_bDoRecomputation, &QCheckBox::clicked,
112 connect(
m_pUi->m_qPushButton_AtlasDirDialog, &QPushButton::released,
114 connect(
m_pUi->m_checkBox_bDoClustering, &QCheckBox::clicked,
116 connect(
m_pUi->m_qPushButton_ComputeForward, &QPushButton::clicked,
125 FwdSettingsView::~FwdSettingsView()
140 QSettings settings(
"MNECPP");
152 QSettings settings(
"MNECPP");
153 QVariant defaultData;
161 case GuiMode::Clinical:
173 case ProcessingMode::Offline:
184 return m_pUi->m_checkBox_bDoRecomputation->isChecked();
192 m_pUi->m_label_recomputationFeedback->setText(
"Initializing");
193 m_pUi->m_label_recomputationFeedback->setStyleSheet(
"QLabel { background-color : red;}");
194 }
else if(iStatus == 1) {
195 m_pUi->m_label_recomputationFeedback->setText(
"Computing");
196 m_pUi->m_label_recomputationFeedback->setStyleSheet(
"QLabel { background-color : red;}");
197 }
else if (iStatus == 2) {
198 m_pUi->m_label_recomputationFeedback->setText(
"Recomputing");
199 m_pUi->m_label_recomputationFeedback->setStyleSheet(
"QLabel { background-color : red;}");
200 }
else if (iStatus == 3) {
201 m_pUi->m_label_recomputationFeedback->setText(
"Clustering");
202 m_pUi->m_label_recomputationFeedback->setStyleSheet(
"QLabel { background-color : red;}");
203 }
else if (iStatus == 4) {
204 m_pUi->m_label_recomputationFeedback->setText(
"Not Computed");
205 m_pUi->m_label_recomputationFeedback->setStyleSheet(
"QLabel { background-color : red;}");
207 m_pUi->m_label_recomputationFeedback->setText(
"Finished");
208 m_pUi->m_label_recomputationFeedback->setStyleSheet(
"QLabel { background-color : green;}");
215 FIFFLIB::fiff_int_t iCoordFrame,
221 if(iSourceOri == 0) {
222 m_pUi->m_lineEdit_sSourceOri->setText(
"fixed");
224 m_pUi->m_lineEdit_sSourceOri->setText(
"free");
228 if(iCoordFrame == FIFFV_COORD_HEAD) {
229 m_pUi->m_lineEdit_sCoordFrame->setText(
"Head Space");
230 }
else if (iCoordFrame == FIFFV_COORD_MRI){
231 m_pUi->m_lineEdit_sCoordFrame->setText(
"MRI Space");
233 m_pUi->m_lineEdit_sCoordFrame->setText(
"Unknown");
237 m_pUi->m_lineEdit_iNDipole->setText(QString::number(iNSource));
240 m_pUi->m_lineEdit_iNDipoleClustered->setText(
"Not clustered");
243 m_pUi->m_lineEdit_iNChan->setText(QString::number(iNChan));
246 m_pUi->m_lineEdit_iNSourceSpace->setText(QString::number(iNSpaces));
253 return m_pUi->m_checkBox_bDoClustering->isChecked();
262 msgBox.setText(
"Please load an annotation set before clustering.");
264 m_pUi->m_checkBox_bDoClustering->setChecked(
false);
276 m_pUi->m_lineEdit_iNDipoleClustered->setText(QString::number(iNSources));
283 QString t_sAtlasDir = QFileDialog::getExistingDirectory(
this, tr(
"Open Atlas Directory"),
284 QCoreApplication::applicationDirPath(),
285 QFileDialog::ShowDirsOnly
286 | QFileDialog::DontResolveSymlinks);
288 m_pUi->m_qLineEdit_AtlasDirName->setText(t_sAtlasDir);
292 if(!t_pAnnotationSet->isEmpty() && t_pAnnotationSet->size() == 2)
295 m_pUi->m_qLabel_atlasStat->setText(
"loaded");
300 m_pUi->m_qLabel_atlasStat->setText(
"not loaded");