Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(calibration): No calibration popup caused by perhaps an unused code optimization for production builds #3736

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions extensions/cornerstone/src/tools/CalibrationLineTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ export function onCompletedCalibrationLine(servicesManager, csToolsEvent) {
calculateLength3(annotationData.handles.points[0], annotationData.handles.points[1]) * 100
) / 100;

// calculate the currently applied pixel spacing on the viewport
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code was unused and throwing an exception for production builds.

const calibratedPixelSpacing = metaData.get('calibratedPixelSpacing', imageId);
const imagePlaneModule = metaData.get('imagePlaneModule', imageId);
const currentRowPixelSpacing =
calibratedPixelSpacing?.[0] || imagePlaneModule?.rowPixelSpacing || 1;
const currentColumnPixelSpacing =
calibratedPixelSpacing?.[1] || imagePlaneModule?.columnPixelSpacing || 1;

const adjustCalibration = newLength => {
const spacingScale = newLength / length;

Expand Down