MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
mne_surface_patch.cpp
Go to the documentation of this file.
1//=============================================================================================================
36//=============================================================================================================
37// INCLUDES
38//=============================================================================================================
39
40#include "mne_surface_patch.h"
41
43
44#define FREE_49(x) if ((char *)(x) != Q_NULLPTR) free((char *)(x))
45#define MALLOC_49(x,t) (t *)malloc((x)*sizeof(t))
46
47#ifndef TRUE
48#define TRUE 1
49#endif
50
51#ifndef FALSE
52#define FALSE 0
53#endif
54
55//=============================================================================================================
56// USED NAMESPACES
57//=============================================================================================================
58
59using namespace MNELIB;
60
61//=============================================================================================================
62// DEFINE MEMBER METHODS
63//=============================================================================================================
64
66{
67 if (np > 0) {
68 vert = MALLOC_49(np,int);
69 border = MALLOC_49(np,int);
70 }
71 else {
72 vert = Q_NULLPTR;
73 border = Q_NULLPTR;
74 }
75 s = new MneSourceSpaceOld(np);
76 surf_vert = Q_NULLPTR;
77 tri = Q_NULLPTR;
78 surf_tri = Q_NULLPTR;
79
80 np_surf = 0;
81 ntri_surf = 0;
82
83 flat = FALSE;
84 user_data = Q_NULLPTR;
85 user_data_free = Q_NULLPTR;
86}
87
88//=============================================================================================================
89
91{
92 delete s;
93 FREE_49(vert);
94 FREE_49(border);
95 FREE_49(surf_vert);
96 FREE_49(tri);
97 FREE_49(surf_tri);
98 if (user_data && user_data_free)
99 user_data_free(user_data);
100}
MneSurfacePatch class declaration.
MneSourceSpaceOld class declaration.
This defines a source space.