indii/fmri/experimental/BlockDesignModel.hpp

00001 #ifndef INDII_FMRI_EXPERIMENTAL_BLOCKDESIGNMODEL_HPP
00002 #define INDII_FMRI_EXPERIMENTAL_BLOCKDESIGNMODEL_HPP
00003 
00004 #include "indii/ml/ode/FunctionModel.hpp"
00005 
00006 namespace indii {
00007   namespace fmri {
00008     namespace experimental {
00009 
00010 /**
00011  * Block design %experimental stimulus.
00012  *
00013  * @author Lawrence Murray <lawrence@indii.org>
00014  * @version $Rev: 285 $
00015  * @date $Date: 2007-07-20 17:25:40 +0100 (Fri, 20 Jul 2007) $
00016  *
00017  * Represents a box-car function, consisting of alternating fixed
00018  * length, fixed intensity blocks of rest and activity.
00019  */
00020 class BlockDesignModel : public indii::ml::ode::FunctionModel {
00021 public:
00022   /**
00023    * Construct new block design.
00024    *
00025    * @param blockLength Time length of a single block.
00026    * @param isFirstRest Is the first block a rest block?
00027    * @param restLevel Stimulus level during rest block.
00028    * @param activityLevel Stimulus level during activity block.
00029    */
00030   BlockDesignModel(const double blockLength, const bool isFirstRest = true,
00031       const double restLevel = 0.0, const double activityLevel = 1.0);
00032 
00033   /**
00034    * Destructor.
00035    */
00036   ~BlockDesignModel();
00037 
00038   /**
00039    * @see indii::ml::ode::FunctionModel
00040    */
00041   double evaluate(const double t, const double y[]);
00042 
00043 private:
00044   /**
00045    * Time length of a single block.
00046    */
00047   const double blockLength;
00048 
00049   /**
00050    * Is the first block a rest block?
00051    */
00052   const bool isFirstRest;
00053 
00054   /**
00055    * Stimulus level during rest block.
00056    */
00057   const double restLevel;
00058 
00059   /**
00060    * Stimulus level during activity block.
00061    */
00062   const double activityLevel;
00063 
00064 };
00065 
00066     }
00067   }
00068 }
00069 
00070 #endif

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