CellProperties.hpp

00001 /*
00002 
00003 Copyright (C) University of Oxford, 2005-2009
00004 
00005 University of Oxford means the Chancellor, Masters and Scholars of the
00006 University of Oxford, having an administrative office at Wellington
00007 Square, Oxford OX1 2JD, UK.
00008 
00009 This file is part of Chaste.
00010 
00011 Chaste is free software: you can redistribute it and/or modify it
00012 under the terms of the GNU Lesser General Public License as published
00013 by the Free Software Foundation, either version 2.1 of the License, or
00014 (at your option) any later version.
00015 
00016 Chaste is distributed in the hope that it will be useful, but WITHOUT
00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
00019 License for more details. The offer of Chaste under the terms of the
00020 License is subject to the License being interpreted in accordance with
00021 English Law and subject to any action against the University of Oxford
00022 being under the jurisdiction of the English Courts.
00023 
00024 You should have received a copy of the GNU Lesser General Public License
00025 along with Chaste. If not, see <http://www.gnu.org/licenses/>.
00026 
00027 */
00028 
00029 
00030 #ifndef _CELLPROPERTIES_HPP_
00031 #define _CELLPROPERTIES_HPP_
00032 
00033 #include "OdeSolution.hpp"
00034 
00048 class CellProperties
00049 {
00050 private:
00052     std::vector<double>& mrVoltage;
00054     std::vector<double>& mrTime;
00055 
00061     double mThreshold;
00062 
00064     std::vector<double> mOnsets;
00066     std::vector<double> mRestingValues;
00068     std::vector<double> mCycleLengths;
00070     std::vector<double> mPeakValues;
00072     std::vector<double> mMaxUpstrokeVelocities;
00074     std::vector<double> mTimesAtMaxUpstrokeVelocity;
00075 
00079     void CalculateProperties();
00080 
00092     std::vector<double> CalculateActionPotentialDurations(const double percentage);
00093 
00094 public:
00095 
00104     CellProperties(std::vector<double> &rVoltage, std::vector<double> &rTime,  double threshold=-30.0)
00105         : mrVoltage(rVoltage),
00106           mrTime(rTime),
00107           mThreshold(threshold)
00108     {
00109         CalculateProperties();
00110     }
00111 
00117     std::vector<double> GetMaxUpstrokeVelocities()
00118     {
00119         return mMaxUpstrokeVelocities;
00120     }
00121 
00129     double GetLastMaxUpstrokeVelocity();
00130 
00136     std::vector<double> GetTimesAtMaxUpstrokeVelocity()
00137     {
00138         return mTimesAtMaxUpstrokeVelocity;
00139     }
00140 
00148     double GetTimeAtLastMaxUpstrokeVelocity();
00149 
00155     std::vector<double>  GetCycleLengths()
00156     {
00157         return mCycleLengths;
00158     }
00159 
00165     std::vector<double>  GetPeakPotentials()
00166     {
00167         return mPeakValues;
00168     }
00169     
00178     std::vector<double> GetRestingPotentials()
00179     {
00180         return mRestingValues;
00181     }
00182 
00191     std::vector<double> GetAllActionPotentialDurations(const double percentage);
00192 
00202     double GetLastActionPotentialDuration(const double percentage);
00203 
00209     std::vector<double> GetActionPotentialAmplitudes();
00210 };
00211 
00212 #endif //_CELLPROPERTIES_HPP_

Generated on Tue Aug 4 16:10:22 2009 for Chaste by  doxygen 1.5.5