Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 13 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org, sciencedirect.com -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.2%) to scientific vocabulary
Repository
Consistent Biventricular Coordinates
Basic Info
- Host: GitHub
- Owner: KIT-IBT
- License: apache-2.0
- Language: Jupyter Notebook
- Default Branch: master
- Size: 72.2 MB
Statistics
- Stars: 18
- Watchers: 3
- Forks: 10
- Open Issues: 4
- Releases: 3
Metadata Files
README.md
Cobiveco v1.1 (CobivecoX)
Consistent biventricular coordinates (https://doi.org/10.1016/j.media.2021.102247 / https://arxiv.org/abs/2102.02898 / https://doi.org/10.1016/j.media.2024.103091)
CobivecoX on geometries including the four valve annuli
Cobiveco 1.0 on geometries with a flat base

Overview
This is a MATLAB implementation to compute local coordinates on tetrahedral meshes of biventricular cardiac geometries. Also provided are functions to utilize the results for transferring data, standardized visualization of data and alignment of the heart with the global coordinate axes. CobivecoX is backwards compatible with Cobiveco and can be applied to both meshes with and without including the valve annuli.
How to install CobivecoX (macOS Monterey)
- A MATLAB installation version 2022a (or above) is required to run CobivecoX. Check this link on how to install it if required.
Here is the list of all Add-ons needed to add in MATLAB:
- Image Processing Toolbox
- Mapping Toolbox
- Signal Processing Toolbox
- Statistics and Machine Learning Toolbox
- Curve Fitting Toolbox
- Parallel Computing Toolbox
If you already have MATLAB and need to change licences, see this link to activate the app. Ones MATLAB is running, you can check if a spesific add-on is anabled by using the command matlab.addons.isAddonEnabled('NameOfToolbox') (it returns the logical value 1 if it is enabled).
Alternatively, addons = matlab.addons.installedAddons shows a list of all installed add-ons.
- Install vtk (For MacOS you can follow this guide).
- Install cmake using the command
$ brew install cmake
4. Install the dependencies [1,2,3] needed running the dependencies/install_cobiveco.sh using the command
$ sh install_cobiveco.sh
Note: once mmg is installed, check that the bin directory is non-empty using the command
$ ls dependencies/mmg/build/bin
If the files mmg2d_O3, mmg3d_O3, mmgs_O3 are present, you can go on to the next step. Else perform download the mmg binary from here and move mmg2d_O3, mmg3d_O3, mmgs_O3 to dependencies/mmg/build/bin.
When running any example later, a warning about unidentified developer may occur. This can be solved by editing the setting as descibed here.
5. Paraview will be used during the calculation of the coordinates and is highly recommended for visualization. Install Paraview. You can download Paraview here (recommended on Mac: ParaView-5.11.0-RC1-MPI-OSX10.13-Python3.9-x86_64.dmg). The installation was tested was Paraview 5.10 and 5.11 .
6. Check that pvpython can be evoked from the commandline. If not, add the path to your ~/.zshrc.
First, check where pvpython is located.
$
$ which pvpython
The output will look something like this:
/Applications/ParaView-5.10.1.app/Contents/bin/pvpython
Modify the following commands to represent your path. Then, add pvpython to your ~/.zshrc using your favorite editor or just by doing:
$ echo "export PATH="$PATH:/Applications/ParaView-5.10.1.app/Contents/bin/"" >> ~/.zshrc
$ ln -s /Applications/ParaView-5.10.0.app/Contents/bin/pvpython ~/bin
7. To switch between environments in Matlab, we recommend using conda. However, one can also create a python environment using the requirements.txt file, which is more light-weight, than choosing anaconda. However, one should be aware, that you can switch between calling pvpython and python and might need to modify the execution of condalab in the matlab code. See step 9 below.
To create a python environment one can simply execute the following:
pip install -r requirements.txt
or use conda to create a minimal environment
conda install --file requirements.txt
The tested and recommended version of this code is currently using anaconda. You can install Anaconda using this guide (commandline-installation recommended). This guide for conda might also be useful if the is user not familiar with it.
- Create a conda environment called base using the
cobivecox.yml.
You can use the following command to create the python environment with the dependencies needed:
$ conda env create -f cobivecox.yml
9. The conda path has to be put in manually in the code.Use the command
$ which conda
or
$ conda env list
in the terminal to receive the path.
Copy the path you got in line 19 of the function createBoundarySurfacesAB.m (you can find this function in the directory functions)
$ condaPath = '{*the path from which conda*}';
10. To avoid communication errors, open MATLAB from your terminal.
One can add the shortcut to their ~/.zshrc
$
$ alias matlab="/Applications/MATLAB_R2022b.app/bin/matlab"
and then use the following command in the directory examples
$
$ matlab
to open the program.
Dependencies
Before using Cobiveco, its dependencies [1,2,3] need to be installed by running dependencies/install_cobiveco.sh. Note that this script was tested on MacOS.
Usage
- Open MATLAB from the commandline.
If you set the matlabalias as described above you can do that in the directory examples using the follwoing command:
$
$ matlab
to open the program.
Input Files To Compute Coordinates
- To use CobivecoX, the user needs to provide the following input files in a directory named
{filename}containing the following files:
- {filename}_av.ply
- {filename}endolv.ply
- {filename}endorv.ply
- {filename}epibase.ply
- {filename}epino_base.ply
- {filename}_mv.ply
- {filename}_pv.ply
- {filename}_tv.ply
- {filename}.vtu
Note that the folder {filename} needs to be in examples.
- In case of needing the original Cobiveco, the following input files have to be provided:
- {filename}_base.ply
- {filename}endolv.ply
- {filename}endorv.ply
- {filename}_epi.ply
- {filename}.vtu
Computing coordinates
Coordinates can be computed with:
```matlab % Create a cobiveco object, providing a config struct with input and output path prefixes c = cobiveco(struct('inPrefix','{filename}/{filename}', 'outPrefix','result_{filename}/'));
% Run computation of all coordinates c.prepareMesh0; if c.cfg.CobivecoX == true c.computeAllCobivecoX; else c.computeAllCobiveco; end
% Optional: Retrieve the result and a config struct with all parameters result = c.result; config = c.cfg; ```
Run help cobiveco for more information.
An example can be found in the directory examples named examples_single_cobiveco_run.m.
Please note that at line 18 all {filename} placeholders have to be substituted with the name of the file and directory names.
Finally, once MATLAB has finished exporting the result, it can be visualized opening ParaView and selecting the result.vtu file in the result_{filename} directory.
Utilities
The following utilities are provided:
- cobiveco_computeMappingMatrix.m: Computes a matrix to map point data from a source to a target mesh.
- cobiveco_createPolarProjection.m: Creates a standardized visualization by projecting scalar data onto polar plots.
- cobiveco_applyAlignmentMatrix.m: Uses the matrix
Rcomputed by Cobiveco to align the heart axes with the global coordinate axes.
Examples
The following examples illustrate the use of Cobiveco:
- example_geo1.m: Computes coordinates on geo1 – the mean shape of a statistical shape model [4,5].
- example_geo2.m: Computes coordinates on geo2 – a patient geometry.
- examplemappingCobiveco.m: Uses the coordinates to map data between geo1 and geo2 defaulting to Cobiveco1.0.
- example_polarProjection.m: Uses the coordinates to project data onto polar plots.
- examplemappingbatch_CobivecoX.m: calculates two way mapping error as described by Bayer et al., 2018 by mapping coordinates between reference and cohort.
- example_CobivecoX.m: Computes coordinates on the mean shape of a Tetralogy of Fallot atlas including valve annuli.
- example_parcellation.m and exampleextendedparcellation.m: Add a parcellation in four different areas (left anterior, left posterior, right anterior and right posterior) to the given result form cobiveco or cobivecoX respectively.
- exampleahaparcellation.m and exampleextendedaha_parcellation.m: Add a parcellation according to the AHA 17 segmentation model and extending it also to the right ventricle to the given result form cobiveco or cobivecoX respectively.
Example Data
Example data that is too big too be stored on github can be downloaded from the zenodo repository.
Hints
To speed up the computation for fine meshes (several millions of nodes), we recommend to increase the sizing parameters of Mmg. This way, all coordinates except the binary transventricular coordinate are automatically computed on coarser meshes and interpolated to the original mesh. As the non-binary coordinates are spatially low-frequent, an edge length of slightly below 1 mm (or at maximum one third of the smallest wall thickness) is sufficient. If you want to compute coordinates for a mesh with an average edge length of 0.3 mm, for example, scale the default value for the input 'mmgSizingParam' by a factor of 0.9/0.3 = 3 to use an effective edge length of about 0.9 mm for the computations:
matlab
c = cobiveco(struct('inPrefix','heart', 'outPrefix','result/', 'mmgSizingParam',3*[0.1 0.9 1.1]));
License
All source code is subject to the terms of the Apache License 2.0. Copyright 2021 Steffen Schuler, Karlsruhe Institute of Technology.
Contacts
Lisa Pankewitz Simula Research Laboratory lisa@simula.no / www.simula.no
Steffen Schuler & Axel Loewe Institute of Biomedical Engineering Karlsruhe Institute of Technology axel.loewe@kit.edu / www.ibt.kit.edu
References
[2] Jacobson, A., 2018. gptoolbox: Geometry processing toolbox.
[3] Schuler, S., 2020. vtkToolbox: A MEX interface to the VTK library.
Owner
- Name: KIT-IBT
- Login: KIT-IBT
- Kind: organization
- Email: publications@ibt.kit.edu
- Repositories: 6
- Profile: https://github.com/KIT-IBT
Institute of Biomedical Engineering (IBT) at Karlsruhe Institute of Technology (KIT)
Citation (CITATION.cff)
cff-version: 1.2.0
title: Cobiveco
message: "Please cite this software using the metadata from 'preferred-citation'."
type: software
authors:
- given-names: Steffen
family-names: Schuler
email: steffen.schuler@kit.edu
affiliation: Karlsruhe Institute of Technology (KIT)
orcid: https://orcid.org/0000-0001-6515-3807
- given-names: Lisa
family-names: Pankewitz
email: lisa@simula.no
affiliation: Simula Research Laboratory
orcid: https://orcid.org/0009-0008-8477-3698
- given-names: Axel
family-names: Loewe
email: axel.loewe@kit.edu
affiliation: Karlsruhe Institute of Technology (KIT)
orcid: https://orcid.org/0000-0002-2487-4744
license: Apache-2.0
repository-code: https://github.com/KIT-IBT/Cobiveco
preferred-citation:
type: article
title: "Cobiveco: Consistent biventricular coordinates for precise and intuitive description of position in the heart – with MATLAB implementation"
authors:
- family-names: Schuler
given-names: Steffen
- family-names: Pilia
given-names: Nicolas
- family-names: Potyagaylo
given-names: Danila
- family-names: Loewe
given-names: Axel
doi: 10.1016/j.media.2021.102247
journal: Medical Image Analysis
year: 2021
volume: 74
pages: 102247
GitHub Events
Total
- Issues event: 6
- Watch event: 1
- Issue comment event: 8
- Push event: 1
- Pull request event: 4
- Fork event: 2
- Create event: 1
Last Year
- Issues event: 6
- Watch event: 1
- Issue comment event: 8
- Push event: 1
- Pull request event: 4
- Fork event: 2
- Create event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 3
- Total pull requests: 1
- Average time to close issues: 14 days
- Average time to close pull requests: about 1 hour
- Total issue authors: 3
- Total pull request authors: 1
- Average comments per issue: 2.33
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 1
- Average time to close issues: 14 days
- Average time to close pull requests: about 1 hour
- Issue authors: 3
- Pull request authors: 1
- Average comments per issue: 2.33
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jab0707 (4)
- WangMengxiao319 (1)
- ItsAhmadShaikh (1)
- jesperarnwald (1)
- VinyehShaw (1)
Pull Request Authors
- lisapankewitz (1)
- Carola-kit (1)
- axel-loewe (1)
- jab0707 (1)