Visualisation of 3D mitral valve
Project description
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 PNGsliced_sequence
2D slice of several voxel grids along the same chosen axis and slice, saved as GIFsliced_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 HTMLstatic_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
Built Distribution
File details
Details for the file echoviz-MALOU-0.2.0.tar.gz
.
File metadata
- Download URL: echoviz-MALOU-0.2.0.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ddab7f6578617b7e68e5c7eef13a2c8401ec4db6207206a2f9f16a4bfb4b9c7 |
|
MD5 | fe37d7a2e20a730e2cdd5c13bc5f1d29 |
|
BLAKE2b-256 | 8d8e1c91d1c9053456e959c5cc7fbf4f04edd1954014ada08e2b5722eb305e1c |
File details
Details for the file echoviz_MALOU-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: echoviz_MALOU-0.2.0-py3-none-any.whl
- Upload date:
- Size: 25.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0aab9042106ba374fd66f97be0649df5a7f9c90b4f56e739fd8f9b9a2d38e927 |
|
MD5 | 6a60e6958014c3a84acb1e4b38cc6018 |
|
BLAKE2b-256 | de76d5994937d9fd4d7566cb14def969b6e5851772d47f69930bef8b31fb0a92 |