seqgradchanparallel.h
1 /***************************************************************************
2  seqgradchanparallel.h - description
3  -------------------
4  begin : Thu Apr 22 2004
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 SEQGRADCHANPARALLEL_H
19 #define SEQGRADCHANPARALLEL_H
20 
21 
22 #include <odinseq/seqgradchanlist.h>
23 #include <odinseq/seqgradobj.h>
24 #include <odinseq/seqdriver.h>
25 
26 
28 
29 
34 class SeqGradChanParallelDriver : public SeqDriverBase {
35 
36  public:
38  virtual ~SeqGradChanParallelDriver() {}
39 
40  virtual bool prep_driver(SeqGradChanList* chanlists[3]) const = 0;
41 
42  virtual STD_string get_program(programContext& context) const = 0;
43 
44  virtual SeqGradChanParallelDriver* clone_driver() const = 0;
45 };
46 
47 
49 
50 
51 
61 
62  public:
63 
67  SeqGradChanParallel(const STD_string& object_label = "unnamedSeqGradChanParallel" );
68 
73 
78 
82  SeqGradChanParallel& operator = (const SeqGradChanParallel& sgcp);
83 
87  SeqGradChanParallel& operator /= (SeqGradChan& sgc);
88 
92  SeqGradChanParallel& operator /= (SeqGradChanList& sgcl);
93 
94 
95  // overloading virtual function from SeqTreeObj
96  STD_string get_program(programContext& context) const;
97  STD_string get_properties() const;
98  unsigned int event(eventContext& context) const;
99  void query(queryContext& context) const;
100 
101  // overloading virtual function from SeqGradInterface
102  SeqGradInterface& set_strength(float gradstrength);
103  SeqGradInterface& invert_strength();
104  float get_strength() const;
105  fvector get_gradintegral() const;
106  double get_gradduration() const;
107  SeqGradInterface& set_gradrotmatrix(const RotMatrix& matrix);
108 
109 
110 
114  SeqGradChanParallel& operator += (SeqGradChan& sgc);
115 
116 
120  SeqGradChanParallel& operator += (SeqGradChanList& sgcl);
121 
125  SeqGradChanParallel& operator += (SeqGradChanParallel& sgcp);
126 
127 
131  void clear();
132 
133 
134  private:
135  friend class SeqOperator;
136  friend class SeqGradChan;
137  friend class SeqGradChanList;
138  friend class SeqGradEPI;
139  friend class SeqEpiKernel;
140 
141  // overwriting virtual functions from SeqClass
142  bool prep();
143  void clear_container();
144 
145  // overwriting virtual functions from SeqGradObjInterface
146  bool need_gp_terminator() const {return true;}
147 
148  void padd_channel_with_delay(direction chanNo, double maxdur);
149 
150  SeqGradChanList* get_gradchan(direction channel) const;
151  SeqGradChanParallel& set_gradchan(direction channel, SeqGradChanList* sgcl);
152 
153  mutable SeqDriverInterface<SeqGradChanParallelDriver> paralleldriver;
154 
155  Handler<SeqGradChanList* > gradchan[3];
156 };
157 
158 
162 #endif
virtual bool prep()
Definition: seqclass.h:116
virtual void clear_container()
Definition: seqclass.h:102
Rotation Matrix.
Definition: geometry.h:67
direction
Definition: odinpara.h:38