diff --git a/extensions/default/src/utils/validations/areAllImagePositionsEqual.ts b/extensions/default/src/utils/validations/areAllImagePositionsEqual.ts index 708986a087..723aa7877e 100644 --- a/extensions/default/src/utils/validations/areAllImagePositionsEqual.ts +++ b/extensions/default/src/utils/validations/areAllImagePositionsEqual.ts @@ -38,6 +38,9 @@ export default function areAllImagePositionsEqual(instances: Array): boolea return false; } const firstImageOrientationPatient = toNumber(instances[0].ImageOrientationPatient); + if (!firstImageOrientationPatient) { + return false; + } const scanAxisNormal = calculateScanAxisNormal(firstImageOrientationPatient); const firstImagePositionPatient = toNumber(instances[0].ImagePositionPatient); const lastIpp = toNumber(instances[instances.length - 1].ImagePositionPatient); diff --git a/extensions/default/src/utils/validations/areAllImageSpacingEqual.ts b/extensions/default/src/utils/validations/areAllImageSpacingEqual.ts index ae95722c73..49906c3c22 100644 --- a/extensions/default/src/utils/validations/areAllImageSpacingEqual.ts +++ b/extensions/default/src/utils/validations/areAllImageSpacingEqual.ts @@ -20,6 +20,9 @@ export default function areAllImageSpacingEqual( return; } const firstImagePositionPatient = toNumber(instances[0].ImagePositionPatient); + if (!firstImagePositionPatient) { + return; + } const lastIpp = toNumber(instances[instances.length - 1].ImagePositionPatient); const averageSpacingBetweenFrames = diff --git a/platform/app/src/routes/Mode/Mode.tsx b/platform/app/src/routes/Mode/Mode.tsx index b43d68f0fd..1e9019e236 100644 --- a/platform/app/src/routes/Mode/Mode.tsx +++ b/platform/app/src/routes/Mode/Mode.tsx @@ -67,6 +67,13 @@ function defaultRouteInit( }) ); + // log the error if this fails, otherwise it's so difficult to tell what went wrong... + allRetrieves.forEach(retrieve => { + retrieve.catch(error => { + console.error(error); + }); + }); + // The hanging protocol matching service is fairly expensive to run multiple // times, and doesn't allow partial matches to be made (it will simply fail // to display anything if a required match fails), so we wait here until all metadata @@ -436,7 +443,7 @@ export default function ModeRoute({