Advanced ultrasound image processing tools for medical and scientific use
Project description
ultrasound-processing
ultrasound-processing is a Python package designed for processing, transforming, and analyzing ultrasound image data. It includes utilities for masking, interpolation, volumetric transformations, and geometric corrections to convert polar or curvilinear images to flat formats.
Installation
Install the package directly from PyPI:
pip install ultrasound-processing
Or install the latest development version from GitHub:
pip install git+https://github.com/Mart-SciecPyt/ScPytone_ultrasound_processing.git
What does it do?
This library includes the following core functionalities:
Noise masking of ultrasound image data (2D slices and volumes)
Interpolation of irregular image data onto uniform grids
Geometric transformations from curved (polar) formats to flat images
Volumetric stacking and reshaping of slice data
Modules Overview
mask.py
Provides noise filtering and artifact masking.
from ultrasound_processing.mask import mask_volume
masked = mask_volume(volume, threshold=0.1)
interp.py
Performs interpolation on 2D and 3D ultrasound data.
from ultrasound_processing.interp import interpolate_2d
grid_data = interpolate_2d(raw_image, method="linear")
transform.py
Converts curvilinear ultrasound images into flat geometry.
from ultrasound_processing.transform import polar_to_cartesian
flat_image = polar_to_cartesian(polar_image, angle_array, radius_array)
VolumeTransformer
Class-based utility for advanced 3D ultrasound volume processing.
from ultrasound_processing.interp_img import VolumeTransformer
vt = VolumeTransformer(volume) flattened_volume = vt.to_flat()
Use in Google Colab
You can try out the package in this interactive Google Colab notebook, which demonstrates:
Loading and visualizing ultrasound data
Applying masking and noise filtering
Performing geometric flattening
Exporting final processed volumes
Example Use Case
import numpy as np from ultrasound_processing.mask import mask_volume from ultrasound_processing.transform import polar_to_cartesian
Simulate raw polar data
raw = np.random.rand(256, 256) angles = np.linspace(0, np.pi, 256) radii = np.linspace(0, 100, 256)
Apply transformation
cartesian = polar_to_cartesian(raw, angles, radii)
Apply masking
cleaned = mask_volume(cartesian, threshold=0.2)
Documentation
Full documentation is available at:https://scpytone-ultrasound-processing.readthedocs.io
Contributing
Contributions are welcome! Please fork the GitHub repository and submit a pull request: https://github.com/Mart-SciecPyt/ScPytone_ultrasound_processing
For feature requests or bugs, open an issue on GitHub.
Uploading to PyPI
Ensure build and twine are installed:
pip install build twine
Build the package:
python -m build
Upload to PyPI:
twine upload dist/*
Log in using your PyPI credentials when prompted.
Author
Developed by: Trancsik MartinProject: ScPytone Ultrasound Processing Suite
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 ultrasound_processing-0.1.1.tar.gz.
File metadata
- Download URL: ultrasound_processing-0.1.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fea0c0d400e6c40badffa401d3da0f7f1cc502f878668b03a488a2d67762cdb0
|
|
| MD5 |
f02df7819494deca277ef2efa62b1756
|
|
| BLAKE2b-256 |
e0a3dc3046909a75b23994b850e6fe5d8a3caab257cc1c0ff118cb59fc592a91
|
File details
Details for the file ultrasound_processing-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ultrasound_processing-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
082f667102b1f4d81abe3db27849823a2697f497e5391eaef2c83352d9b00491
|
|
| MD5 |
bb66c187a416d0b3664cde0a98aab4c6
|
|
| BLAKE2b-256 |
bce9566826ce16f554fa8c6139177b74a349eb43c140b604ddff58a3b3a97c39
|