JEMRIS  2.8.1
open-source MRI simulations
ExternalPulseData.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 _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  double Interp(double const t, vector<double> const &v) ;
72 
79  void SetInterp(bool b) {m_interp = b; } ;
80 
86  bool ReadPulseShape(string fname, bool verbose);
87 
91  void SetTPOIs();
92 
93  static double GetPhase (Module* mod, double time );
94 
96  string m_fname;
97  vector<double> m_times;
98  vector<double> m_magnitudes;
99  vector<double> m_phases;
100  double m_phase;
101  bool m_interp;
102 };
103 
104 #endif /*_EXTERNALPULSEDATA_H*/
RF pulse with external pulse shape.
Definition: ExternalRFPulse.h:36
~ExternalPulseData()
Default destructor.
Definition: ExternalPulseData.h:45
Implementation of JEMRIS Pulse.
double m_phase
current phase
Definition: ExternalPulseData.h:100
string m_fname
HDF5 file with time points and amps [and phases].
Definition: ExternalPulseData.h:96
void SetPulse(Pulse *p)
set the pulse owning this
Definition: ExternalPulseData.h:55
External gradient prototype.
Definition: ExternalGradPulse.h:38
double GetData(double const time)
get the data
Definition: ExternalPulseData.cpp:56
Pulse Super Class. ABC for all RF and gradient pulses.
Definition: Pulse.h:41
void SetInterp(bool b)
linear interpolation
Definition: ExternalPulseData.h:79
Module super class! ABC for all Objects in the sequence framework.
Definition: Module.h:41
void SetTPOIs()
Definition: ExternalPulseData.cpp:74
vector< double > m_magnitudes
My corresponding amplitudes.
Definition: ExternalPulseData.h:98
bool m_interp
if true, linear interpolation is applied
Definition: ExternalPulseData.h:101
bool ReadPulseShape(string fname, bool verbose)
Read the pulse shape data.
Definition: ExternalPulseData.cpp:101
Read and retrieve data of external pulse shapes.
Definition: ExternalPulseData.h:36
Pulse * m_pulse
My pulse.
Definition: ExternalPulseData.h:95
vector< double > m_phases
Vector of phases.
Definition: ExternalPulseData.h:99
double Interp(double const t, vector< double > const &v)
linear interpolation
Definition: ExternalPulseData.cpp:43
vector< double > m_times
My sample time points.
Definition: ExternalPulseData.h:97
ExternalPulseData()
constructor
Definition: ExternalPulseData.cpp:32

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