No project description provided
Project description
implay: Interactive 3D NumPy Volume Player for Jupyter Notebooks
This project provides a Python function, implay, designed to offer an interactive viewer for 3D NumPy arrays directly within Jupyter Notebook environments. It mimics the functionality of MATLAB's implay by allowing you to "play" through the slices of a 3D volume, providing controls for playback, scrubbing, and optional resizing. Features
- Interactive Playback: Play, pause, and control the speed of the animation through the third dimension (slices) of your NumPy volume.
- Slice Scrubbing: A slider allows you to manually navigate through individual slices.
- Axis Selection: Choose which axis (dimension) of your 3D array to play as the sequence of slices (axial, coronal, or sagittal views for medical images).
- Dynamic Resizing: Optionally resize the displayed slices to a custom height and width.
- Data Normalization: Built-in option to normalize your image data to an 8-bit range for optimal display.
- Jupyter Integration: Designed to work seamlessly within Jupyter Notebook and JupyterLab.
Installation
pip install implay
This project relies on numpy, opencv-python, and ipywidgets.
Example Usage
Run the following code in a Jupyter cell to see the implay function in action.
- Create a dummy 3D NumPy volume: (depth, height, width)
import numpy as np
from implay import implay
num_d, num_h, num_w = 60, 100, 120
test_volume = np.zeros((num_d, num_h, num_w), dtype=np.float32)
implay(test_volume,axis_to_play=0)
Building this version from start
Compiling the code for changes
python .\setup.py sdist bdist_wheeltwine check dist/*
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file implay-0.11.tar.gz.
File metadata
- Download URL: implay-0.11.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5e129a9226b4cb8d05b9595df4992a2a94413f0ddd6d3ffd44bc19210264791
|
|
| MD5 |
fd7840fe9e6834336c5da2e5a44a55ef
|
|
| BLAKE2b-256 |
a900b21e2f7696ede1ec87ea3443b3ea0a384e7601885d249f1d9ada14f7af68
|
File details
Details for the file implay-0.11-py3-none-any.whl.
File metadata
- Download URL: implay-0.11-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b49f46dea7a1cbeadf59cee55a432a8f313c5e6c0fb34e3eb8f4beede7cc6286
|
|
| MD5 |
a7a258533352663ba8e8ed06b7e5d61b
|
|
| BLAKE2b-256 |
de2da6727c54af057e8482a544c5b5e811aa2aa9fea76335b3a8c3969cf10fd8
|