Ultrahangos képfeldolgozó Python csomag (minimal változat)
Project description
.. ultrasound_processing_package documentation master file, created by sphinx-quickstart on 2025-04-29. You can adapt this file completely to your liking, but it should at least contain the root toctree directive.
Ultrasound Processing Package
Ultrasound processing package is a Python toolbox designed for the purpose of preprocessing and transformation of ultrasound images. It provides three core capabilities: Convert curved ultrasound scans into flat images, Filtering the contour of a selected object by intensity thresholding, Convert back to curved ultrasound scans. The transformations are essential for the thresholding so we can search for peaks using Cartesian coordinates instead of polar coordinates. These modules will be the fundamentals of point cloud generation based on ultrasound images.
.. toctree:: :maxdepth: 1 :caption: Modules
transform mask transform_back
Description
-
Preprocessing and Transforming Images
In this module we are preprocessing the image and we transform it to a “flat” format. We convert the input image to grayscale and detect centimeter calibration marks along both axes. The image is then cleaned by removing irrelevant top and side regions and outlier pixel values. Based on peak detection, the module estimates the geometric parameters of the scan area and transducer settings, such as the offset and scanning depth. Using trigonometric relations, it constructs a polar-to-Cartesian grid. We use bilinear interpolation to project the image onto a uniform Cartesian space.
.. raw:: html
-
Filtering of the Ultrasound Images
In this module, we first generate a binary mask by thresholding the input image: pixels with intensity at or above the specified threshold are set to white (255), and those below are set to black (0). After removing noise components, we scan each column to select the very first pixel whose intensity exceeds the threshold, building an initial contour mask. Next, we apply OpenCV’s functions to thicken that contour for clear visualization. Finally, we apply the dilated contour as a mask to preserve and display the original pixel intensities.
.. raw:: html
-
Backtransformation
In this module we reverse the transformation process, converting polar image data back into Cartesian coordinates. We first initialize key transformation parameters and build a 3D volume grid using spherical coordinates. The grid is filtered to exclude regions outside the region of interest. Using bilinear interpolation, we project back the masked image to the grid. .. raw:: html
.. image:: diagram3.png :width: 767px :height: 440px :align: center :alt: Description for screen readers
.. raw:: html
Usage
Installation
To install:
.. code-block:: bash
pip install ultrasound-processing-package-minimal
Make sure to set the proper paths to the files.
Requirements
- Python 3.7 or higher
- NumPy
- OpenCV
- Matplotlib
- Scikit-image
- Scipy
Example
Hyperlinked notebook: Example notebook https://github.com/Mart-SciecPyt/ScPytone_ultrasound_processing/blob/main/example.ipynb
Github repository link:
https://github.com/Mart-SciecPyt/ultrasound-processing-minimal
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_package_minimal-0.1.3.tar.gz.
File metadata
- Download URL: ultrasound_processing_package_minimal-0.1.3.tar.gz
- Upload date:
- Size: 316.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d19dd42c9b815702cf3bfc421e66e72a314a71c9c527c747651644401816edb4
|
|
| MD5 |
3fff6159b9c64cf42358a7662bc4b60a
|
|
| BLAKE2b-256 |
f3e52090c46401d93ce7dc18fec9e8a7bfc7c108e0990836ee3f2436f40c41e3
|
File details
Details for the file ultrasound_processing_package_minimal-0.1.3-py3-none-any.whl.
File metadata
- Download URL: ultrasound_processing_package_minimal-0.1.3-py3-none-any.whl
- Upload date:
- Size: 314.9 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 |
10f7f0d6bd8a8c38e8a6b1c87b3ce09e82901b7abc83d931cf854c0928b51cee
|
|
| MD5 |
d847c26abd3b6ce19e63a1ac5ad9e2ca
|
|
| BLAKE2b-256 |
76257e52bdfba67aaab8be8891f140757169eac799de362aded2863186d73d6c
|