indii/fmri/hemodynamic/NeuralBalloonModel.hpp

00001 #ifndef INDII_FMRI_HEMODYNAMIC_NEURALBALLOONMODEL_HPP
00002 #define INDII_FMRI_HEMODYNAMIC_NEURALBALLOONMODEL_HPP
00003 
00004 #include "BalloonModel.hpp"
00005 #include "indii/ml/aux/vector.hpp"
00006 
00007 namespace indii {
00008   namespace fmri {
00009     namespace hemodynamic {
00010 
00011 /**
00012  * Balloon %model driven by %neural activity.
00013  *
00014  * @author Lawrence Murray <lawrence@indii.org>
00015  * @version $Rev: 285 $
00016  * @date $Date: 2007-07-20 17:25:40 +0100 (Fri, 20 Jul 2007) $
00017  *
00018  * This class extends FlowBalloonModel to be driven by %neural activity
00019  * rather than blood flow, as proposed in @ref Friston2000
00020  * "Friston et al. (2000)", and further described in @ref Friston2003
00021  * "Friston et al. (2003)".
00022  *
00023  * The %model couples %neural activity to blood flow via an additional
00024  * vasodilatory signal \f$s\f$, which encapsulates a range of
00025  * biological processes.
00026  *
00027  * @section NeuralBalloonModel_details Details
00028  **
00029  * The state variables \f$q\f$ and \f$v\f$ of FlowBalloonModel are
00030  * extended to include \f$f \equiv f_{in}(t)\f$ and \f$s\f$, the
00031  * vasodilatory signal. The system of differential equations then
00032  * includes all four of these state variables:
00033  *
00034  * @anchor diffsystem
00035  * \f{eqnarray*}
00036  *   \frac{df}{dt} &=& s \\
00037  *   \frac{ds}{dt} &=& \epsilon u(t) - \frac{s}{\tau_s} -
00038  *     \frac{(f-1)}{\tau_f} \\
00039  *   \frac{dq}{dt} &=& \frac{1}{\tau_0}\left[
00040  *     f\frac{E(t)}{E_0} -
00041  *     f_{out}(v)\frac{q(t)}{v(t)}
00042  *     \right] \\
00043  *   \frac{dv}{dt} &=& \frac{1}{\tau_0}\left[
00044  *     f - f_{out}(v)
00045  *     \right]
00046  * \f}
00047  *
00048  * The effect of this is that the %model becomes driven by the new
00049  * function \f$u(t)\f$, representing %neural activity, rather than the
00050  * flow function \f$f_{in}(t)\f$.
00051  *
00052  * Singularities are handled in the same fashion as FlowBalloonModel.
00053  *
00054  * @section usage Usage
00055  *
00056  * The %model is used in the same way as FlowBalloonModel. Rather than
00057  * creating your own function to replace FlowBalloonModel::F_IN and
00058  * drive the system, however, create your own function to replace
00059  * NeuralBalloonModel::U instead.
00060  */
00061 class NeuralBalloonModel : public BalloonModel {
00062 public:
00063   /**
00064    * State variables.
00065    */
00066   enum StateVariable {
00067     /**
00068      * \f$q = \frac{Q(t)}{Q_0}\f$; normalised dHb content of venous
00069      * compartment at the current time.
00070      */
00071     Q,
00072 
00073     /**
00074      * \f$v = \frac{V(t)}{V_0}\f$; normalised volume of the venous
00075      * compartment at the current time.
00076      */
00077     V,
00078 
00079     /**
00080      * \f$\dot{f_{in}} = \frac{F_{in}(t)}{F_0}\f$; normalised flow into the
00081      * venous compartment.
00082      */
00083     F,
00084 
00085     /**
00086      * \f$s\f$; flow inducing signal.
00087      */
00088     S
00089   };
00090 
00091   /**
00092    * Parameter indices. The first part of this enum matches that of
00093    * FlowBalloonModel for consistency.
00094    */
00095   enum BiophysicalParameter {
00096     /**
00097      * \f$V_0\f$; volume of the venous compartment at rest.
00098      */
00099     V_0,
00100   
00101     /**
00102      * \f$E_0\f$; oxygen extraction rate of the venous compartment at
00103      * rest.
00104      */
00105     E_0,
00106 
00107     /**
00108      * \f$\tau_0 = \frac{V_0}{F_0}\f$; mean transit time through the
00109      * venous compartment at rest.
00110      */
00111     TAU_0,
00112 
00113     /**
00114      * \f$\alpha\f$; Grubb's exponent.
00115      */
00116     ALPHA,
00117 
00118     /**
00119      * \f$\epsilon\f$; efficacy with which %neural activity causes an
00120      * increase in signal.
00121      */
00122     EPSILON,
00123 
00124     /**
00125      * \f$\tau_s\f$; time constant for signal decay. Note that
00126      * \f$\tau_s\f$ in @ref Friston2000 "Friston et al. (2000)" equals
00127      * \f$\frac{1}{\kappa}\f$ in @ref Friston2003 "Friston et al. (2003)".
00128      */
00129     TAU_S,
00130 
00131     /**
00132      * \f$\tau_f\f$; time constant for autoregulatory feedback from
00133      * blood flow. Note that \f$\tau_f\f$ in @ref Friston2000
00134      * "Friston et al. (2000)" equals \f$\frac{1}{\gamma}\f$ in @ref
00135      * Friston2003 "Friston et al. (2003)".
00136      */
00137     TAU_F
00138   };
00139 
00140   /**
00141    * Function indices. The first part of this enum matches that of
00142    * FlowBalloonModel for consistency.
00143    */
00144   enum BiophysicalFunction {
00145     /**
00146      * \f$f_{in}(t) = \frac{F_{in}(t)}{F_0}\f$; normalised flow into
00147      * the venous compartment.
00148      */
00149     F_IN,
00150 
00151     /**
00152      * \f$f_{out}(t) = \frac{F_{out}(t)}{F_0}\f$; normalised flow out
00153      * of the venous compartment.
00154      */
00155     F_OUT,
00156 
00157     /**
00158      * \f$E(t)\f$; oxygen extraction rate of the venous compartment.
00159      */
00160     E,
00161 
00162     /**
00163      * \f$u(t)\f$; %neural activity.
00164      */
00165     U
00166   };
00167 
00168   /**
00169    * Create new %model with default biophysical parameters and
00170    * functions as defined in NeuralBalloonModelDefaults and
00171    * FlowBalloonModelDefaults.
00172    */
00173   NeuralBalloonModel();
00174 
00175   /**
00176    * Destructor.
00177    */
00178   virtual ~NeuralBalloonModel();
00179 
00180   virtual indii::ml::aux::vector suggestInitialState();
00181 
00182   /**
00183    * @see indii::ml::ode::DifferentialModel
00184    */
00185   virtual void calculateDerivatives(double t, const double y[], double dydt[]);
00186 
00187 private:
00188   /**
00189    * Number of state variables.
00190    */
00191   static const unsigned int DIMENSIONS = 4;
00192 
00193   /**
00194    * Number of parameters.
00195    */
00196   static const unsigned int NUM_PARAMETERS = 7;
00197 
00198   /**
00199    * Number of functions.
00200    */
00201   static const unsigned int NUM_FUNCTIONS = 4;
00202 
00203 };
00204 
00205     }
00206   }
00207 }
00208 
00209 #endif

Generated on Tue Oct 9 22:02:07 2007 for fmrii fMRI Modelling Library by  doxygen 1.5.2