Cardiac atlases#
cardiac-geometries
also have support for downloading and converting geometries coming from atlases. Currently we only support data coming from the Bai et. al atlas which is found at https://zenodo.org/records/4506463
You can use the command
!cardiac-geometries atlas-bai --help
Usage: cardiac-geometries atlas-bai [OPTIONS] N
Create meshes from instances of https://zenodo.org/records/4506463
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --outdir -o DIRECTORY Output directory, default is 'bai-atlas' │
│ --force -f Force regeneration of files │
│ --verbose -v Print more information │
│ --copy-original Copy original files into output directory │
│ --create-fibers Create fibers with LDRB algorithm │
│ --coarsening -c Coarsen the mesh │
│ --ffun Create facet function │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
to work with the atlas data. For example say you want to download data for instance number 4, then you can do
!cardiac-geometries atlas-bai 4 -o atlas-data
Downloading https://zenodo.org/records/4506463/files/instances_001_to_010.tar.gz?download=1 to /__w/cardiac-geometries/cardiac-geometries/docs/atlas-data/instances_001_to_010.tar.gz. This may take a while.
Done downloading.
Extracting...
INFO:cardiac_geometries.bai_atlas:Creating output directory: /__w/cardiac-geometries/cardiac-geometries/docs/atlas-data/instance_004
INFO:cardiac_geometries.bai_atlas:Converting /__w/cardiac-geometries/cardiac-geometries/docs/atlas-data/instances_001_to_010/instance_004.vtp to dolfin xdmf
Warning: Meshio cannot handle (type Strips) but we explicitly convert them to
triangles here.
INFO:cardiac_geometries.bai_atlas:Converting /__w/cardiac-geometries/cardiac-geometries/docs/atlas-data/instances_001_to_010/instance_004.vtu to dolfin xdmf
which will output the data in the folder atlas-data
!ls -R atlas-data
atlas-data:
instance_004 instances_001_to_010 instances_001_to_010.tar.gz
atlas-data/instance_004:
original
atlas-data/instance_004/original:
mesh.h5 surface_data.h5 surface_mesh.h5 volume_data.h5
mesh.xdmf surface_data.xdmf surface_mesh.xdmf volume_data.xdmf
atlas-data/instances_001_to_010:
instance_001.vtp instance_003.vtu instance_006.vtp instance_008.vtu
instance_001.vtu instance_004.vtp instance_006.vtu instance_009.vtp
instance_002.vtp instance_004.vtu instance_007.vtp instance_009.vtu
instance_002.vtu instance_005.vtp instance_007.vtu instance_010.vtp
instance_003.vtp instance_005.vtu instance_008.vtp instance_010.vtu
Now the data inside atlas-data/instance_004/original
can be read by dolfin
.