fix: image slices are displayed in reverse order, if we switch from common layout to 2D MPR (#5022)

This commit is contained in:
arul-trenser authored and GitHub committed 2025-07-17 08:11:26 -04:00
1 parent 8dda7d5f81
commit 6a4ca70836
19 files changed
+202 -102

No files matched your search

@@ -1,20 +0,0 @@
import { vec3 } from 'gl-matrix';
/**
* Calculates the scanAxisNormal based on a image orientation vector extract from a frame
* @param {*} imageOrientation
* @returns
*/
export default function calculateScanAxisNormal(imageOrientation) {
const rowCosineVec = vec3.fromValues(
imageOrientation[0],
imageOrientation[1],
imageOrientation[2]
);
const colCosineVec = vec3.fromValues(
imageOrientation[3],
imageOrientation[4],
imageOrientation[5]
);
return vec3.cross(vec3.create(), rowCosineVec, colCosineVec);
}
@@ -1,7 +1,9 @@
import { vec3 } from 'gl-matrix';
import toNumber from '@ohif/core/src/utils/toNumber';
import { _getPerpendicularDistance } from '@ohif/core/src/utils/isDisplaySetReconstructable';
import calculateScanAxisNormal from '../calculateScanAxisNormal';
import { utils } from '@ohif/core';
const { calculateScanAxisNormal } = utils;
/**
* Checks if there is a position shift between consecutive frames