106 bool open_here =
false;
109 if (!t_pStream->device()->isOpen()) {
110 if(!t_pStream->open()) {
111 throw std::runtime_error(
"Could not open the digitizer data file");
118 if(!t_pStream->read_digitizer_data(t_pStream->dirtree(), *
this)) {
119 throw std::runtime_error(
"Could not read the FiffDigitizerData");
132 std::cout <<
"Number of digitizer points: " <<
points.size() <<
"\n";
136 std::cout <<
"Coord. Frame: FIFFV_COORD_MRI \n";
139 std::cout <<
"Coord. Frame: FIFFV_COORD_HEAD \n";
143 for (
auto& point :
points){
145 std::cout <<
"HPI Point " << point.ident <<
" - " << point.r[0] <<
", " << point.r[1] <<
", " << point.r[2] <<
"\n";
149 std::cout <<
"Number of MRI fiducials: " <<
nfids() <<
"\n";
170 for (
int k = 0; k <
npoint; ++k) {
#define FIFFV_POINT_CARDINAL
#define FIFFV_COORD_UNKNOWN
High-level digitization data: dig points plus the device→head transform and fitting metadata that tog...
4x4 affine FIFF coordinate transform (FIFF_COORD_TRANS) annotated with source/destination coordinate-...
FIFF binary tag-stream layer: wraps a QIODevice to read and write FIFF tags, directories,...
Single digitization point (FIFF_DIG_POINT) with kind (cardinal/HPI/EEG/extra), identifier and 3D coor...
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