Please note that shortCardiac is not a medical product and should not be used as a substitute for professional medical advice or diagnosis. --
III. Step-by-Step Usage
IV. Contributing
V. License
shortCardiac is an open-source framework implemented in Python that standardizes, simplifies, and accelerates the
analysis of short-axis view cardiac magnetic resonance images (MRI). The framework is provided as Python source code,
JupyterNotebook, and user-friendly Graphical User Interface (GUI). Based on the segmentation of the heart,
length, area, and centroid measurements are performed. In addition, pyradiomics
is implemented to allow the extraction of additional image features based on DICOM gray values.
Calculations have been validated by manual reference measurements and all mathematical measurements as well as transformations to
SI units were checked by Unittests.
Hint: shortCardiac allows the import of Circle Cvi42 coordinates / segmentations, which enables an easy implementation in current research projects.
For queries and suggestions: E-Mail; Linkedin; ResearchGate
Coming soon (hopefully)
Please note that shortCardiac Source Code requires Python 3.7.
git clone https://github.com/MPR-UKD/shortCardiaccd shortCardiacpip install -r requirements.txtonedir - one-folder bundle containing an executable
onefile - a bundled executable file (note: starting the exe file takes time, because the file has to be unpacked first)
python GUIshortCardiac.pyor
GUIshortCardiac.exeAlternatively: The framework can also be started via a separate main script or as JupyterNotebook. In demo.py, you will find a template how such a script should look and the Jupyternotebook is located in shortCardiac.ipynb.
- In the top left corner, you can select the format of coordinates.
- currently implemented: CVI42, ITKSnap and all other frameworks which safe segmentation as nii.gz.
- With the bottom "Load coordinates" a file dialog started. Now you can select the coordinate file.
- Analog to Point 3, with the bottom "Load DICOM Folder" a dialog will open. Please select the directory where the DICOM files are stored.
- Hint: DICOM files could be saved in subfolders. Short cardiacStarted in root search all DICOM files in the directory and all subdirectories.
- push the "Run" bottom to start the calculation
- Now, shortCardiac search all DICOM images, merge DICOM images and segmentation, start the calculation of Parameters and save overlayed Images with Parameters (if selected) and write all calculations in a CSV-File for further evaluations
Notes: Python version 3.7 is required to use the Jupyternotebook (specifically the pyradiomics package). The easiest way is to use a virtual interpreter. Here is described how to set one up: venv-in-JupyterLab
Pull requests, requests to implement more calculations, and to integrate other segmentation frameworks are welcome. Please open an issue to discuss what you want to change for significant changes.
To include more Radiomics features in the 'calc_radiomics' function, you can follow these steps:
- Update the
cfdictionary: Add new keys for additional features you want to include, setting their values to True. For example:
cf = {
...
"new_feature": True,
}- Implement the extraction for the new feature: Create an instance of the corresponding extractor class from the PyRadiomics library and execute it. For example:
if cf["new_feature"]:
new_feature_extractor = new_feature_module.RadiomicsNewFeature(dcm_sitk, mask_sitk)
new_feature_results = new_feature_extractor.execute()
feature, feature_names = extract_results(new_feature_results, "new_feature")
feature_list.append(feature)
feature_names_list.append(feature_names)- Update the return statement: The function will automatically return the updated feature and feature names lists after adding the new feature extraction code.
With these modifications, you can customize the calc_radiomics function to include any Radiomics features supported by the PyRadiomics library. Make sure to consult the library's documentation for a comprehensive list of available features and their respective modules.
The GNU General Public License is a free, copyleft license for software and other kinds of works.
Install "pre-commit"
pip install pre-committhen run:
pre-commit install


