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:
00054     std::vector<double>& mrVoltage;
00055     std::vector<double>& mrTime;
00056 
00062     double mThreshold;
00063 
00067     std::vector<double> mOnsets;
00068     std::vector<double> mRestingValues;
00069     std::vector<double> mCycleLengths;
00070     std::vector<double> mPeakValues;
00071     std::vector<double> mMaxUpstrokeVelocities;
00072     std::vector<double> mTimesAtMaxUpstrokeVelocity;
00073 
00077     void CalculateProperties();
00078 
00091     std::vector<double> CalculateActionPotentialDurations(const double percentage,
00092                                             std::vector<double>& rOnsets,
00093                                             std::vector<double>& rRestingPotentials,
00094                                             std::vector<double>& rPeakPotentials);
00095 
00096 public:
00100     CellProperties(std::vector<double> &rVoltage, std::vector<double> &rTime,  double threshold=-30.0)
00101         : mrVoltage(rVoltage),
00102           mrTime(rTime),
00103           mThreshold(threshold)
00104     {
00105         CalculateProperties();
00106     }
00107 
00108 
00112     std::vector<double> GetMaxUpstrokeVelocities()
00113     {
00114         return mMaxUpstrokeVelocities;
00115     }
00116     
00122     double GetLastMaxUpstrokeVelocity();
00123     
00127     std::vector<double> GetTimesAtMaxUpstrokeVelocity()
00128     {
00129         return mTimesAtMaxUpstrokeVelocity;
00130     }
00136     double GetTimeAtLastMaxUpstrokeVelocity();
00137     
00141     std::vector<double>  GetCycleLengths()
00142     {
00143         return mCycleLengths;
00144     }
00145     
00149     std::vector<double>  GetPeakPotentials()
00150     {
00151         return mPeakValues;
00152     }
00159     std::vector<double> GetRestingPotentials()
00160     {
00161         return mRestingValues;
00162     }
00163 
00170     std::vector<double> GetAllActionPotentialDurations(const double percentage);
00171   
00179     double GetLastActionPotentialDuration(const double percentage);
00180     
00184     std::vector<double> GetActionPotentialAmplitudes();
00185 };
00186 
00187 #endif //_CELLPROPERTIES_HPP_

Generated on Wed Mar 18 12:51:52 2009 for Chaste by  doxygen 1.5.5