fix: Cobb angle not working in basic-test mode and open contour (#4280)
This commit is contained in:
1 parent
a2084f319b
commit
6fd3c7e293
12 files changed
+998
-799
No files matched your search
@@ -38,7 +38,7 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.78.1",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.81.6",
|
||||
"@icr/polyseg-wasm": "^0.4.0",
|
||||
"@ohif/core": "3.9.0-beta.58",
|
||||
"@ohif/ui": "3.9.0-beta.58",
|
||||
@@ -55,12 +55,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^1.78.1",
|
||||
"@cornerstonejs/core": "^1.78.1",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.78.1",
|
||||
"@cornerstonejs/tools": "^1.78.1",
|
||||
"@cornerstonejs/adapters": "^1.81.6",
|
||||
"@cornerstonejs/core": "^1.81.6",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.81.6",
|
||||
"@cornerstonejs/tools": "^1.81.6",
|
||||
"@icr/polyseg-wasm": "^0.4.0",
|
||||
"@kitware/vtk.js": "*",
|
||||
"@kitware/vtk.js": "30.4.1",
|
||||
"html2canvas": "^1.4.1",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.merge": "^4.6.2",
|
||||
|
||||
@@ -146,6 +146,13 @@ function getCustomizationModule() {
|
||||
],
|
||||
},
|
||||
PlanarFreehandROI: {
|
||||
displayTextOpen: [
|
||||
{
|
||||
displayName: 'Length',
|
||||
value: 'length',
|
||||
type: 'value',
|
||||
},
|
||||
],
|
||||
displayText: [
|
||||
{
|
||||
displayName: 'Mean',
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import SUPPORTED_TOOLS from './constants/supportedTools';
|
||||
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
|
||||
import { getDisplayUnit } from './utils';
|
||||
import { utils } from '@ohif/core';
|
||||
|
||||
/**
|
||||
@@ -125,10 +124,13 @@ function getColumnValueReport(annotation, customizationService) {
|
||||
*/
|
||||
function getDisplayText(annotation, displaySet, customizationService, displaySetService) {
|
||||
const { PlanarFreehandROI } = customizationService.get('cornerstone.measurements');
|
||||
const { displayText } = PlanarFreehandROI;
|
||||
const { displayText: displayTextClosed, displayTextOpen } = PlanarFreehandROI;
|
||||
|
||||
const { metadata, data } = annotation;
|
||||
|
||||
const isClosed = data.contour?.closed;
|
||||
const displayText = isClosed ? displayTextClosed : displayTextOpen;
|
||||
|
||||
const { SOPInstanceUID, frameNumber } = getSOPInstanceAttributes(
|
||||
metadata.referencedImageId,
|
||||
displaySetService,
|
||||
@@ -168,7 +170,7 @@ function getDisplayText(annotation, displaySet, customizationService, displaySet
|
||||
return utils.roundNumber(value, 2);
|
||||
});
|
||||
}
|
||||
return isNaN(values) ? values : utils.roundNumber(values, 2);
|
||||
return isNaN(values) ? [values] : [utils.roundNumber(values, 2)];
|
||||
};
|
||||
|
||||
const findUnitForValue = (displayTextItems, value) =>
|
||||
@@ -176,7 +178,7 @@ function getDisplayText(annotation, displaySet, customizationService, displaySet
|
||||
?.value;
|
||||
|
||||
const formatDisplayText = (displayName, result, unit) =>
|
||||
`${displayName}: ${Array.isArray(result) ? roundValues(result).join(', ') : roundValues(result)} ${unit}`;
|
||||
`${displayName}: ${roundValues(result).join(', ')} ${unit}`;
|
||||
|
||||
displayText.forEach(({ displayName, value, type }) => {
|
||||
if (type === 'value') {
|
||||
|
||||
Reference in new issue
Block a user