JEMRIS 2.9.2
open-source MRI simulations
Loading...
Searching...
No Matches
GradPulse.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 _GRADPULSE_H_
28#define _GRADPULSE_H_
29
30#include "Pulse.h"
31
32//forward declaration of EddyPulse (which itself is a GradPulse)
33class EddyPulse;
34
36class GradPulse : public Pulse {
37
38 public:
39
43 GradPulse ();
44
48 virtual ~GradPulse ();
49
54
55 // @brief see Module::GetValue()
56 virtual void GetValue (double * dAllVal, double const time);
57
66 virtual double GetGradient (double const time) = 0;
67
68 // @brief see Module::Prepare
69 virtual bool Prepare (PrepareMode mode);
70
76 virtual bool PrepareNLGfield (PrepareMode mode);
77
81 virtual bool PrepareEddyCurrents (PrepareMode mode, int steps = 5000);
82
89 double GetAreaNumeric (int steps);
90
96 void SetArea (double val);
97
106 void SetNonLinGradField(double const time);
107
114
118 virtual void GenerateEvents(std::vector<Event*> &events);
119
120 protected:
126 virtual string GetInfo ();
127
128 double m_slew_rate;
129 double m_max_ampl;
130 double m_rise_time;
131 double m_area;
134 double m_nlg_field;
135 double m_nlg_px;
136 double m_nlg_py;
137 double m_nlg_pz;
138 double m_nlg_val;
141 double m_eddy_time;
142 double m_eddy_val;
143 double m_ec_area;
146 bool m_hide;
148};
149
150#endif
mode
Definition Declarations.h:112
Implementation of JEMRIS Pulse.
Prototype of an Eddy pulse.
Definition EddyPulse.h:35
Base class and prototype for all gradient pulses.
Definition GradPulse.h:36
double m_rise_time
The constant rise time of this gradient pulse.
Definition GradPulse.h:130
bool HasNonLinGrad()
Check, whether this gradient is nonlinear.
Definition GradPulse.h:113
virtual ~GradPulse()
Definition GradPulse.cpp:68
bool m_eddy_currents
A flag for nonlinear gradients.
Definition GradPulse.h:140
double m_eddy_val
value of eddy current
Definition GradPulse.h:142
double m_nlg_field
Nonlinear gradient field (NLG)
Definition GradPulse.h:134
virtual void GenerateEvents(std::vector< Event * > &events)
Definition GradPulse.cpp:211
virtual void GetValue(double *dAllVal, double const time)
Get the value of this element.
Definition GradPulse.cpp:202
bool m_hide
Hide this gradient (not played out, but its ECs!)
Definition GradPulse.h:146
double m_nlg_val
gradient value to compute the NLG field
Definition GradPulse.h:138
void SetArea(double val)
Set the area of this gradient pulse.
Definition GradPulse.cpp:274
double m_eddy_time
time of eddy current
Definition GradPulse.h:141
int m_ec_length
convolution length of eddy current
Definition GradPulse.h:144
double m_nlg_px
x-position to compute the NLG field
Definition GradPulse.h:135
double m_nlg_py
y-position to compute the NLG field
Definition GradPulse.h:136
EddyPulse * m_eddy_pulse
pulse for eddy currents
Definition GradPulse.h:145
virtual double GetGradient(double const time)=0
Get the value of the gradient pulse at time t.
double m_slew_rate
The slewrate of this gradient pulse.
Definition GradPulse.h:128
double m_nlg_pz
z-position to compute the NLG field
Definition GradPulse.h:137
double m_max_ampl
The maximum amplitude of this gradient pulse.
Definition GradPulse.h:129
virtual string GetInfo()
Definition GradPulse.cpp:294
GradPulse(const GradPulse &)
virtual bool Prepare(PrepareMode mode)
see Module::Prepare()
Definition GradPulse.cpp:160
virtual bool PrepareNLGfield(PrepareMode mode)
Preparation of Nonlinear Gradient fields.
Definition GradPulse.cpp:73
GradPulse()
Definition GradPulse.cpp:32
virtual bool PrepareEddyCurrents(PrepareMode mode, int steps=5000)
Calculate Eddy Currents of this Gradient.
Definition GradPulse.cpp:115
bool m_non_lin_grad
A flag for nonlinear gradients.
Definition GradPulse.h:133
double m_area
The area of the gradient pulse.
Definition GradPulse.h:131
void SetNonLinGradField(double const time)
Set the nonlinear gradient field term World::NonLinGradField.
Definition GradPulse.cpp:262
double GetAreaNumeric(int steps)
get the area of this gradient pulse by numerical integration.
Definition GradPulse.cpp:280
double m_ec_area
area of eddy current
Definition GradPulse.h:143
Pulse Super Class. ABC for all RF and gradient pulses.
Definition Pulse.h:41

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