PropagationPropertiesCalculator.hpp
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 #include <string>
00035
00036
00046 class PropagationPropertiesCalculator
00047 {
00048 private:
00050 Hdf5DataReader *mpDataReader;
00052 const std::string mVoltageName;
00054 std::vector<double> mTimes;
00056 unsigned mCachedNodeGlobalIndex;
00058 std::vector<double> mCachedVoltages;
00059
00069 std::vector<double>& rCacheVoltages(unsigned globalNodeIndex);
00070
00071 public:
00079 PropagationPropertiesCalculator(Hdf5DataReader* pDataReader,
00080 const std::string voltageName = "V");
00081
00083 virtual ~PropagationPropertiesCalculator();
00084
00091 double CalculateMaximumUpstrokeVelocity(unsigned globalNodeIndex);
00092
00100 std::vector<double> CalculateAllMaximumUpstrokeVelocities(unsigned globalNodeIndex, double threshold);
00101
00109 std::vector<double> CalculateUpstrokeTimes(unsigned globalNodeIndex, double threshold);
00110
00122 double CalculateConductionVelocity(unsigned globalNearNodeIndex,
00123 unsigned globalFarNodeIndex,
00124 const double euclideanDistance);
00125
00137 std::vector<double> CalculateAllConductionVelocities(unsigned globalNearNodeIndex,
00138 unsigned globalFarNodeIndex,
00139 const double euclideanDistance);
00147 double CalculateActionPotentialDuration(const double percentage,
00148 unsigned globalNodeIndex);
00156 double CalculatePeakMembranePotential(unsigned globalNodeIndex);
00157
00165 std::vector<double> CalculateAllActionPotentialDurations(const double percentage,
00166 unsigned globalNodeIndex,
00167 double threshold);
00168
00177 std::vector<std::vector<double> > CalculateAllActionPotentialDurationsForNodeRange(const double percentage,
00178 unsigned lowerNodeIndex,
00179 unsigned upperNodeIndex,
00180 double threshold);
00181
00189 std::vector<unsigned> CalculateAllAboveThresholdDepolarisations(unsigned globalNodeIndex,
00190 double threshold);
00191
00199 unsigned CalculateAboveThresholdDepolarisationsForLastAp(unsigned globalNodeIndex,
00200 double threshold);
00201
00202 };
00203
00204 #endif //_PROPAGATIONPROPERTIESCALCULATOR_HPP_