00001 /*************************************************************************** 00002 seqgradpulse.h - description 00003 ------------------- 00004 begin : Tue Aug 13 2002 00005 copyright : (C) 2001 by Thies H. Jochimsen 00006 email : jochimse@cns.mpg.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef SEQGRADPULSE_H 00019 #define SEQGRADPULSE_H 00020 00021 #include <odinseq/seqgradconst.h> 00022 #include <odinseq/seqgradvec.h> 00023 #include <odinseq/seqgradchanlist.h> 00024 #include <odinseq/seqgradchanparallel.h> 00025 00026 00027 00034 00035 00041 class SeqGradConstPulse : public SeqGradChanList { 00042 00043 public: 00050 SeqGradConstPulse(const STD_string& object_label,direction gradchannel, float gradstrength, float gradduration); 00051 00052 00056 SeqGradConstPulse(const SeqGradConstPulse& sgcp); 00057 00061 SeqGradConstPulse(const STD_string& object_label = "unnamedSeqGradConstPulse"); 00062 00066 SeqGradConstPulse& operator = (const SeqGradConstPulse& sgcp); 00067 00068 00072 SeqGradConstPulse& set_constduration(float duration) {constgrad.set_duration(duration);return *this;}; 00073 00074 00078 double get_constduration() const {return constgrad.get_gradduration();} 00079 00080 00081 // overloading virtual function from SeqGradInterface 00082 SeqGradInterface& set_strength(float gradstrength); 00083 00084 00085 private: 00086 SeqGradConst constgrad; 00087 SeqGradDelay offgrad; 00088 00089 }; 00090 00091 00092 00094 00103 class SeqGradVectorPulse : public SeqGradChanList { 00104 00105 public: 00113 SeqGradVectorPulse(const STD_string& object_label,direction gradchannel, float maxgradstrength, 00114 const fvector& trimarray, float gradduration); 00115 00119 SeqGradVectorPulse(const SeqGradVectorPulse& sgvp); 00120 00124 SeqGradVectorPulse(const STD_string& object_label = "unnamedSeqGradVectorPulse"); 00125 00129 SeqGradVectorPulse& operator = (const SeqGradVectorPulse& sgvp); 00130 00131 00135 SeqGradVectorPulse& set_trims(const fvector& trims) { vectorgrad.set_trims(trims); return *this;} 00136 00140 fvector get_trims() const {return vectorgrad.get_trims();} 00141 00145 SeqGradVectorPulse& set_reorder_scheme(reorderScheme scheme,unsigned int nsegments=1) {vectorgrad.set_reorder_scheme(scheme,nsegments); return *this;} 00146 00147 00151 SeqGradVectorPulse& set_encoding_scheme(encodingScheme scheme) {vectorgrad.set_encoding_scheme(scheme); return *this;} 00152 00156 const SeqVector& get_reorder_vector() const {return vectorgrad.get_reorder_vector();} 00157 00161 SeqGradVectorPulse& set_constduration(float duration){vectorgrad.set_duration(duration);return *this;}; 00162 00166 double get_constduration() const {return vectorgrad.get_gradduration();} 00167 00171 operator const SeqVector& () const {return vectorgrad;} 00172 00173 00174 // overloading virtual function from SeqGradInterface 00175 SeqGradInterface& set_strength(float gradstrength); 00176 00177 private: 00178 friend class SeqGradPhaseEnc; 00179 friend class SeqGradEcho; 00180 00181 SeqGradVector vectorgrad; 00182 SeqGradDelay offgrad; 00183 }; 00184 00185 00186 00187 00191 #endif
1.5.6