ODIN
seqparallel.h
1 /***************************************************************************
2  seqparallel.h - description
3  -------------------
4  begin : Fri Apr 16 2004
5  copyright : (C) 2000-2021 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 SEQPARALLEL_H
19 #define SEQPARALLEL_H
20 
21 #include <tjutils/tjhandler.h>
22 
23 
24 #include <odinseq/seqgradobj.h>
25 #include <odinseq/seqobj.h>
26 #include <odinseq/seqdriver.h>
27 
28 
37 class SeqParallelDriver : public SeqDriverBase {
38 
39  public:
41  virtual ~SeqParallelDriver() {}
42 
43  virtual STD_string get_program(programContext& context, const SeqObjBase* soa, const SeqGradObjInterface* sgoa) const = 0;
44 
45  virtual double get_duration (const SeqObjBase* soa, const SeqGradObjInterface* sgoa) const = 0;
46  virtual double get_predelay (const SeqObjBase* soa, const SeqGradObjInterface* sgoa) const = 0;
47 
48  virtual SeqParallelDriver* clone_driver() const = 0;
49 };
50 
52 
53 
58 class SeqParallel : public SeqObjBase, public virtual SeqGradInterface {
59 
60  public:
61 
65  SeqParallel(const STD_string& object_label="unnamedSeqParallel");
66 
70  SeqParallel(const SeqParallel& sgp);
71 
72 
77 
78 
79 
84 
85 
90 
95 
100 
101 
102 
107 
108 
109 
110 
111 
112  // overloading virtual function from SeqTreeObj
113  STD_string get_program(programContext& context) const {return pardriver->get_program(context,get_pulsptr(),get_const_gradptr());}
114  double get_duration() const;
115  STD_string get_properties() const;
116  unsigned int event(eventContext& context) const;
119  void query(queryContext& context) const;
120  RecoValList get_recovallist(unsigned int reptimes, LDRkSpaceCoords& coords) const;
121  double get_rf_energy() const;
122 
123 
124  // overloading virtual function from SeqGradInterface
125  SeqGradInterface& set_strength(float gradstrength);
127  float get_strength() const;
129  double get_gradduration() const;
131 
132 
136  double get_pulprogduration() const;
137 
138 
139 
143  void clear();
144 
145  protected:
146  SeqParallel& set_pulsptr(const SeqObjBase* pptr);
147  const SeqObjBase* get_pulsptr() const;
148 
149  SeqParallel& set_gradptr(SeqGradObjInterface* gptr);
150  SeqParallel& set_gradptr(const SeqGradObjInterface* gptr);
151  SeqParallel& clear_gradptr();
152  SeqGradObjInterface* get_gradptr() const;
153  const SeqGradObjInterface* get_const_gradptr() const;
154 
155 
156  private:
157  friend class SeqOperator;
158  friend class SeqObjList;
159  friend class SeqObjVector;
160  friend class SeqGradObjInterface;
161  friend class SeqGradChanList;
162  friend class SeqEpiDriverParavision;
163 
164  // overloading virtual function from SeqClass
165  void clear_container() {clear();}
166 
167 
168  mutable SeqDriverInterface<SeqParallelDriver> pardriver;
169 
170  Handler<const SeqObjBase* > pulsptr;
171  Handler<SeqGradObjInterface* > gradptr;
172  Handler<const SeqGradObjInterface* > const_gradptr;
173 
174 };
175 
176 
177 
178 
183 #endif
Rotation Matrix.
Definition: geometry.h:67
Container for sequence objects.
Definition: seqlist.h:87
Vector to loop over sequence objects.
Definition: seqobjvec.h:48
SeqValList get_delayvallist() const
SeqParallel & operator/=(SeqGradChan &sgc)
float get_strength() const
fvector get_gradintegral() const
STD_string get_program(programContext &context) const
Definition: seqparallel.h:113
RecoValList get_recovallist(unsigned int reptimes, LDRkSpaceCoords &coords) const
SeqParallel & operator=(const SeqParallel &sgp)
double get_pulprogduration() const
double get_gradduration() const
void query(queryContext &context) const
SeqGradInterface & invert_strength()
STD_string get_properties() const
unsigned int event(eventContext &context) const
SeqParallel(const STD_string &object_label="unnamedSeqParallel")
SeqGradInterface & set_strength(float gradstrength)
void clear()
SeqGradInterface & set_gradrotmatrix(const RotMatrix &matrix)
double get_duration() const
SeqParallel(const SeqParallel &sgp)
SeqValList get_freqvallist(freqlistAction action) const
double get_rf_energy() const
freqlistAction
Definition: seqtree.h:102