Skip to main content

Visualisation of 3D mitral valve

Project description

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

echoviz-MALOU-0.2.3.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

echoviz_MALOU-0.2.3-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file echoviz-MALOU-0.2.3.tar.gz.

File metadata

  • Download URL: echoviz-MALOU-0.2.3.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for echoviz-MALOU-0.2.3.tar.gz
Algorithm Hash digest
SHA256 6947531106f75e5612d16df1976d33d1b638b963e7c7877788ded31aa851852f
MD5 4d4b8bab2338ac31e8c5150a6c478f94
BLAKE2b-256 8b5d99903c6438dad09e788571021a99cae20e0037bd8b85262e28924629bb02

See more details on using hashes here.

File details

Details for the file echoviz_MALOU-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for echoviz_MALOU-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3a52b1290ae718dd65a0e1061acfdc455341ee228887a7bd3c5fadb4067c5198
MD5 4e3feff8ea70a6d937f43fb9abc94e71
BLAKE2b-256 c3df4114b31bd0d52255ce841fde7c996c24bc8d17a26a542d024e638fcf0279

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page