Skip to content

Commit 3a6ecbd

Browse files
fedorovclaude
andcommitted
ENH: align relative slice tolerance to 1% matching highdicom
Tighten relativeSliceTolerance from 2% to 1% to match the default _DEFAULT_SPACING_RELATIVE_TOLERANCE in highdicom's get_volume_positions. Empirical analysis shows only 131 additional series (out of 296k) fail at 1% vs 2% — the distribution is bimodal with no meaningful population in between. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e02743b commit 3a6ecbd

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

scripts/sql/volume_geometry_index.sql

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,13 @@
7373
# `bigquery-public-data.idc_current.dicom_all` with e.g. `bigquery-public-data.idc_v18.dicom_all`
7474

7575
# Configurable parameters
76-
DECLARE relativeSliceTolerance FLOAT64 DEFAULT 0.02; # max allowed variation in slice spacing as a fraction
77-
# of expected spacing (2%); relative tolerance scales
78-
# correctly for both human imaging (~1-5mm spacing)
79-
# and preclinical/small-animal imaging (~0.1mm spacing)
76+
DECLARE relativeSliceTolerance FLOAT64 DEFAULT 0.01; # max allowed variation in slice spacing as a fraction
77+
# of expected spacing (1%); matches the default
78+
# _DEFAULT_SPACING_RELATIVE_TOLERANCE in highdicom
79+
# (https://github.com/ImagingDataCommons/highdicom/blob/9750a6f9/src/highdicom/spatial.py#L19);
80+
# relative tolerance scales correctly for both human
81+
# imaging (~1-5mm spacing) and preclinical/small-animal
82+
# imaging (~0.1mm spacing)
8083
DECLARE inPlaneTolerance FLOAT64 DEFAULT 0.1; # max in-plane position jitter (mm)
8184
DECLARE orientationTolerance FLOAT64 DEFAULT 0.01; # cross-product magnitude deviation from 1.0
8285

0 commit comments

Comments
 (0)