Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

L3 Body Composition Analyzer

Semi-automated L3-level body composition analysis toolkit for 3D Slicer

Segment skeletal muscle, subcutaneous adipose tissue (SAT), and visceral adipose tissue (VAT) from a single axial CT slice at the L3 vertebra level. Generates an Excel report with area measurements, HU statistics, Skeletal Muscle Index (SMI), sarcopenia assessment, and VAT/SAT ratio.

Author

Berkay Yılmaz Istanbul University-Cerrahpaşa, Department of Radiology PGY-3 Radiology Resident

Requirements

  • 3D Slicer 5.x
  • Python libraries: numpy, scipy, scikit-image (bundled with Slicer), openpyxl (auto-installed)

Workflow

Step 1 — Muscle Selection (kod1_kas_secimi.txt)

Thresholds the active axial slice at -29 to 150 HU and creates a Muscle segment. Organs (liver, kidneys, bowel) will also be selected — this is expected.

Step 2 — Manual Correction (in Slicer GUI)

Select the Muscle segment in Segment Editor:

  • Erase organs (bowel, liver, kidneys)
  • Paint/Draw to fill gaps between muscle groups so the abdominal wall forms a continuous boundary

Step 3 — SAT/VAT Segmentation (kod2_sat_vat.txt)

Uses the convex hull of your corrected muscle mask to define the abdominal cavity. Fat pixels (-190 to -30 HU) outside the cavity = SAT, inside = VAT.

Step 4 — Muscle Post-Processing (kod3_kas_postprocessing.txt)

Re-applies HU threshold (-29 to 150) within the manually expanded muscle mask to retain only true muscle pixels.

Step 5 — Report (step4_report.py)

Generates a formatted Excel (.xlsx) report with:

Metric Description
Area (cm²) Per compartment (Muscle, SAT, VAT)
Mean / Std / Min / Max HU Per compartment
Total Fat (cm²) SAT + VAT
VAT/SAT Ratio Visceral-to-subcutaneous fat ratio
Muscle Mean HU Muscle attenuation

SMI and sarcopenia assessment can be derived from these metrics using patient height and sex.

HU Thresholds

Tissue HU Range
Skeletal Muscle -29 to 150
Adipose Tissue -190 to -30

Sarcopenia Cutoffs (Prado et al.)

Sex SMI Threshold
Male < 52.4 cm²/m²
Female < 38.5 cm²/m²

How to Use

  1. Open abdominal CT in 3D Slicer
  2. Navigate to L3 vertebra level in axial (Red) slice
  3. Open Python Console: View > Python Console or Ctrl+3
  4. Copy-paste each script in order

License

Copyright © 2026 Berkay Yılmaz. All rights reserved. See LICENSE for details.

Citation

If you use this tool in academic work, please cite:

Yılmaz B. L3 Body Composition Analyzer for 3D Slicer. 2026.
Istanbul University-Cerrahpaşa, Department of Radiology.
GitHub: https://github.com/berkayyilmaz/L3-BodyComp

About

Semi-automated L3-level body composition analysis toolkit for 3D Slicer

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages