53 #include <QElapsedTimer>
59 using namespace RTPROCESSINGLIB;
60 using namespace FIFFLIB;
61 using namespace Eigen;
62 using namespace INVERSELIB;
70 m_pHpiFit = QSharedPointer<INVERSELIB::HPIFit>(
new HPIFit(sensorSet));
74 const Eigen::MatrixXd& matProjectors,
76 const Eigen::MatrixXd& matCoilsHead)
78 if(this->thread()->isInterruptionRequested()) {
84 fitResult.devHeadTrans.
from = 1;
85 fitResult.devHeadTrans.
to = 4;
87 m_pHpiFit->fit(matData,
93 emit resultReady(fitResult);
102 m_sensorSet(sensorSet)
104 qRegisterMetaType<INVERSELIB::HpiFitResult>(
"INVERSELIB::HpiFitResult");
105 qRegisterMetaType<QVector<int> >(
"QVector<int>");
106 qRegisterMetaType<QSharedPointer<FIFFLIB::FiffInfo> >(
"QSharedPointer<FIFFLIB::FiffInfo>");
107 qRegisterMetaType<Eigen::MatrixXd>(
"Eigen::MatrixXd");
113 worker, &QObject::deleteLater);
115 connect(
this, &RtHpi::operate,
118 connect(worker, &RtHpiWorker::resultReady,
135 if(m_modelParameters.iNHpiCoils() >= 3) {
141 qWarning() <<
"[RtHpi::append] Not enough coil frequencies set. At least three frequencies are needed.";
149 m_modelParameters = hpiModelParameters;
170 emit newHpiFitResultAvailable(fitResult);
183 worker, &QObject::deleteLater);
185 connect(
this, &RtHpi::operate,
188 connect(worker, &RtHpiWorker::resultReady,