fix(measurement and microscopy): various small fixes for measurement and microscopy side panel (#3696)

This commit is contained in:
Joe Boccanfuso authored and GitHub committed 2023-10-04 14:11:09 -04:00
1 parent 646bef1d93
commit c1d5ee7e3f
20 files changed
+77 -84

No files matched your search

@@ -3,6 +3,7 @@ import { annotation } from '@cornerstonejs/tools';
import SUPPORTED_TOOLS from './constants/supportedTools';
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
import { utils } from '@ohif/core';
import { getDisplayUnit } from './utils';
const Bidirectional = {
toAnnotation: measurement => {},
@@ -161,14 +162,7 @@ function getDisplayText(mappedAnnotations, displaySet) {
const displayText = [];
// Area is the same for all series
const {
length,
width,
unit,
SeriesNumber,
SOPInstanceUID,
frameNumber,
} = mappedAnnotations[0];
const { length, width, unit, SeriesNumber, SOPInstanceUID, frameNumber } = mappedAnnotations[0];
const roundedLength = utils.roundNumber(length, 2);
const roundedWidth = utils.roundNumber(width, 2);
@@ -183,9 +177,9 @@ function getDisplayText(mappedAnnotations, displaySet) {
const frameText = displaySet.isMultiFrame ? ` F: ${frameNumber}` : '';
displayText.push(
`L: ${roundedLength} ${unit} (S: ${SeriesNumber}${instanceText}${frameText})`
`L: ${roundedLength} ${getDisplayUnit(unit)} (S: ${SeriesNumber}${instanceText}${frameText})`
);
displayText.push(`W: ${roundedWidth} ${unit}`);
displayText.push(`W: ${roundedWidth} ${getDisplayUnit(unit)}`);
return displayText;
}