seqgradconst.h
1 /***************************************************************************
2  seqgradconst.h - description
3  -------------------
4  begin : Tue Aug 13 2002
5  copyright : (C) 2000-2015 by Thies H. Jochimsen
6  email : thies@jochimsen.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef SEQGRADCONST_H
19 #define SEQGRADCONST_H
20 
21 #include <odinseq/seqgradchan.h>
22 
33 class SeqGradConst : public SeqGradChan {
34 
35  public:
36 
43  SeqGradConst(const STD_string& object_label,direction gradchannel,
44  float gradstrength, double gradduration);
45 
49  SeqGradConst(const SeqGradConst& sgc);
50 
54  SeqGradConst(const STD_string& object_label = "unnamedSeqGradConst" );
55 
60 
61  private:
62  friend class SeqGradVector;
63 
64  // overwriting virtual functions from SeqClass
65  bool prep();
66 
67 
68  // overwriting virtual functions from SeqGradChan
69  SeqGradChan& get_subchan(double starttime, double endtime) const;
70  STD_string get_grdpart(float matrixfactor) const;
71  float get_integral() const {return get_strength() * get_duration();}
72 
73 
74 };
75 
77 
78 
84 class SeqGradDelay : public SeqGradChan {
85 
86  public:
87 
93  SeqGradDelay(const STD_string& object_label, direction gradchannel, double gradduration);
94 
98  SeqGradDelay(const SeqGradDelay& sgd);
99 
103  SeqGradDelay(const STD_string& object_label = "unnamedSeqGradDelay" );
104 
109 
110 
111  // overwriting virtual functions from SeqGradInterface
112  float get_strength() const {return 0.0;} // always return zero strength
113 
114 
115  private:
116  // overwriting virtual functions from SeqGradChan
117  SeqGradChan& get_subchan(double starttime, double endtime) const;
118  STD_string get_grdpart(float matrixfactor) const;
119  float get_integral() const {return 0.0;}
120 
121 };
122 
123 
127 #endif
float get_strength() const
Definition: seqgradconst.h:112
Vector of constant gradients.
Definition: seqgradvec.h:38
Constant gradient.
Definition: seqgradconst.h:33
SeqGradConst & operator=(const SeqGradConst &sgc)
double get_duration() const
Gradient delay.
Definition: seqgradconst.h:84
float get_strength() const
direction
Definition: odinpara.h:38
SeqGradConst(const STD_string &object_label, direction gradchannel, float gradstrength, double gradduration)