Tools to segment doppler ultrasound signals from scan images.
Project description
Doppler Segmetnations
These codes make up the framework for segmenting the doppler ultrasound scans.
Table of Contents
Installation
- To install as a dependency for your project:
pip install usseg
or
poetry add usseg
Development Environment
To install the development environment follow the following steps.
- Clone this repository and change into the directory.
- Install poetry as per the installation instructions.
- Install tesseract as per the intallation instructions.
- Note that the project has only been tested with tesseract version 5.
- Install the package dependencies with:
poetry install
- Enter into the development shell with:
poetry shell
- You are now in the development environment!
- Copy
config_example.toml
toconfig.toml
and change the variables for your local set up (e.g. path to your data etc.). - The main script can now be run in one complete run with
python usseg/main.py
. - If debugging in vscode, ensure the python interpreter is set to the virtual environment created poetry. This path can be found using
poetry env info --path
Functions
Provide instructions on how to use your project.
Initial_segmentation
Preform an initial corse segmentation of the waveform.
Define_end_ROIs
Function to define regions adjacent to the corse waveform.
Segment_refinement
Function to refine the waveform segmentation within the bounds of the corse waveform ROI.
Search_for_ticks
Function to search for any potential ticks in either of the axes ROIs, also crops the ROI for each axes to avoid the ticks, which can interfere with tesseract text detection in the next function.
Search_for_labels
Function that searches for labels withing the axes ROI.
Plot_Digitized_data
A function for digitizing the extracted ticks and labels data to plot a waveform, using the output from segment refinement. This requries the
Plot_correction
If avaliable, corrects the x-axis from arbitrary time units to seconds based on extracted heart rate.
Annotate
Function for visualising the segmentation steps by annotating the original image with the segmenented wavefore, ticks and labels identified from the previous functions.
Contributing
Explain how others can contribute to your project.
License
Add information about the license for your project, and any relevant copyright information.
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.