00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _PROPAGATIONPROPERTIESCALCULATOR_HPP_
00031 #define _PROPAGATIONPROPERTIESCALCULATOR_HPP_
00032
00033 #include "Hdf5DataReader.hpp"
00034
00035 #include <string>
00044 class PropagationPropertiesCalculator
00045 {
00046 private:
00048 Hdf5DataReader *mpDataReader;
00050 const std::string mVoltageName;
00052 std::vector<double> mTimes;
00054 unsigned mCachedNodeGlobalIndex;
00056 std::vector<double> mCachedVoltages;
00057
00067 std::vector<double>& rCacheVoltages(unsigned globalNodeIndex);
00068
00069 public:
00077 PropagationPropertiesCalculator(Hdf5DataReader* pDataReader,
00078 const std::string voltageName = "V");
00079 virtual ~PropagationPropertiesCalculator();
00080
00087 double CalculateMaximumUpstrokeVelocity(unsigned globalNodeIndex);
00088
00096 std::vector<double> CalculateAllMaximumUpstrokeVelocities(unsigned globalNodeIndex, double threshold);
00097
00105 std::vector<double> CalculateUpstrokeTimes(unsigned globalNodeIndex, double threshold);
00106
00119 double CalculateConductionVelocity(unsigned globalNearNodeIndex,
00120 unsigned globalFarNodeIndex,
00121 const double euclideanDistance);
00122
00135 std::vector<double> CalculateAllConductionVelocities(unsigned globalNearNodeIndex,
00136 unsigned globalFarNodeIndex,
00137 const double euclideanDistance);
00145 double CalculateActionPotentialDuration(const double percentage,
00146 unsigned globalNodeIndex);
00154 double CalculatePeakMembranePotential(unsigned globalNodeIndex);
00155
00163 std::vector<double> CalculateAllActionPotentialDurations(const double percentage,
00164 unsigned globalNodeIndex,
00165 double threshold);
00173 std::vector<unsigned> CalculateAllAboveThresholdDepolarisations(unsigned globalNodeIndex,
00174 double threshold);
00175
00183 unsigned CalculateAboveThresholdDepolarisationsForLastAp(unsigned globalNodeIndex,
00184 double threshold);
00185
00186 };
00187
00188 #endif //_PROPAGATIONPROPERTIESCALCULATOR_HPP_