JEMRIS 2.9.2
open-source MRI simulations
Loading...
Searching...
No Matches
Pulse.h
Go to the documentation of this file.
1
5/*
6 * JEMRIS Copyright (C)
7 * 2006-2025 Tony Stoecker
8 * 2007-2018 Kaveh Vahedipour
9 * 2009-2019 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
35class AtomicSequence;
38
40
41class Pulse :public Module, public TxRxPhase {
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_adc_flag(1) {};
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 * (m_adc_flag>0?1:0) ; };
129
130
136 inline void SetNADC (int nadc) {m_adc = abs(nadc); m_adc_flag = ( nadc<0 ? 0 : m_adc_flag ); SetTPOIs();};
137
143 inline int GetADCFlag () { return m_adc_flag; };
144
150 inline void SetADCFlag (int adcflag) {m_adc_flag = adcflag; SetTPOIs();};
151
157 inline double GetInitialDelay () {return m_initial_delay; };
158
159 protected:
160
166 virtual string GetInfo ();
167
168 PulseAxis m_axis;
169 int m_adc;
173};
174
175#endif
mode
Definition Declarations.h:112
Implementation of JEMRIS sequence Event for hardware execution.
Implementation of JEMRIS Module.
Implementation of JEMRIS Parameters.
Implementation of JEMRIS TxRxase.h.
prepare and GiNaC evaluation of analytic pulse shapes
Definition AnalyticPulseShape.h:36
Atomic sequence prototype.
Definition AtomicSequence.h:40
Read and retrieve data of external pulse shapes.
Definition ExternalPulseData.h:36
Module super class! ABC for all Objects in the sequence framework.
Definition Module.h:41
double m_duration
The duration of this module.
Definition Module.h:275
bool Notify(const T &val)
Notify all observers of an attribute.
Definition Prototype.h:294
Pulse Super Class. ABC for all RF and gradient pulses.
Definition Pulse.h:41
Pulse()
Construct and initialise some values.
Definition Pulse.cpp:31
int GetNADC()
Definition Pulse.h:128
int m_adc_flag
Definition Pulse.h:170
void SetDuration(double val)
Set the duration of this pulse.
Definition Pulse.cpp:87
virtual string GetInfo()
Definition Pulse.cpp:97
virtual bool Prepare(const PrepareMode mode)
see Module::Prepare()
Definition Pulse.cpp:42
int m_adc
Definition Pulse.h:169
void SetADCFlag(int adcflag)
Set ADC flag.
Definition Pulse.h:150
double GetDuration()
Definition Pulse.h:85
PulseAxis GetAxis() const
Get the Axis of propagation of this pulse.
Definition Pulse.h:101
PulseAxis m_axis
Definition Pulse.h:168
double GetInitialDelay()
Get delay in respect of the AtomicSequence holding this pulse.
Definition Pulse.h:157
Pulse(const Pulse &)
Copy constructor.
Definition Pulse.h:61
int GetADCFlag()
Definition Pulse.h:143
void SetNADC(int nadc)
Set number of ADCs.
Definition Pulse.h:136
double m_initial_delay
Definition Pulse.h:171
virtual ~Pulse()
Default destructor.
Definition Pulse.h:56
virtual void GetValue(double *dAllVal, double const time) const
Definition Pulse.h:67
virtual void GenerateEvents(std::vector< Event * > &events)
Generate an event to run on scanner hardware.
Definition Pulse.h:121
void SetAxis(const PulseAxis eAxis)
Set the Axis of propagation of this pulse.
Definition Pulse.h:93
virtual void SetTPOIs()
Set time points of interest.
Definition Pulse.cpp:68
Phase physics super class.
Definition TxRxPhase.h:36

-- last change 03.01.2025 | Tony Stoecker | Imprint | Data Protection --