fix: the null value check issue in image spacing calculation (#5726)

Co-authored-by: 顾争 <zheng.gu-rd@djhealthunion.com.cn>
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
This commit is contained in:
authored and GitHub committed 2026-01-21 21:59:20 -05:00
1 parent 3cfddc1f64
commit afe184ec78
1 file changed
+3 -1
@@ -24,7 +24,9 @@ export default function areAllImageSpacingEqual(
return;
}
const lastIpp = toNumber(instances[instances.length - 1].ImagePositionPatient);
if (!lastIpp) {
return;
}
const averageSpacingBetweenFrames =
_getPerpendicularDistance(firstImagePositionPatient, lastIpp) / (instances.length - 1);