fix(measurements): Update the calibration tool to match changes in CS3D (#3505)

This change makes the OHIF side consistent with the CS3D user calibration settings, and will correctly display px and rounding values consistent with the CS3D display.
This commit is contained in:
Bill Wallace authored and GitHub committed 2023-09-15 10:50:23 -04:00
1 parent bd7f9592ea
commit 38af3112ec
8 files changed
+177 -90

No files matched your search

@@ -76,11 +76,12 @@ export function onCompletedCalibrationLine(servicesManager, csToolsEvent) {
const adjustCalibration = newLength => {
const spacingScale = newLength / length;
const rowSpacing = spacingScale * currentRowPixelSpacing;
const colSpacing = spacingScale * currentColumnPixelSpacing;
// trigger resize of the viewport to adjust the world/pixel mapping
calibrateImageSpacing(imageId, viewport.getRenderingEngine(), rowSpacing, colSpacing);
calibrateImageSpacing(imageId, viewport.getRenderingEngine(), {
type: 'User',
scale: 1 / spacingScale,
});
};
return new Promise((resolve, reject) => {