JEMRIS  2.8.1
open-source MRI simulations
TriangleGradPulse.h
Go to the documentation of this file.
1 
8 /*
9  * JEMRIS Copyright (C)
10  * 2006-2015 Tony Stoecker
11  * 2007-2015 Kaveh Vahedipour
12  * 2009-2015 Daniel Pflugfelder
13  *
14  *
15  * This program is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation; either version 2 of the License, or
18  * (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program; if not, write to the Free Software
27  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
28  */
29 
30 
31 #ifndef TRIANGLEGRADPULSE_H_
32 #define TRIANGLEGRADPULSE_H_
33 
34 #include "GradPulse.h"
35 
36 enum TriangleType {TRIANGLE_UP, TRIANGLE_DN};
40 class TriangleGradPulse : public GradPulse {
41 
42 
43 public:
44 
48  TriangleGradPulse() : m_amplitude(0.), m_triangle_type(TRIANGLE_UP) {};
49 
54 
59 
63  inline TriangleGradPulse* Clone() const {return (new TriangleGradPulse(*this));};
64 
68  virtual bool Prepare (const PrepareMode mode);
69 
73  virtual double GetGradient (double const time);
74 
75  protected:
76 
82  virtual string GetInfo ();
83 
84  double m_amplitude;
85  TriangleType m_triangle_type;
87 };
88 
89 
90 #endif /* TRIANGLEGRADPULSE_H_ */
TriangleGradPulse * Clone() const
Definition: TriangleGradPulse.h:63
virtual double GetGradient(double const time)
Definition: TriangleGradPulse.cpp:87
Gradient with constant amplitude.
Definition: TriangleGradPulse.h:40
TriangleType m_triangle_type
Definition: TriangleGradPulse.h:85
mode
Definition: Declarations.h:112
Implementation of JEMRIS GradPulse.
virtual string GetInfo()
Get informations on this triangle gradient.
Definition: TriangleGradPulse.cpp:102
virtual bool Prepare(const PrepareMode mode)
Definition: TriangleGradPulse.cpp:41
Base class and prototype for all gradient pulses.
Definition: GradPulse.h:36
TriangleGradPulse()
Default constructor.
Definition: TriangleGradPulse.h:48
double m_amplitude
Definition: TriangleGradPulse.h:84
~TriangleGradPulse()
Default destructor.
Definition: TriangleGradPulse.h:58

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