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

@@ -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,