ANIMA  4.0
animaB1GammaDistributionIntegrand.cxx
Go to the documentation of this file.
2 
3 #include <boost/math/distributions/gamma.hpp>
4 #include <boost/math/special_functions/polygamma.hpp>
5 
6 namespace anima
7 {
8 
10 {
11  if (m_EPGVectors.find(t) == m_EPGVectors.end())
12  m_EPGVectors.insert(std::make_pair(t,m_EPGSimulator.GetValue(m_T1Value, t, m_FlipAngle, 1.0)));
13 
14  double shape = m_GammaMean * m_GammaMean / m_GammaVariance;
15  double scale = m_GammaVariance / m_GammaMean;
16 
17  double gammaValue = boost::math::gamma_p_derivative(shape, t / scale) / scale;
18 
19  return m_EPGVectors[t][m_EchoNumber] * gammaValue;
20 }
21 
22 } // end namespace anima
EPGVectorsMapType & m_EPGVectors
Since boost Gauss Legendre integration works on object copies, we need to keep a reference to EPG vec...
anima::EPGSignalSimulator & m_EPGSimulator
EPG signal simulator reference: instantiated outside.
RealVectorType & GetValue(double t1Value, double t2Value, double flipAngle, double m0Value)
Get EPG values at given point.