JEMRIS 2.9.1
open-source MRI simulations
Loading...
Searching...
No Matches
AtomicSequence.h
Go to the documentation of this file.
1
5/*
6 * JEMRIS Copyright (C)
7 * 2006-2023 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 ATOMICSEQUENCE_H_
28#define ATOMICSEQUENCE_H_
29
30#include "NDData.h"
31
32#include "Sequence.h"
33#include "Pulse.h"
34
35using std::vector;
36
40class AtomicSequence : public Sequence {
41
42 public:
43
47 AtomicSequence() :m_theta(0.), m_non_lin_grad(0.), m_alpha(0.), m_phi(0.), m_eddy(false) {};
48
53
57 virtual ~AtomicSequence () {};
58
62 inline AtomicSequence* Clone() const {return (new AtomicSequence(*this));};
63
69 virtual bool Prepare (const PrepareMode mode);
70
77 Pulse* GetPulse (int number) { return m_pulses.at(number); };
78
84 int GetNumberOfPulses () { return m_pulses.size(); };
85
89 virtual void GetValue (double * dAllVal, double const time) ;
90
91
95 double GetDuration ();
96
97
101 //virtual void GetValue (double * dAllVal, double const time, double * pos[3]) {};
102
108 void Rotation (double * Grot);
109
115 inline bool HasNonLinGrad () {return m_non_lin_grad;};
116
122 inline void SetNonLinGrad (bool val) {m_non_lin_grad=val;};
123
133 void CollectTPOIs ();
134
138 virtual void CollectSeqData (NDData<double>& seqdata, double& t, long& offset);
139
143 virtual void CollectSeqData (OutputSequenceData *seqdata);
144
149 virtual long GetNumOfADCs ();
150
151
155 void GetValueLingeringEddyCurrents (double * dAllVal, double const time);
156
160 void UpdateEddyCurrents ();
161
165 void PrepareEddyCurrents ();
166
171 bool HasEddyCurrents () {return m_eddy; };
172
177 void SetEddyCurrents (bool val) {m_eddy = val; };
178
179protected:
185 virtual string GetInfo ();
186
187
188 private:
189
190 vector<Pulse*> m_pulses;
193 double m_alpha;
194 double m_theta;
195 double m_phi;
196 bool m_eddy;
198};
199
200#endif /*ATOMICSEQUENCE_H_*/
mode
Definition: Declarations.h:112
Implementation of JEMRIS Pulse.
Implementation of JEMRIS Sequence.
Atomic sequence prototype.
Definition: AtomicSequence.h:40
vector< Pulse * > m_pulses
vector of pointers to child pulses
Definition: AtomicSequence.h:190
void Rotation(double *Grot)
See Module::GetValue.
Definition: AtomicSequence.cpp:127
Pulse * GetPulse(int number)
Get the pulse given by number.
Definition: AtomicSequence.h:77
virtual void GetValue(double *dAllVal, double const time)
See Module::GetValue.
Definition: AtomicSequence.cpp:79
double m_alpha
Gradient Rotation matrix: Rotation angle.
Definition: AtomicSequence.h:193
bool HasNonLinGrad()
Check for nonlinear gradients in this atom.
Definition: AtomicSequence.h:115
int GetNumberOfPulses()
Get the number of nested pulses.
Definition: AtomicSequence.h:84
AtomicSequence * Clone() const
See Module::clone.
Definition: AtomicSequence.h:62
virtual long GetNumOfADCs()
Get Number of ADCs in this atom.
Definition: AtomicSequence.cpp:355
void GetValueLingeringEddyCurrents(double *dAllVal, double const time)
GetValue of lingering eddy currents.
Definition: AtomicSequence.cpp:366
double GetDuration()
Definition: AtomicSequence.cpp:54
bool HasEddyCurrents()
true, if this atom contains eddy currents
Definition: AtomicSequence.h:171
AtomicSequence()
Default constructor.
Definition: AtomicSequence.h:47
void CollectTPOIs()
Collect the TPOIs of child pulses.
Definition: AtomicSequence.cpp:172
void PrepareEddyCurrents()
prepare lingering eddy currents in this atom for GetValue in next atom
Definition: AtomicSequence.cpp:399
double m_theta
Gradient Rotation matrix: polar inclination from z-axis.
Definition: AtomicSequence.h:194
bool m_non_lin_grad
A flag for nonlinear gradients.
Definition: AtomicSequence.h:192
double m_phi
Gradient Rotation matrix: azimutal phase measured from x-axis.
Definition: AtomicSequence.h:195
void SetEddyCurrents(bool val)
true, if this atom contains eddy currents
Definition: AtomicSequence.h:177
virtual string GetInfo()
Definition: AtomicSequence.cpp:208
bool m_eddy
A flag for eddy currents in this atom.
Definition: AtomicSequence.h:196
void UpdateEddyCurrents()
update eddy currents in case generating gradient waveform has changed
Definition: AtomicSequence.cpp:418
void SetNonLinGrad(bool val)
Marh this atom, if nonlinear gradients are present.
Definition: AtomicSequence.h:122
virtual ~AtomicSequence()
Default destructor.
Definition: AtomicSequence.h:57
virtual void CollectSeqData(NDData< double > &seqdata, double &t, long &offset)
Collect sequence data (for plotting the sequence diagram)
Definition: AtomicSequence.cpp:220
virtual bool Prepare(const PrepareMode mode)
Prepare the sequence.
Definition: AtomicSequence.cpp:38
Simple nd-data structure.
Definition: NDData.h:53
Maintain libraries of hardware events and write sequence file.
Definition: OutputSequenceData.h:78
Pulse Super Class. ABC for all RF and gradient pulses.
Definition: Pulse.h:41
Super class for all sequence (non-pulse) modules.
Definition: Sequence.h:43

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