AwCore
AnyWave core library
AwMEGSensorManager.h
1 //
3 // Université d’Aix Marseille (AMU) -
4 // Institut National de la Santé et de la Recherche Médicale (INSERM)
5 // Copyright © 2013 AMU, INSERM
6 //
7 // This library is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU Lesser General Public
9 // License as published by the Free Software Foundation; either
10 // version 3 of the License, or (at your option) any later version.
11 //
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // Lesser General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public
18 // License along with this library; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 //
21 //
22 //
23 // Author: Bruno Colombet – Laboratoire UMR INS INSERM 1106 - Bruno.Colombet@univ-amu.fr
24 //
26 #ifndef AWMEGSENSORMANAGER_H
27 #define AWMEGSENSORMANAGER_H
28 
29 #include <QString>
30 #include <QList>
31 
33 typedef struct
34 {
35  double radius;
36  double wire_radius;
37  double x;
38  double y;
39  double z;
40  double ox;
41  double oy;
42  double oz;
43  int turns;
44 } coil_loop;
45 
59 {
60 public:
63 
64  QString name;
66  QList<coil_loop *> coil_loops;
67  double inductance;
68  QString unit;
69 
71  inline void addCoilLoop(coil_loop *cl) { coil_loops.append(cl); }
72 };
73 
89 {
90 public:
92  static AwMEGSensorManager *instance();
93  enum PhysicalType { Magnometer, Gradiometer, Both };
94 
95  void cleanUp();
97  inline QList<AwMEGSensorProperty *>& properties() { return m_properties; }
98 protected:
100 
101  int m_type;
102  QList<AwMEGSensorProperty *> m_properties;
103 private:
104  static AwMEGSensorManager *m_instance;
105 };
106 
107 #endif
double z
Z coordinates of the MEG sensor (in MEG Machine reference)
Definition: AwMEGSensorManager.h:39
double ox
X coordinates of the orientation vector.
Definition: AwMEGSensorManager.h:40
int turns
Number of wire turns.
Definition: AwMEGSensorManager.h:43
QString unit
unit used for coordinates and orientation. For example "m" for meter.
Definition: AwMEGSensorManager.h:68
AwMEGSensorManager is a global object managing MEG sensors.
Definition: AwMEGSensorManager.h:88
QList< AwMEGSensorProperty * > & properties()
Definition: AwMEGSensorManager.h:97
QList< coil_loop * > coil_loops
The list of coil_loop structures.
Definition: AwMEGSensorManager.h:66
double oy
Y coordinates of the orientation vector.
Definition: AwMEGSensorManager.h:41
double wire_radius
physical radius of the wire (in meter)
Definition: AwMEGSensorManager.h:36
AwMEGSensorProperty()
AwMEGSensorProperty.
Definition: AwMEGSensorManager.cpp:51
int total_loops
The total number of coil_loop structures describing the sensor.
Definition: AwMEGSensorManager.h:65
AwMEGSensorProperty describes the physical property of a MEG sensor.
Definition: AwMEGSensorManager.h:58
double x
X coordinates of the MEG sensor (in MEG Machine reference)
Definition: AwMEGSensorManager.h:37
static AwMEGSensorManager * instance()
Definition: AwMEGSensorManager.cpp:30
coil_loop structure defines the physical properties of a particular MEG sensor.
Definition: AwMEGSensorManager.h:33
double radius
physical radius of the sensor (in meter).
Definition: AwMEGSensorManager.h:35
void addCoilLoop(coil_loop *cl)
Definition: AwMEGSensorManager.h:71
double inductance
The sensor's inductance.
Definition: AwMEGSensorManager.h:67
double oz
Z coordinates of the orientation vector.
Definition: AwMEGSensorManager.h:42
QString name
The sensor's name.
Definition: AwMEGSensorManager.h:64
double y
Y coordinates of the MEG sensor (in MEG Machine reference)
Definition: AwMEGSensorManager.h:38