fix(PT measurement units): Use the modality unit that arrives from cornerstone3d instead of calculating the modality unit (again) here. (#3533)

This commit is contained in:
Joe Boccanfuso authored and GitHub committed 2023-07-13 09:03:17 -04:00
1 parent 93a009f1a6
commit 18156bb7b1
12 files changed
+49 -59

No files matched your search

+3 -3
View File
@@ -44,9 +44,9 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.4.1",
"@cornerstonejs/core": "^1.4.1",
"@cornerstonejs/tools": "^1.4.1",
"@cornerstonejs/adapters": "^1.4.4",
"@cornerstonejs/core": "^1.4.4",
"@cornerstonejs/tools": "^1.4.4",
"classnames": "^2.3.2"
}
}
+4 -4
View File
@@ -52,10 +52,10 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.4.1",
"@cornerstonejs/core": "^1.4.1",
"@cornerstonejs/streaming-image-volume-loader": "^1.4.1",
"@cornerstonejs/tools": "^1.4.1",
"@cornerstonejs/adapters": "^1.4.4",
"@cornerstonejs/core": "^1.4.4",
"@cornerstonejs/streaming-image-volume-loader": "^1.4.4",
"@cornerstonejs/tools": "^1.4.4",
"@kitware/vtk.js": "27.3.1",
"html2canvas": "^1.4.1",
"lodash.debounce": "4.0.8",
@@ -1,6 +1,5 @@
import SUPPORTED_TOOLS from './constants/supportedTools';
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
import getModalityUnit from './utils/getModalityUnit';
import { utils } from '@ohif/core';
const CircleROI = {
@@ -112,8 +111,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
);
const { SeriesNumber } = displaySet;
const { mean, stdDev, max, area, Modality } = targetStats;
const unit = getModalityUnit(Modality);
const { mean, stdDev, max, area, Modality, modalityUnit } = targetStats;
annotations.push({
SeriesInstanceUID,
@@ -121,7 +119,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
SeriesNumber,
frameNumber,
Modality,
unit,
unit: modalityUnit,
mean,
stdDev,
max,
@@ -1,6 +1,5 @@
import SUPPORTED_TOOLS from './constants/supportedTools';
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
import getModalityUnit from './utils/getModalityUnit';
import { utils } from '@ohif/core';
const EllipticalROI = {
@@ -112,8 +111,7 @@ function getMappedAnnotations(annotation, displaySetService) {
);
const { SeriesNumber } = displaySet;
const { mean, stdDev, max, area, Modality } = targetStats;
const unit = getModalityUnit(Modality);
const { mean, stdDev, max, area, Modality, modalityUnit } = targetStats;
annotations.push({
SeriesInstanceUID,
@@ -121,7 +119,7 @@ function getMappedAnnotations(annotation, displaySetService) {
SeriesNumber,
frameNumber,
Modality,
unit,
unit: modalityUnit,
mean,
stdDev,
max,
@@ -1,6 +1,5 @@
import SUPPORTED_TOOLS from './constants/supportedTools';
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
import getModalityUnit from './utils/getModalityUnit';
import { utils } from '@ohif/core';
const RectangleROI = {
@@ -106,8 +105,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
);
const { SeriesNumber } = displaySet;
const { mean, stdDev, max, area, Modality } = targetStats;
const unit = getModalityUnit(Modality);
const { mean, stdDev, max, area, Modality, modalityUnit } = targetStats;
annotations.push({
SeriesInstanceUID,
@@ -115,7 +113,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
SeriesNumber,
frameNumber,
Modality,
unit,
unit: modalityUnit,
mean,
stdDev,
max,
@@ -1,11 +0,0 @@
function getModalityUnit(modality) {
if (modality === 'CT') {
return 'HU';
} else if (modality === 'PT') {
return 'SUV';
} else {
return '';
}
}
export default getModalityUnit;
@@ -4,11 +4,9 @@ import {
setAnnotationSelected,
getFirstAnnotationSelected,
} from './selection';
import getModalityUnit from './getModalityUnit';
import getSOPInstanceAttributes from './getSOPInstanceAttributes';
export {
getModalityUnit,
getHandlesFromPoints,
getSOPInstanceAttributes,
isAnnotationSelected,
+2 -2
View File
@@ -30,8 +30,8 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@cornerstonejs/core": "^1.4.1",
"@cornerstonejs/tools": "^1.4.1",
"@cornerstonejs/core": "^1.4.4",
"@cornerstonejs/tools": "^1.4.4",
"@ohif/core": "3.7.0-beta.32",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.32",
"@ohif/ui": "3.7.0-beta.32",