StreeterFibreGenerator.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 #ifndef STREETERFIBREGENERATOR_HPP_
00029 #define STREETERFIBREGENERATOR_HPP_
00030
00031 #include <vector>
00032 #include <string>
00033 #include <set>
00034 #include "DistanceMapCalculator.hpp"
00035 #include "AbstractTetrahedralMesh.hpp"
00036 #include "HeartGeometryInformation.hpp"
00037
00049 template<unsigned SPACE_DIM>
00050 class StreeterFibreGenerator
00051 {
00052 private:
00053 AbstractTetrahedralMesh<SPACE_DIM,SPACE_DIM>& mrMesh;
00055 HeartGeometryInformation<SPACE_DIM>* mpGeometryInfo;
00057 c_vector <double, SPACE_DIM> mApexToBase;
00067 double GetAveragedThicknessLocalNode(const unsigned nodeIndex, const std::vector<double>& wallThickness) const;
00068
00074 double GetFibreMaxAngle(const c_vector<HeartRegionType, SPACE_DIM+1>& nodesRegionsForElement) const;
00075
00076 public:
00082 StreeterFibreGenerator(AbstractTetrahedralMesh<SPACE_DIM,SPACE_DIM>& rMesh);
00083
00087 ~StreeterFibreGenerator();
00088
00102 void SetSurfaceFiles(const std::string &rEpicardiumFile,
00103 const std::string &rRightVentricleFile,
00104 const std::string &rLeftVentricleFile,
00105 bool indexFromZero);
00106
00118 void GenerateOrthotropicFibreOrientation(std::string outputDirectory, std::string fibreOrientationFile, bool logInfo=false);
00119
00124 void SetApexToBase(const c_vector<double, SPACE_DIM>& apexToBase);
00125
00130 void SetApexToBase(unsigned axis);
00131 };
00132
00133 #endif