-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnonCartesianTraj.h
executable file
·54 lines (44 loc) · 3.04 KB
/
nonCartesianTraj.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef NONCARTESIANTRAJ_H
#define NONCARTESIANTRAJ_H 1
#pragma warning(disable: 4514 4710)
#include "mtg_functions.h"
#include <vector>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
class NonCartesianTraj {
public:
NonCartesianTraj(void);
~NonCartesianTraj(void);
inline double getMaxAmplitudeX() {return m_dAx;}
inline double getMaxAmplitudeY() {return m_dAy;}
inline double getMaxAmplitudeZ() {return m_dAz;}
inline double getMaxAbsAmplitude() {return m_dAmp;}
inline double getMomentumX() {return m_dMomX;}
inline double getMomentumY() {return m_dMomY;}
inline double getMomentumZ() {return m_dMomZ;}
inline double getPreMomentumX() {return m_dPreMomX;}
inline double getPreMomentumY() {return m_dPreMomY;}
inline double getPreMomentumZ() {return m_dPreMomZ;}
inline double getPostMomentumX() {return m_dPostMomX;}
inline double getPostMomentumY() {return m_dPostMomY;}
inline double getPostMomentumZ() {return m_dPostMomZ;}
inline double getMaxAbsMomentum() {return sqrt(m_dMomX*m_dMomX + m_dMomY*m_dMomY + m_dMomZ*m_dMomZ);}
inline double getMaxAbsPreMomentum() {return sqrt(m_dPreMomX*m_dPreMomX + m_dPreMomY*m_dPreMomY + m_dPreMomZ*m_dPreMomZ);}
inline double getMaxAbsPostMomentum() {return sqrt(m_dPostMomX*m_dPostMomX + m_dPostMomY*m_dPostMomY + m_dPostMomZ*m_dPostMomZ);}
inline double getMomentumRead (double phi, double theta=0.) {return (cos(theta)*cos(phi)*m_dMomX - sin(phi)*m_dMomY + sin(theta)*cos(phi)*m_dMomZ);}
inline double getMomentumPhase(double phi, double theta=0.) {return (cos(theta)*sin(phi)*m_dMomX + cos(phi)*m_dMomY + sin(theta)*sin(phi)*m_dMomZ);}
inline double getMomentumSlice(double phi, double theta=0.) {(void) phi; return (-sin(theta)*m_dMomX + cos(theta)*m_dMomZ);}
inline double getPreMomentumRead (double phi, double theta=0.) {return (cos(theta)*cos(phi)*m_dPreMomX - sin(phi)*m_dPreMomY + sin(theta)*cos(phi)*m_dPreMomZ);}
inline double getPreMomentumPhase(double phi, double theta=0.) {return (cos(theta)*sin(phi)*m_dPreMomX + cos(phi)*m_dPreMomY + sin(theta)*sin(phi)*m_dPreMomZ);}
inline double getPreMomentumSlice(double phi, double theta=0.) {(void) phi; return (-sin(theta)*m_dPreMomX + cos(theta)*m_dPreMomZ);}
inline double getPostMomentumRead (double phi, double theta=0.) {return (cos(theta)*cos(phi)*m_dPostMomX - sin(phi)*m_dPostMomY + sin(theta)*cos(phi)*m_dPostMomZ);}
inline double getPostMomentumPhase(double phi, double theta=0.) {return (cos(theta)*sin(phi)*m_dPostMomX + cos(phi)*m_dPostMomY + sin(theta)*sin(phi)*m_dPostMomZ);}
inline double getPostMomentumSlice(double phi, double theta=0.) {(void) phi; return (-sin(theta)*m_dPostMomX + cos(theta)*m_dPostMomZ);}
protected:
std::vector<float> m_vfGx, m_vfGy, m_vfGz; //m_dAx*m_vfGx mT/m
double m_dAx, m_dAy, m_dAz, m_dAmp, m_dMomX, m_dMomY, m_dMomZ, m_dPreMomX, m_dPreMomY, m_dPreMomZ, m_dPostMomX, m_dPostMomY, m_dPostMomZ;
double m_dGradRasterTime;
double m_dLarmorConst; //kHz/mT
};
#endif