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

@@ -1,4 +1,5 @@
import SUPPORTED_TOOLS from './constants/supportedTools';
import { getDisplayUnit } from './utils';
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
import { utils } from '@ohif/core';
@@ -138,13 +139,7 @@ function _getReport(mappedAnnotations, points, FrameOfReferenceUID) {
return;
}
columns.push(
`max (${unit})`,
`mean (${unit})`,
`std (${unit})`,
'Area',
'Unit'
);
columns.push(`max (${unit})`, `mean (${unit})`, `std (${unit})`, 'Area', 'Unit');
values.push(max, mean, stdDev, area, areaUnit);
});
@@ -188,7 +183,7 @@ function getDisplayText(mappedAnnotations, displaySet) {
const frameText = displaySet.isMultiFrame ? ` F: ${frameNumber}` : '';
const roundedArea = utils.roundNumber(area, 2);
displayText.push(`${roundedArea} ${areaUnit}`);
displayText.push(`${roundedArea} ${getDisplayUnit(areaUnit)}`);
// Todo: we need a better UI for displaying all these information
mappedAnnotations.forEach(mappedAnnotation => {
@@ -197,7 +192,7 @@ function getDisplayText(mappedAnnotations, displaySet) {
let maxStr = '';
if (max) {
const roundedMax = utils.roundNumber(max, 2);
maxStr = `Max: ${roundedMax} <small>${unit}</small> `;
maxStr = `Max: ${roundedMax} <small>${getDisplayUnit(unit)}</small> `;
}
const str = `${maxStr}(S:${SeriesNumber}${instanceText}${frameText})`;