Skip to main content

EchoViz

Stable PyPI Latest Release Python Version Plotly Version License: GPL v3

PRs Welcome PEP8

Visualization of (3D) echocardiograms in various ways using plotly. This does not include pre-processing of the data from DICOMs to the voxel grid.

Installation

Run $ pip install echoviz-malou. This will automatically install needed dependencies.

Features (= Documentation attempt)

echoviz allows you to view 3D voxel grids in different ways:

  • 2D slice of the grid
    • plot_slice 2D slice of a voxel grid along chosen axis and slice, saved as PNG
    • sliced_sequence 2D slice of several voxel grids along the same chosen axis and slice, saved as GIF
    • sliced_volume 2D slices of one voxel grid along chosen axis for all slices (you can specify a stride), saved as GIF
  • 3D (interactive plot or "static", i.e. screenshot of the interactive view)
    • interactive_3d 3D view of a voxel grid that the user can rotate and zoom in, saved as HTML
    • static_3d Screenshot of above function output
  • 4D for a sequence of voxel grids
    • animated_3d 3D view of several voxel grids that the user can rotate and zoom in, saved as HTML It is possible to add a target and/or a prediction on top of the input plot. In 2D they will be plotted side by side, in 3D they'll be plotted on top of each other.

In 3D it is also possible to plot the Signed Distance Function as a heatmap between the target and the prediction (negative when the prediction is inside the target). "ASD" is also available, it's the absolute value of the SDF.

  • sdf_[interactive|static|animated]_3d
  • asd_[interactive|static|animated]_3d

All functions expect to receive inputs as VoxelGrid or a list of VoxelGrid. Annotations/labels and predictions are dictionaries containing a VoxelGrid or list of VoxelGrid per key (keys are used to get the plot colour, chose between "all", "anterior" or "posterior".

Examples

See tests/test.py and tests/test.ipynb.

NB: Some additional packages are needed to run the test scripts,

  • For tests/test.py, run $ pip install h5py click
  • For tests/test.ipynb run $ pip install jupyterlab ipywidgets jupyter-dash

Troubleshooting

Kaleido permission denied

You may need to make Kaleido executable files as executable manually: chmod +x ~/<venv_name>/lib/python3.9/site-packages/kaleido-<version_number>.egg/kaleido/executable/kaleido ~/<venv_name>/lib/python3.9/site-packages/kaleido-<version_number>.egg/kaleido/executable/bin/kaleido For more detail see here

Other

Please report any issues via the GitHub issues tracker.


This package was built to plot TEE images and has not been tested on anything else, if you want to participate, you are more than welcome!

Metadata

Release files for echoviz-MALOU 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for echoviz-MALOU 0.2.3
File Size Uploaded
echoviz-MALOU-0.2.3.tar.gz 25.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for echoviz-MALOU 0.2.3
File Interpreter ABI Platform
echoviz_MALOU-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 50.8 kB

Release files / echoviz-MALOU-0.2.3.tar.gz

Download URL echoviz-MALOU-0.2.3.tar.gz
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6947531106f75e5612d16df1976d33d1b638b963e7c7877788ded31aa851852f
BLAKE2b-256 checksum
How to use checksums
8b5d99903c6438dad09e788571021a99cae20e0037bd8b85262e28924629bb02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / echoviz_MALOU-0.2.3-py3-none-any.whl

Download URL echoviz_MALOU-0.2.3-py3-none-any.whl
Size 25.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a52b1290ae718dd65a0e1061acfdc455341ee228887a7bd3c5fadb4067c5198
BLAKE2b-256 checksum
How to use checksums
c3df4114b31bd0d52255ce841fde7c996c24bc8d17a26a542d024e638fcf0279
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

1 release file

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page