indii/fmri/hemodynamic/LogBOLDCalculator.hpp

00001 #ifndef INDII_FMRI_HEMODYNAMIC_LOGBOLDCALCULATOR_HPP
00002 #define INDII_FMRI_HEMODYNAMIC_LOGBOLDCALCULATOR_HPP
00003 
00004 #include "indii/ml/aux/vector.hpp"
00005 #include "indii/ml/ode/ParameterCollection.hpp"
00006 
00007 namespace indii {
00008   namespace fmri {
00009     namespace hemodynamic {
00010 
00011       class BalloonModel;
00012 
00013 /**
00014  * Calculates Blood Oxygenation Level Dependent (BOLD) signal from a
00015  * LogFlowBalloonModel or LogNeuralBalloonModel.
00016  *
00017  * @author Lawrence Murray <lawrence@indii.org>
00018  * @version $Rev: 285 $
00019  * @date $Date: 2007-07-20 17:25:40 +0100 (Fri, 20 Jul 2007) $
00020  *
00021  * Calculates the BOLD signal as for BOLDCalculator, but from a
00022  * BalloonModel working in log space.
00023  */
00024 class LogBOLDCalculator : public indii::ml::ode::ParameterCollection {
00025 public:
00026   /**
00027    * Biophysical parameters. These are initialised according to the
00028    * values in BOLDCalculatorDefaults, but may be overridden using
00029    * setParameter().
00030    */
00031   enum BiophysicalParameter {
00032     /**
00033      * \f$k_1\f$
00034      */
00035     K_1,
00036 
00037     /**
00038      * \f$k_2\f$
00039      */
00040     K_2,
00041 
00042     /**
00043      * \f$k_3\f$
00044      */
00045     K_3
00046   };
00047 
00048   /**
00049    * Create new log BOLD calculator with default biophysical
00050    * parameters, coupled with the given balloon %model.
00051    *
00052    * @param m LogFlowBalloonModel or LogNeuralBalloonModel from which
00053    * to calculate BOLD signal.
00054    */
00055   LogBOLDCalculator(const BalloonModel* m);
00056 
00057   /**
00058    * Destructor.
00059    */
00060   virtual ~LogBOLDCalculator();
00061 
00062   /**
00063    * Calculate BOLD signal from coupled balloon %model and given
00064    * state.
00065    *
00066    * @param y State of the balloon %model, usually provided by the
00067    * ordinary differential equation solver being used on the balloon
00068    * %model, such as indii::ml::ode::AdaptiveRungeKutta.
00069    *
00070    * @return The BOLD signal produced by the coupled balloon %model in
00071    * the given state.
00072    */
00073   double calculate(const indii::ml::aux::vector& y);
00074 
00075 private:
00076   /**
00077    * Balloon %model for which to calculate BOLD response.
00078    */
00079   const BalloonModel* m;
00080 
00081   /**
00082    * Number of biophysical parameters.
00083    */
00084   static const unsigned int NUM_PARAMETERS = 3;
00085 
00086 };
00087 
00088     }
00089   }
00090 }
00091 
00092 #endif

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