47 #define ALLOC_INT_51(x) MALLOC_51(x,int)
49 #define MALLOC_51(x,t) (t *)malloc((x)*sizeof(t))
51 #define ALLOC_CMATRIX_51(x,y) mne_cmatrix_51((x),(y))
61 static void matrix_error_51(
int kind,
int nr,
int nc)
65 printf(
"Failed to allocate memory pointers for a %d x %d matrix\n",nr,nc);
67 printf(
"Failed to allocate memory for a %d x %d matrix\n",nr,nc);
69 printf(
"Allocation error for a %d x %d matrix\n",nr,nc);
70 if (
sizeof(
void *) == 4) {
71 printf(
"This is probably because you seem to be using a computer with 32-bit architecture.\n");
72 printf(
"Please consider moving to a 64-bit platform.");
74 printf(
"Cannot continue. Sorry.\n");
78 float **mne_cmatrix_51(
int nr,
int nc)
85 m = MALLOC_51(nr,
float *);
86 if (!m) matrix_error_51(1,nr,nc);
87 whole = MALLOC_51(nr*nc,
float);
88 if (!whole) matrix_error_51(2,nr,nc);
99 using namespace Eigen;
100 using namespace MNELIB;
106 MneSourceSpaceOld::MneSourceSpaceOld(
int np)
110 rr = ALLOC_CMATRIX_51(np,3);
111 nn = ALLOC_CMATRIX_51(np,3);
112 inuse = ALLOC_INT_51(np);
113 vertno = ALLOC_INT_51(np);
128 use_tris = Q_NULLPTR;
129 use_itris = Q_NULLPTR;
131 neighbor_tri = Q_NULLPTR;
132 nneighbor_tri = Q_NULLPTR;
136 neighbor_vert = Q_NULLPTR;
137 nneighbor_vert = Q_NULLPTR;
138 vert_dist = Q_NULLPTR;
140 coord_frame = FIFFV_COORD_MRI;
141 id = FIFFV_MNE_SURF_UNKNOWN;
143 type = FIFFV_MNE_SPACE_SURFACE;
152 voxel_surf_RAS_t = Q_NULLPTR;
153 vol_dims[0] = vol_dims[1] = vol_dims[2] = 0;
156 MRI_surf_RAS_RAS_t = Q_NULLPTR;
157 MRI_voxel_surf_RAS_t = Q_NULLPTR;
158 MRI_vol_dims[0] = MRI_vol_dims[1] = MRI_vol_dims[2] = 0;
159 interpolator = Q_NULLPTR;
161 vol_geom = Q_NULLPTR;
162 mgh_tags = Q_NULLPTR;
163 user_data = Q_NULLPTR;
164 user_data_free = Q_NULLPTR;
166 cm[X_51] = cm[Y_51] = cm[Z_51] = 0.0;
171 MneSourceSpaceOld::~MneSourceSpaceOld()