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]
- 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.
|
|
|
|
|
|
pip install -r requirements.txtpython main.py- Select CT File: Load a NIfTI format CT file.
- Select Output Folder: Choose where segmentations will be saved.
- Choose Organ: Pick an organ group to segment.
- Run Organ Segmentation: Starts segmentation and loads results.
- View: Explore overlays and interact with 3D renderings.
- Customize Colors (2D only): Change overlay colors for clarity.
- Adjust 3D Opacity: Use the slider to make 3D models transparent or opaque.
- 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
- 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.
Thanks goes to these people (⭐):
youssef hisham 💻 |
YoussefELRoby0 💻 |
habibaabdelmeneem01-byte 🔣 |
Yassen12345678 🔣 |
This project is for educational and demonstration purposes.





