Skip to content

youssefh4/Scan-Medical-organ-segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scan Medical organ segmentation

A Python desktop application for visualizing and segmenting organs in CT scans with advanced 3D opacity control. Load a NIfTI CT file, segment organs using [TotalSegmentator]


Features

  • Easy-to-use GUI built with Tkinter
  • Load CT scans (.nii, .nii.gz)
  • Segment organs: lungs & airway, spinal cord (vertebrae), rib cage
  • 2D Viewer: CT slice and segmentation overlay (side-by-side)
  • Custom overlay colors for each organ (2D)
  • 3D Model Viewer: Interactive 3D visualization with PyVista
  • Adjustable 3D model opacity with a slider for better visualization
  • Documentation : For detailed usage and features, see the Full Documentation.

Visual Overview

---

Quickstart

1. Install requirements

pip install -r requirements.txt

2. Run the app

python main.py

3. Workflow

  1. Select CT File: Load a NIfTI format CT file.
  2. Select Output Folder: Choose where segmentations will be saved.
  3. Choose Organ: Pick an organ group to segment.
  4. Run Organ Segmentation: Starts segmentation and loads results.
  5. View: Explore overlays and interact with 3D renderings.
  6. Customize Colors (2D only): Change overlay colors for clarity.
  7. Adjust 3D Opacity: Use the slider to make 3D models transparent or opaque.

Requirements

  • Python 3.8+( python 3.10 preferably )
  • Windows or Linux (PyVistaQt may not work on Mac)
  • GPU recommended for faster segmentation

Python packages:

  • totalsegmentator
  • nibabel
  • numpy
  • matplotlib
  • scikit-image
  • pyvista
  • pyvistaqt

Notes

  • Only lungs/airway, spinal cord/vertebrae, and rib cage are supported in this version.
  • Segmented masks are saved as NIfTI files in the output directory.
  • 3D models are visualized in-app; STL export is not included by default.
  • Overlay color changes only affect the 2D viewer.
  • 3D opacity slider updates the transparency of all rendered meshes in real time.

Credits


Contributors ✨

Thanks goes to these people ():

youssef hisham
youssef hisham

💻
YoussefELRoby0
YoussefELRoby0

💻
habibaabdelmeneem01-byte
habibaabdelmeneem01-byte

🔣
Yassen12345678
Yassen12345678

🔣

License

This project is for educational and demonstration purposes.

About

tasks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages