How omkarpshetty/abdomen-project works
This is a Python tool for coloring abdominal CT DICOM slices with organ-specific legend colors. The primary workflow exports or supplies a DICOM series, loads it as a CT volume and NIfTI file, runs TotalSegmentator, maps and derives organ masks, then renders annotated PNG slices with an optional legend. A batch entry point repeats much of that workflow across patient folders. The README also describes manual tracing for organs without pretrained classes. Relationships are based on the shown entry points, source references, and README; unsampled behavior is not inferred.
Main entry points: main.py Pipeline entry · batch_main.py Batch entry · annotate.py Slice renderer · dicom_io.py DICOM loader
Components 13
DICOM input
- OsiriX storage
- Series exporter
src/osirix_export.py - DICOM loader
src/dicom_io.py
Segmentation pipeline
- Pipeline entry
main.py - Segmentation and masks
src/segment.py - TotalSegmentator
- Organ class mapping
src/label_mapping.py
Annotation output
- Organ color palette
color_map.py - Slice renderer
src/annotate.py - Annotated PNGs
- Manual tracing
Batch processing
- Batch entry
batch_main.py
Other components
- User
Connections 19
- User → Series exporter: selects series
README.md - OsiriX storage → Series exporter: scans files
src/osirix_export.py - Series exporter → DICOM loader: exports DICOM
README.md - User → Pipeline entry: runs pipeline
README.md - Pipeline entry → DICOM loader: loads and converts
main.py - DICOM loader → Pipeline entry: returns volume
main.py - Pipeline entry → Organ class mapping: reads class map
main.py - Pipeline entry → Segmentation and masks: runs and loads masks
main.py - Segmentation and masks → TotalSegmentator: invokes CLI
src/segment.py - Pipeline entry → Segmentation and masks: derives and merges masks
main.py - Pipeline entry → Slice renderer: renders series
main.py - Slice renderer → Organ color palette: uses palette
src/annotate.py - Slice renderer → Annotated PNGs: writes slices
src/annotate.py - User → Batch entry: runs batch
README.md - Batch entry → DICOM loader: loads and converts
batch_main.py - Batch entry → Segmentation and masks: runs and loads masks
batch_main.py - Batch entry → Organ class mapping: reads class map
batch_main.py - Batch entry → Slice renderer: renders series
batch_main.py - User → Manual tracing: traces organs
README.md