ODIN
seqdiffweight.h
1 /***************************************************************************
2  seqdiffweight.h - description
3  -------------------
4  begin : Wed Feb 12 2003
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 SEQDIFFWEIGHT_H
19 #define SEQDIFFWEIGHT_H
20 
21 #include <odinseq/seqparallel.h>
22 #include <odinseq/seqlist.h>
23 #include <odinseq/seqgrad.h>
24 #include <odinseq/seqgradpulse.h>
25 #include <odinseq/seqgradconst.h>
26 #include <odinseq/seqsimvec.h>
27 
53 class SeqDiffWeight : public SeqObjList, public SeqSimultanVector, public virtual SeqGradInterface {
54 
55  public:
56 
68  SeqDiffWeight(const STD_string& object_label, const fvector& bvals, float maxgradstrength,
69  const SeqObjBase& midpart, direction chan, bool stejskalTanner=false, const STD_string& nucleus = "" );
70 
71 
84  SeqDiffWeight(const STD_string& object_label, unsigned int ndir, const fvector& bvals, float maxgradstrength,
85  const SeqObjBase& midpart, unsigned int baseline_rep=0, bool stejskalTanner=false, const STD_string& nucleus = "" );
86 
87 
91  SeqDiffWeight(const STD_string& object_label = "unnamedSeqDiffWeight" );
92 
97 
102 
106  const SeqGradInterface& get_grad1() const {return par1;}
107 
111  const SeqGradInterface& get_grad2() const {return par2;}
112 
116  double get_grad1_duration() const {return par1.get_duration();}
117 
121  double get_grad2_duration() const {return par2.get_duration();}
122 
126  double get_midpart_duration() const {return middle_part.get_duration();}
127 
131  const darray& get_b_vectors() const {return b_vectors_cache;}
132 
133 
134 
135  // overloading virtual function from SeqGradInterface
136  SeqGradInterface& set_strength(float gradstrength);
138  float get_strength() const;
140  double get_gradduration() const;
142 
143 
144  // final overrider of virtual functions from SeqClass
146 
147 
148  // implemented virtual functions from SeqVector
149  bool is_qualvector() const {return false;}
150 
151  private:
152 
153  void build_seq();
154 
155 
156  SeqGradVectorPulse pfg1[n_directions];
157  SeqGradVectorPulse pfg2[n_directions];
158 
159 
160  SeqParallel par1;
161  SeqParallel par2;
162 
163  SeqObjList middle_part;
164 
165  darray b_vectors_cache;
166 
167 };
168 
169 
171 
180 
181  public:
182 
193  SeqDiffWeightFlowComp(const STD_string& object_label, const fvector& bvals, float maxgradstrength,
194  direction chan, double stimdelay=1.0, const STD_string& nucleus = "" );
195 
199  SeqDiffWeightFlowComp(const STD_string& object_label = "unnamedSeqDiffWeightFlowComp" );
200 
205 
210 
211 
212  // final overrider of virtual functions from SeqClass
214 
215 
216  // implemented virtual functions from SeqVector
217  bool is_qualvector() const {return false;}
218 
219  private:
220 
221  void build_seq();
222 
223  SeqGradVectorPulse pfg1;
224  SeqGradVectorPulse pfg2;
225  SeqGradVectorPulse pfg3;
226  SeqGradDelay delay;
227 };
228 
229 
230 
231 
236 #endif
Rotation Matrix.
Definition: geometry.h:67
Flow-Compensated Diffusion Weighting.
SeqDiffWeightFlowComp(const STD_string &object_label="unnamedSeqDiffWeightFlowComp")
bool is_qualvector() const
SeqDiffWeightFlowComp(const SeqDiffWeightFlowComp &sgdwfc)
SeqDiffWeightFlowComp(const STD_string &object_label, const fvector &bvals, float maxgradstrength, direction chan, double stimdelay=1.0, const STD_string &nucleus="")
SeqDiffWeightFlowComp & operator=(const SeqDiffWeightFlowComp &sgdwfc)
Diffusion Weighting.
Definition: seqdiffweight.h:53
fvector get_gradintegral() const
void clear_container()
float get_strength() const
SeqDiffWeight & operator=(const SeqDiffWeight &sgdw)
const darray & get_b_vectors() const
const SeqGradInterface & get_grad2() const
SeqDiffWeight(const STD_string &object_label, unsigned int ndir, const fvector &bvals, float maxgradstrength, const SeqObjBase &midpart, unsigned int baseline_rep=0, bool stejskalTanner=false, const STD_string &nucleus="")
const SeqGradInterface & get_grad1() const
double get_midpart_duration() const
bool is_qualvector() const
double get_grad1_duration() const
SeqGradInterface & invert_strength()
double get_grad2_duration() const
double get_gradduration() const
SeqDiffWeight(const SeqDiffWeight &sgdw)
Definition: seqdiffweight.h:96
SeqDiffWeight(const STD_string &object_label="unnamedSeqDiffWeight")
SeqGradInterface & set_strength(float gradstrength)
SeqDiffWeight(const STD_string &object_label, const fvector &bvals, float maxgradstrength, const SeqObjBase &midpart, direction chan, bool stejskalTanner=false, const STD_string &nucleus="")
SeqGradInterface & set_gradrotmatrix(const RotMatrix &matrix)
Gradient delay.
Definition: seqgradconst.h:84
Vector of gradient pulses.
Definition: seqgradpulse.h:103
Container for sequence objects.
Definition: seqlist.h:87
double get_duration() const
double get_duration() const
SeqSimultanVector & clear()
Definition: seqsimvec.h:56
direction
Definition: odinpara.h:41