JEMRIS  2.8.1
open-source MRI simulations
Pulse.h
Go to the documentation of this file.
1 
5 /*
6  * JEMRIS Copyright (C)
7  * 2006-2015 Tony Stoecker
8  * 2007-2015 Kaveh Vahedipour
9  * 2009-2015 Daniel Pflugfelder
10  *
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25  */
26 
27 #ifndef PULSE_H_
28 #define PULSE_H_
29 
30 #include "Module.h"
31 #include "Parameters.h"
32 #include "TxRxPhase.h"
33 #include "Event.h"
34 
35 class AtomicSequence;
36 class AnalyticPulseShape;
37 class ExternalPulseData;
38 
40 
41 class Pulse :public Module {
42 
43  friend class AnalyticPulseShape;
44  friend class ExternalPulseData;
45 
46  public:
47 
51  Pulse ();
52 
56  virtual ~Pulse () {};
57 
61  Pulse (const Pulse&) :
62  m_adc(0), m_initial_delay(0), m_axis(AXIS_VOID), m_phase_lock(0) {};
63 
67  virtual void GetValue (double * dAllVal, double const time) const {};
68 
72  virtual bool Prepare (const PrepareMode mode) ;
73 
80  void SetDuration (double val) ;
81 
85  double GetDuration () { Notify(m_duration); return m_duration; };
86 
93  inline void SetAxis (const PulseAxis eAxis) { m_axis = eAxis; };
94 
101  inline PulseAxis GetAxis () const { return m_axis; };
102 
103 
111  virtual void SetTPOIs ();
112 
121  virtual void GenerateEvents (std::vector<Event*> &events) {};
122 
128  inline int GetNADC () { return m_adc; };
129 
130 
137  inline void SetNADC (unsigned int nadc) {m_adc = nadc; SetTPOIs();};
138 
144  inline double GetInitialDelay () {return m_initial_delay; };
145 
151  inline void SetPhaseLock (bool val) {m_phase_lock = val; };
152 
158  inline bool GetPhaseLock () {return m_phase_lock; };
159 
160 
161  protected:
162 
168  virtual string GetInfo ();
169 
170  PulseAxis m_axis;
171  unsigned int m_adc;
175 };
176 
177 #endif
void SetAxis(const PulseAxis eAxis)
Set the Axis of propagation of this pulse.
Definition: Pulse.h:93
bool GetPhaseLock()
Get phase lock.
Definition: Pulse.h:158
Implementation of JEMRIS TxRxase.h.
bool Notify(const T &val)
Notify all observers of an attribute.
Definition: Prototype.h:294
int GetNADC()
Definition: Pulse.h:128
Pulse(const Pulse &)
Copy constructor.
Definition: Pulse.h:61
prepare and GiNaC evaluation of analytic pulse shapes
Definition: AnalyticPulseShape.h:36
double GetInitialDelay()
Get delay in respect of the AtomicSequence holding this pulse.
Definition: Pulse.h:144
void SetPhaseLock(bool val)
Set phase lock.
Definition: Pulse.h:151
double m_duration
The duration of this module.
Definition: Module.h:268
virtual string GetInfo()
Definition: Pulse.cpp:86
virtual void SetTPOIs()
Set time points of interest.
Definition: Pulse.cpp:57
Pulse Super Class. ABC for all RF and gradient pulses.
Definition: Pulse.h:41
PulseAxis GetAxis() const
Get the Axis of propagation of this pulse.
Definition: Pulse.h:101
virtual void GenerateEvents(std::vector< Event * > &events)
Generate an event to run on scanner hardware.
Definition: Pulse.h:121
Pulse()
Construct and initialise some values.
Definition: Pulse.cpp:31
double GetDuration()
Definition: Pulse.h:85
Module super class! ABC for all Objects in the sequence framework.
Definition: Module.h:41
virtual ~Pulse()
Default destructor.
Definition: Pulse.h:56
mode
Definition: Declarations.h:112
void SetDuration(double val)
Set the duration of this pulse.
Definition: Pulse.cpp:76
virtual void GetValue(double *dAllVal, double const time) const
Definition: Pulse.h:67
Read and retrieve data of external pulse shapes.
Definition: ExternalPulseData.h:36
Implementation of JEMRIS Module.
double m_initial_delay
Definition: Pulse.h:172
Implementation of JEMRIS sequence Event for hardware execution.
unsigned int m_adc
Definition: Pulse.h:171
PulseAxis m_axis
Definition: Pulse.h:170
bool m_phase_lock
Definition: Pulse.h:173
virtual bool Prepare(const PrepareMode mode)
see Module::Prepare()
Definition: Pulse.cpp:41
void SetNADC(unsigned int nadc)
Set number of ADCs.
Definition: Pulse.h:137
Implementation of JEMRIS Parameters.
Atomic sequence prototype.
Definition: AtomicSequence.h:40

-- last change 17.06.2016 | Tony Stoecker | Imprint --