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:
parent
3cfddc1f64
commit
afe184ec78
@ -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);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user