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
00044 template<unsigned SPACE_DIM>
00045 class StreeterFibreGenerator
00046 {
00047 private:
00048 AbstractTetrahedralMesh<SPACE_DIM,SPACE_DIM>& mrMesh;
00050 HeartGeometryInformation<SPACE_DIM>* mpGeometryInfo;
00052 c_vector <double, SPACE_DIM> mApexToBase;
00062 double GetAveragedThicknessLocalNode(const unsigned nodeIndex, const std::vector<double>& wallThickness) const;
00063
00069 double GetFibreMaxAngle(const c_vector<HeartRegionType, SPACE_DIM+1>& nodesRegionsForElement) const;
00070
00071 public:
00077 StreeterFibreGenerator(AbstractTetrahedralMesh<SPACE_DIM,SPACE_DIM>& rMesh);
00078
00082 ~StreeterFibreGenerator();
00083
00093 void SetSurfaceFiles(const std::string &epicardiumFile,
00094 const std::string &rightVentricleFile,
00095 const std::string &leftVentricleFile,
00096 bool indexFromZero);
00097
00109 void GenerateOrthotropicFibreOrientation(std::string outputDirectory, std::string fibreOrientationFile, bool logInfo=false);
00110
00115 void SetApexToBase(const c_vector<double, SPACE_DIM>& apexToBase);
00116
00121 void SetApexToBase(unsigned axis);
00122 };
00123
00124 #endif