ANIMA  4.0
animaEPGSignalSimulator.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <vnl/vnl_matrix.h>
5 
6 #include "AnimaSignalSimulationExport.h"
7 
8 namespace anima
9 {
10 
11 class ANIMASIGNALSIMULATION_EXPORT EPGSignalSimulator
12 {
13 public:
15  virtual ~EPGSignalSimulator() {}
16 
17  typedef std::vector <double> RealVectorType;
18 
20  RealVectorType &GetValue(double t1Value, double t2Value,
21  double flipAngle, double m0Value);
22 
24  RealVectorType &GetFADerivative();
25 
26  void SetEchoSpacing(double val) {m_EchoSpacing = val;}
27  void SetExcitationFlipAngle(double val) {m_ExcitationFlipAngle = val;}
28 
29  void SetNumberOfEchoes(unsigned int val) {m_NumberOfEchoes = val;}
30 
31 protected:
32  void ComputeT2SignalMatrixElements(double t1Value, double t2Value, double flipAngle);
33 
34 private:
35  double m_EchoSpacing;
36  double m_ExcitationFlipAngle;
37  unsigned int m_NumberOfEchoes;
38 
39  double m_FirstEPGProduct, m_SecondEPGProduct, m_ThirdEPGProduct, m_FourthEPGProduct, m_FifthEPGProduct;
40  double m_FirstDerivativeProduct, m_SecondDerivativeProduct, m_ThirdDerivativeProduct;
41 
42  // Internal work variables. Because of this, not thread safe !
43  vnl_matrix <double> m_SimulatedT2Values;
44  vnl_matrix <double> m_SimulatedDerivativeT2Values;
45  RealVectorType m_OutputVector;
46  RealVectorType m_OutputB1Derivative;
47 };
48 
49 } // end namespace of anima
std::vector< double > RealVectorType
void SetNumberOfEchoes(unsigned int val)