JEMRIS 2.9.2
open-source MRI simulations
Loading...
Searching...
No Matches
ExternalPulseData.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 _EXTERNALPULSEDATA_H
28#define _EXTERNALPULSEDATA_H
29
30#include "Pulse.h"
31
37
38 friend class ExternalGradPulse;
39 friend class ExternalRFPulse;
40
41 private:
46
51
55 void SetPulse(Pulse* p){m_pulse=p;};
56
63 double GetData (double const time) ;
64
71 void SetInterp(bool b) {m_interp = b; } ;
72
78 bool ReadPulseShape(string fname, bool verbose);
79
83 void SetTPOIs();
84
85
90 int GetLowerIndex(double time);
91
92 static double GetPhase (Module* mod, double time );
93
95 string m_fname;
96 vector<double> m_times;
97 vector<double> m_magnitudes;
98 vector<double> m_phases;
99 double m_phase;
100 bool m_interp;
101 int m_LastHuntIndex;
102};
103
104#endif /*_EXTERNALPULSEDATA_H*/
Implementation of JEMRIS Pulse.
External gradient prototype.
Definition ExternalGradPulse.h:38
Read and retrieve data of external pulse shapes.
Definition ExternalPulseData.h:36
void SetTPOIs()
Definition ExternalPulseData.cpp:65
int GetLowerIndex(double time)
find data index for interpolation get lower index for given timepoint using hunt search algorithm.
Definition ExternalPulseData.cpp:145
vector< double > m_magnitudes
My corresponding amplitudes
Definition ExternalPulseData.h:97
void SetInterp(bool b)
linear interpolation
Definition ExternalPulseData.h:71
bool ReadPulseShape(string fname, bool verbose)
Read the pulse shape data.
Definition ExternalPulseData.cpp:97
bool m_interp
if true, linear interpolation is applied
Definition ExternalPulseData.h:100
double GetData(double const time)
get the data
Definition ExternalPulseData.cpp:44
vector< double > m_phases
Vector of phases
Definition ExternalPulseData.h:98
vector< double > m_times
My sample time points
Definition ExternalPulseData.h:96
ExternalPulseData()
constructor
Definition ExternalPulseData.cpp:32
Pulse * m_pulse
My pulse.
Definition ExternalPulseData.h:94
double m_phase
current phase
Definition ExternalPulseData.h:99
void SetPulse(Pulse *p)
set the pulse owning this
Definition ExternalPulseData.h:55
string m_fname
HDF5 file with time points and amps [and phases].
Definition ExternalPulseData.h:95
~ExternalPulseData()
Default destructor.
Definition ExternalPulseData.h:45
RF pulse with external pulse shape.
Definition ExternalRFPulse.h:36
Module super class! ABC for all Objects in the sequence framework.
Definition Module.h:41
Pulse Super Class. ABC for all RF and gradient pulses.
Definition Pulse.h:41

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