fix: image slices are displayed in reverse order, if we switch from common layout to 2D MPR (#5022)
This commit is contained in:
1 parent
8dda7d5f81
commit
6a4ca70836
19 files changed
+202
-102
No files matched your search
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
instanceSortingCriteria: {
|
||||
sortFunctions: {},
|
||||
defaultSortFunctionName: '',
|
||||
},
|
||||
};
|
||||
@@ -22,6 +22,7 @@ import userPreferencesCustomization from './customizations/userPreferencesCustom
|
||||
import reportDialogCustomization from './customizations/reportDialogCustomization';
|
||||
import hotkeyBindingsCustomization from './customizations/hotkeyBindingsCustomization';
|
||||
import onboardingCustomization from './customizations/onboardingCustomization';
|
||||
import instanceSortingCriteriaCustomization from './customizations/instanceSortingCriteriaCustomization';
|
||||
/**
|
||||
*
|
||||
* Note: this is an example of how the customization module can be used
|
||||
@@ -69,6 +70,7 @@ export default function getCustomizationModule({ servicesManager, extensionManag
|
||||
...reportDialogCustomization,
|
||||
...hotkeyBindingsCustomization,
|
||||
...onboardingCustomization,
|
||||
...instanceSortingCriteriaCustomization,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -127,7 +127,10 @@ const makeDisplaySet = instances => {
|
||||
FrameOfReferenceUID: instance.FrameOfReferenceUID,
|
||||
});
|
||||
|
||||
imageSet.sortBy(instancesSortCriteria.default);
|
||||
const { servicesManager } = appContext;
|
||||
const { customizationService } = servicesManager.services;
|
||||
|
||||
imageSet.sort(customizationService);
|
||||
|
||||
// Include the first image instance number (after sorted)
|
||||
/*imageSet.setAttribute(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user