.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples\preprocessor\download-case_pr.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_preprocessor_download-case_pr.py: Download a PyAnsys Heart-compatible case from Zenodo ---------------------------------------------------- This example shows how to download a Strocchi 2020 or Rodero 2021 case from the Zenodo database. .. GENERATED FROM PYTHON SOURCE LINES 32-42 .. note:: You can also manually download the CASE or VTK files from the Strocchi 2020 and Rodero 2021 databases. For more information, see: - `A Publicly Available Virtual Cohort of Four-chamber Heart Meshes for Cardiac Electro-mechanics Simulations `_ - `Virtual cohort of adult healthy four-chamber heart meshes from CT images `_ Alternatively you can make use of the download module instead. See the example below. .. GENERATED FROM PYTHON SOURCE LINES 42-61 .. code-block:: Python # Perform the required imports # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Import the required modules and set relevant paths, including that of the working # directory and generated model. from pathlib import Path from ansys.health.heart.utils.download import download_case_from_zenodo, unpack_case # Download the tar file of Rodero2021 from the Zenodo database. download_dir = Path.home() / "pyansys-heart" / "downloads" tar_file = download_case_from_zenodo("Rodero2021", 1, download_dir, overwrite=True) # Unpack the tar file and get the path to the input .vtk/.case file. path = unpack_case(tar_file) print(path) .. rst-class:: sphx-glr-script-out .. code-block:: none 100% ---------------------------------------------------- 91.1/91.1 MB 6.5 MB/s C:\Users\ansys\pyansys-heart\downloads\Rodero2021\01\01.vtk .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 21.495 seconds) .. _sphx_glr_download_examples_preprocessor_download-case_pr.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: download-case_pr.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: download-case_pr.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: download-case_pr.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_