Drives one HPI fit (per-coil dipole localisation, coil ordering, dewar-to-head transform). More...
#include <inv_hpi_fit.h>
Public Types | |
| typedef QSharedPointer< InvHpiFit > | SPtr |
| typedef QSharedPointer< const InvHpiFit > | ConstSPtr |
Public Member Functions | |
| InvHpiFit () | |
| InvHpiFit (const InvSensorSet &sensorSet) | |
| void | checkForUpdate (const InvSensorSet &sensorSet) |
| void | fit (const Eigen::MatrixXd &matProjectedData, const Eigen::MatrixXd &matProjectors, const InvHpiModelParameters &hpiModelParameters, const Eigen::MatrixXd &matCoilsHead, HpiFitResult &hpiFitResult) |
| void | fit (const Eigen::MatrixXd &matProjectedData, const Eigen::MatrixXd &matProjectors, const InvHpiModelParameters &hpiModelParameters, const Eigen::MatrixXd &matCoilsHead, const bool bOrderFrequencies, HpiFitResult &hpiFitResult) |
Static Public Member Functions | |
| static void | storeHeadPosition (float fTime, const Eigen::MatrixXf &matTransDevHead, Eigen::MatrixXd &matPosition, const Eigen::VectorXd &vecGoF, const QVector< double > &vecError) |
| static bool | compareTransformation (const Eigen::MatrixX4f &mDevHeadT, const Eigen::MatrixX4f &mDevHeadDest, const float &fThreshRot, const float &fThreshTrans) |
Drives one HPI fit (per-coil dipole localisation, coil ordering, dewar-to-head transform).
Drives one HPI fit: per-coil magnetic-dipole localisation, frequency matching against the digitised coil layout and Procrustes solve for the dewar-to-head transform. The class is reusable across consecutive measurement blocks and caches the sensor geometry to avoid recomputing it on every call.
Definition at line 130 of file inv_hpi_fit.h.
| typedef QSharedPointer<const InvHpiFit> INVLIB::InvHpiFit::ConstSPtr |
Const shared pointer type for InvHpiFit.
Definition at line 135 of file inv_hpi_fit.h.
| typedef QSharedPointer<InvHpiFit> INVLIB::InvHpiFit::SPtr |
Shared pointer type for InvHpiFit.
Definition at line 134 of file inv_hpi_fit.h.
|
explicit |
Default constructor.
|
explicit |
Constructs the HPI from a InvSensorSet.
| [in] | InvSensorSet | The MEG sensorSet used for the hpi fitting. |
Definition at line 78 of file inv_hpi_fit.cpp.
| void InvHpiFit::checkForUpdate | ( | const InvSensorSet & | sensorSet | ) |
Checks if InvSensorSet has changed and updates member InvSensorSet.
| [in] | InvSensorSet | The MEG sensorSet used for the hpi fitting. |
Definition at line 87 of file inv_hpi_fit.cpp.
|
static |
Compares two 4x4 transformation matrices by evaluating their rotation and translation differences against given thresholds.
| [in] | mDevHeadT | The first transformation matrix. |
| [in] | mDevHeadDest | The second (destination) transformation matrix. |
| [in] | fThreshRot | The rotation threshold in degrees. |
| [in] | fThreshTrans | The translation threshold in meters. |
Definition at line 539 of file inv_hpi_fit.cpp.
| void INVLIB::InvHpiFit::fit | ( | const Eigen::MatrixXd & | matProjectedData, |
| const Eigen::MatrixXd & | matProjectors, | ||
| const InvHpiModelParameters & | hpiModelParameters, | ||
| const Eigen::MatrixXd & | matCoilsHead, | ||
| const bool | bOrderFrequencies, | ||
| HpiFitResult & | hpiFitResult ) |
| void INVLIB::InvHpiFit::fit | ( | const Eigen::MatrixXd & | matProjectedData, |
| const Eigen::MatrixXd & | matProjectors, | ||
| const InvHpiModelParameters & | hpiModelParameters, | ||
| const Eigen::MatrixXd & | matCoilsHead, | ||
| HpiFitResult & | hpiFitResult ) |
Perform one single HPI fit.
| [in] | matProjectedData | Data to estimate the HPI positions from. Projectars should be already applied. |
| [in] | matProjectors | The projectors to apply. |
| [in] | hpiModelParameters | The model parameters to use for the Hpi Fitting, especially to compute the coil amplitudes. |
| [in] | matCoilsHead | The hpi coil locations in head space. |
| [in] | bOrderFrequencies | Order Hpi coils yes/no. |
| [out] | hpiFitResult | The fitting results. |
|
static |
Store results from dev_Head_t as quaternions in position matrix. The format is the same as you get from Neuromag's MaxFilter.
| [in] | fTime | The corresponding time in the measurement for the fit. |
| [in] | matTransDevHead | The device->head transformation matrix. |
| [out] | matPosition | The matrix to store the results. |
| [in] | vecGoF | The goodness of fit per coil. |
| [in] | vecError | The Hpi estimation Error per coil. |
Definition at line 512 of file inv_hpi_fit.cpp.