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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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