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
00031
00032
00033
00034
00035
00036
00037 #ifndef _PROPAGATIONPROPERTIESCALCULATOR_HPP_
00038 #define _PROPAGATIONPROPERTIESCALCULATOR_HPP_
00039
00040 #include "Hdf5DataReader.hpp"
00041 #include <string>
00042
00043
00053 class PropagationPropertiesCalculator
00054 {
00055 private:
00057 Hdf5DataReader* mpDataReader;
00059 const std::string mVoltageName;
00061 std::vector<double> mTimes;
00063 unsigned mCachedNodeGlobalIndex;
00065 std::vector<double> mCachedVoltages;
00066
00067 protected:
00077 std::vector<double>& rGetCachedVoltages(unsigned globalNodeIndex);
00078
00079 public:
00087 PropagationPropertiesCalculator(Hdf5DataReader* pDataReader,
00088 const std::string voltageName = "V");
00089
00091 virtual ~PropagationPropertiesCalculator();
00092
00099 double CalculateMaximumUpstrokeVelocity(unsigned globalNodeIndex);
00100
00108 std::vector<double> CalculateAllMaximumUpstrokeVelocities(unsigned globalNodeIndex, double threshold);
00109
00117 std::vector<double> CalculateUpstrokeTimes(unsigned globalNodeIndex, double threshold);
00118
00130 double CalculateConductionVelocity(unsigned globalNearNodeIndex,
00131 unsigned globalFarNodeIndex,
00132 const double euclideanDistance);
00133
00145 std::vector<double> CalculateAllConductionVelocities(unsigned globalNearNodeIndex,
00146 unsigned globalFarNodeIndex,
00147 const double euclideanDistance);
00155 double CalculateActionPotentialDuration(const double percentage,
00156 unsigned globalNodeIndex);
00164 double CalculatePeakMembranePotential(unsigned globalNodeIndex);
00165
00173 std::vector<double> CalculateAllActionPotentialDurations(const double percentage,
00174 unsigned globalNodeIndex,
00175 double threshold);
00176
00185 std::vector<std::vector<double> > CalculateAllActionPotentialDurationsForNodeRange(const double percentage,
00186 unsigned lowerNodeIndex,
00187 unsigned upperNodeIndex,
00188 double threshold);
00189
00197 std::vector<unsigned> CalculateAllAboveThresholdDepolarisations(unsigned globalNodeIndex,
00198 double threshold);
00199
00207 unsigned CalculateAboveThresholdDepolarisationsForLastAp(unsigned globalNodeIndex,
00208 double threshold);
00209
00215 void SetHdf5DataReader(Hdf5DataReader* pDataReader);
00216
00217 };
00218
00219 #endif //_PROPAGATIONPROPERTIESCALCULATOR_HPP_