This repository contains a Python 3.8 implementation of an airways segmentation algorithm for CT thorax images. The algorithm utilizes the Fast Marching method, guided by two velocity maps: one based on image gradient and the other on vesselness filtering. This combination enhances the accuracy and reliability of airway segmentation, making it suitable for medical imaging and research purposes. Features:
- Segments airways from thoracic CT scans.
- Uses Fast Marching algorithm for region growing.
- Two velocity maps (gradient-based and vesselness) to guide segmentation.
- Written in Python 3.10 for easy integration and flexibility.
Feel free to contribute or use this algorithm for research and development. Algorithm works best for low-dose CT.
This project uses the CTools library as a git submodule. When cloning, use:
git clone --recurse-submodules https://github.com/ZAEDPolSl/BRONCO.gitOr if you've already cloned the repository:
git submodule update --init --recursiveuv is a fast Python package manager. Install it first, then:
uv syncThis will automatically install all dependencies including the CTools submodule.
pip install -r requirements.txtThe lungmask package is there for the lungs segmentation task, please refer to the
original github repository for citation.
With uv:
uv run python examples/01_segmentation.pyWith pip (in activated virtual environment):
python examples/01_segmentation.pyExample usage can be found in examples/whole_pipeline.py, note that depending on your IDE configuration supplied
in the example path strings may not be correct, adjust for personal usage.
