MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
mne_proj_item.cpp
Go to the documentation of this file.
1//=============================================================================================================
37//=============================================================================================================
38// INCLUDES
39//=============================================================================================================
40
41#include "mne_proj_item.h"
42#include "mne_types.h"
43
44#define FREE_21(x) if ((char *)(x) != NULL) free((char *)(x))
45
46#ifndef TRUE
47#define TRUE 1
48#endif
49
50#ifndef FALSE
51#define FALSE 0
52#endif
53
54//=============================================================================================================
55// USED NAMESPACES
56//=============================================================================================================
57
58using namespace Eigen;
59using namespace MNELIB;
60
61//=============================================================================================================
62// DEFINE MEMBER METHODS
63//=============================================================================================================
64
66: vecs (NULL)
67, nvec (0)
68, kind (FIFFV_PROJ_ITEM_NONE)
69, active (TRUE)
70, active_file (FALSE)
71, has_meg (FALSE)
72, has_eeg (FALSE)
73{
74}
75
76//=============================================================================================================
77
79{
80 if(vecs)
81 delete vecs;
82 desc.clear();
83 return;
84}
85
86//=============================================================================================================
87
88int MneProjItem::mne_proj_item_affect(MneProjItem *it, const QStringList& list, int nlist)
89/*
90 * Does this projection item affect this list of channels?
91 */
92{
93 int k,p,q;
94
95 if (it == NULL || it->vecs == NULL || it->nvec == 0)
96 return FALSE;
97
98 for (k = 0; k < nlist; k++)
99 for (p = 0; p < it->vecs->ncol; p++)
100 if (QString::compare(it->vecs->collist[p],list[k]) == 0) {
101 for (q = 0; q < it->vecs->nrow; q++) {
102 if (it->vecs->data[q][p] != 0.0)
103 return TRUE;
104 }
105 }
106 return FALSE;
107}
int k
Definition fiff_tag.cpp:324
MNEProjItem class declaration.
One linear projection item.
MneNamedMatrix * vecs