43 #include "../fiff_dig_point.h"
54 #define FREE_43(x) if ((char *)(x) != Q_NULLPTR) free((char *)(x))
56 #define MALLOC_43(x,t) (t *)malloc((x)*sizeof(t))
58 #define FREE_CMATRIX_43(m) mne_free_cmatrix_43((m))
60 void mne_free_cmatrix_43(
float **m)
72 using namespace FIFFLIB;
79 : head_mri_t(Q_NULLPTR)
80 , head_mri_t_adj(Q_NULLPTR)
81 , coord_frame(FIFFV_COORD_UNKNOWN)
89 , closest_point(Q_NULLPTR)
97 : head_mri_t(p_FiffDigitizerData.head_mri_t)
98 , head_mri_t_adj(p_FiffDigitizerData.head_mri_t_adj)
99 , points(p_FiffDigitizerData.points)
100 , coord_frame(p_FiffDigitizerData.coord_frame)
101 , active(p_FiffDigitizerData.active)
102 , discard(p_FiffDigitizerData.discard)
103 , npoint(p_FiffDigitizerData.npoint)
104 , mri_fids(p_FiffDigitizerData.mri_fids)
105 , nfids(p_FiffDigitizerData.nfids)
106 , show(p_FiffDigitizerData.show)
107 , show_minimal(p_FiffDigitizerData.show_minimal)
108 , dist(p_FiffDigitizerData.dist)
109 , closest(p_FiffDigitizerData.closest)
110 , closest_point(p_FiffDigitizerData.closest_point)
111 , dist_valid(p_FiffDigitizerData.dist_valid)
118 : head_mri_t(Q_NULLPTR)
119 , head_mri_t_adj(Q_NULLPTR)
120 , coord_frame(FIFFV_COORD_UNKNOWN)
122 , mri_fids(Q_NULLPTR)
125 , show_minimal(FALSE)
128 , closest_point(Q_NULLPTR)
133 bool open_here =
false;
136 if (!t_pStream->device()->isOpen()) {
137 if(!t_pStream->open()) {
138 qWarning() <<
"Warning in FiffDigitizerData::FiffDigitizerData - Could not open the didigitzer data file";
146 if(!t_pStream->read_digitizer_data(t_pStream->dirtree(), *
this)) {
147 qWarning() <<
"Warning in FiffDigitizerData::FiffDigitizerData - Could not read the FiffDigitizerData";
161 FREE_43(head_mri_t_adj);
164 FREE_CMATRIX_43(closest_point);
172 std::cout <<
"Number of digitizer points: " << points.size() <<
"\n";
175 case FIFFV_COORD_MRI:
176 std::cout <<
"Coord. Frame: FIFFV_COORD_MRI \n";
178 case FIFFV_COORD_HEAD:
179 std::cout <<
"Coord. Frame: FIFFV_COORD_HEAD \n";
183 for (
auto& point : points){
184 if (point.kind == FIFFV_POINT_HPI){
185 std::cout <<
"HPI Point " << point.ident <<
" - " << point.r[0] <<
", " << point.r[1] <<
", " << point.r[2] <<
"\n";
189 std::cout <<
"Number of MRI fiducials: " << nfids <<
"\n";