Skip to content

Commit

Permalink
[OHIF#2026 Save calibration value from ohif to claude
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaut-etienne-deemea committed Dec 2, 2024
1 parent f300c92 commit bf9733b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions extensions/cornerstone/src/tools/CalibrationLineTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ export function onCompletedCalibrationLine(
const adjustCalibration = newLength => {
const spacingScale = newLength / length;

window.parent.postMessage(
{
type: 'update_calibration',
message: {
calibration: spacingScale,
},
},
'*'
);

// trigger resize of the viewport to adjust the world/pixel mapping
calibrateImageSpacing(imageId, viewport.getRenderingEngine(), {
type: 'User',
Expand Down

0 comments on commit bf9733b

Please sign in to comment.