Skip to content

Commit 0f2d421

Browse files
Merge pull request #28 from ChristianHinge/fix-pet-liver-superior-slice
Fix superior liver slice detection in PET SUV MAE metric
2 parents b5c9793 + b24e10a commit 0f2d421

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
---
1010
## Updates
11+
- **July 16, 2026: [BUG FIX]**: The Whole-body SUV MAE metric excluded the wrong end of the liver: PET's z-axis runs in the opposite direction from CT's, so the superior-most liver slice was located incorrectly, shifting the ±4 cm exclusion band off the top of the liver. Please `git pull` for the corrected evaluation logic. Please see [PR #28](https://github.com/bic-mac-challenge/challenge-codebase/pull/28) for details.
1112
- **July 8, 2026: [CHANGE]**: The fifth metric, TAC-Bias, has been removed from the final evaluation. Final submissions are scored on the four metrics defined in [Evaluation](#evaluation-srcevaluation). Please see [PR #23](https://github.com/bic-mac-challenge/challenge-codebase/pull/23) for details.
1213
- **July 6, 2026: [BUG FIX]**: DRY-RUN and FINAL submission instructions listed a wrong email. All DRY-RUN and FINAL submissions should be sent to bic-mac-challenge@outlook.com.
1314
- **May 15, 2026: [ANNOUNCEMENT]**: NIfTI validation and leaderboards now live - see submission instructions at [https://www.codabench.org/competitions/12555](https://www.codabench.org/competitions/12555)

src/evaluation/metrics/pet_whole_body_mae.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ def compute_whole_body_suv_mae(
4848
slice_thickness_mm = nib.load(pred_pet_path).header.get_zooms()[2]
4949
exclusion_slices = int(round((exclusion_cm * 10.0) / slice_thickness_mm))
5050

51-
superior_slice = np.max(np.where(liver_mask)[2])
51+
# PET's z-axis (STIR-resampled, ring spacing 3.29114 mm) is stored in the
52+
# opposite direction from the CT grid: index increases toward inferior,
53+
# so the superior-most liver voxel is the *smallest* index here.
54+
superior_slice = np.min(np.where(liver_mask)[2])
5255

5356
z_min = max(0, superior_slice - exclusion_slices)
5457
z_max = min(pred.shape[2], superior_slice + exclusion_slices)

0 commit comments

Comments
 (0)