The pipeline is currently adjusted to work on Abel, a computer cluster with Linux OS. Clone and access this repository from a suitable location by the following commands:
$git clone https://github.com/vildenst/3D-heart-models.git
.$cd 3D-heart-models
.
- vtk version 8.0.0, itk (must be built with Module_ITKVtkGlue=ON) version 4.12.0, gmsh version 2.13.1, matlab version 2017A, python version 2.7.10 including numpy, scipy and matplotlib. software.sh will install them for you if you don't have them.
- Run software.sh to create and build some necessary folders and programs:
$sh software.sh
.
- Segmentation of MRI images is preferably performed using Segment.
- All files produced from Segment (.mat format) should be saved in the seg folder created from software.sh. It is important that the different .mat files are saved as Patient_1.mat, Patient_2.mat, ..., Patient_N.mat.
- Run mat2fem.sh by the command
$sbatch mat2fem.sh nr_patients
to generate the finite element files (.elem and .pts files). The argument should be the number of patients included into the seg folder. When completed, the files will be stored inside the FEM folder including pacing coordinates. - Pre-files for the fiber orientation are located in the Files folder, all constructed to fit the fiber generation provided by CARPentry.
- Inside a patient folder which should contain a .pts, .elem, .lon and coordinate file, run
$sbatch risk_strat_1_16.sh
to run simulations through CARP.