105 bool open_here =
false;
108 if (!t_pStream->device()->isOpen()) {
109 if (!t_pStream->open()) {
110 throw std::runtime_error(
"Could not open the digitizer data file");
117 if (!t_pStream->read_digitizer_data(t_pStream->dirtree(), *
this)) {
118 throw std::runtime_error(
"Could not read the FiffDigitizerData");
131 qInfo().noquote().nospace() <<
"Number of digitizer points: " <<
points.size();
135 qInfo().noquote().nospace() <<
"Coord. Frame: FIFFV_COORD_MRI";
138 qInfo().noquote().nospace() <<
"Coord. Frame: FIFFV_COORD_HEAD";
142 for (
auto& point :
points) {
144 qInfo().noquote().nospace() <<
"HPI Point " << point.ident <<
" - " << point.r[0] <<
", " << point.r[1] <<
", " << point.r[2];
148 qInfo().noquote().nospace() <<
"Number of MRI fiducials: " <<
nfids();
168 for (
int k = 0; k <
npoint; ++k) {
constexpr auto FIFFV_COORD_HEAD
constexpr auto FIFFV_POINT_CARDINAL
constexpr auto FIFFV_POINT_HPI
constexpr auto FIFFV_COORD_UNKNOWN
constexpr auto FIFFV_COORD_MRI
FIFF binary tag-stream layer: wraps a QIODevice to read and write FIFF tags, directories,...
4x4 affine FIFF coordinate transform (FIFF_COORD_TRANS) annotated with source/destination coordinate-...
Single digitization point (FIFF_DIG_POINT) with kind (cardinal/HPI/EEG/extra), identifier and 3D coor...
High-level digitization data: dig points plus the device→head transform and fitting metadata that tog...
FIFF file I/O, in-memory data structures and high-level readers/writers.
Labelled 4x4 FIFF affine: source frame, destination frame, rotation, translation and cached inverse.
Eigen::MatrixX3f apply_trans(const Eigen::MatrixX3f &rr, bool do_move=true) const
One digitizer point: kind (cardinal/HPI/EEG/extra), ident, 3D position in FIFFV_COORD_HEAD.
QList< FIFFLIB::FiffDigPoint > points
std::unique_ptr< FiffCoordTrans > head_mri_t_adj
Eigen::Matrix< float, Eigen::Dynamic, 3, Eigen::RowMajor > closest_point
std::unique_ptr< FiffCoordTrans > head_mri_t
FiffDigitizerData & operator=(const FiffDigitizerData &rhs)
QList< FIFFLIB::FiffDigPoint > mri_fids
void pickCardinalFiducials()
FIFF tag-stream reader/writer: wraps a QIODevice and exposes typed read_* / write_* methods for every...
QSharedPointer< FiffStream > SPtr