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:
parent
93a009f1a6
commit
18156bb7b1
@ -44,9 +44,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.13",
|
"@babel/runtime": "^7.20.13",
|
||||||
"@cornerstonejs/adapters": "^1.4.1",
|
"@cornerstonejs/adapters": "^1.4.4",
|
||||||
"@cornerstonejs/core": "^1.4.1",
|
"@cornerstonejs/core": "^1.4.4",
|
||||||
"@cornerstonejs/tools": "^1.4.1",
|
"@cornerstonejs/tools": "^1.4.4",
|
||||||
"classnames": "^2.3.2"
|
"classnames": "^2.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,10 +52,10 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.13",
|
"@babel/runtime": "^7.20.13",
|
||||||
"@cornerstonejs/adapters": "^1.4.1",
|
"@cornerstonejs/adapters": "^1.4.4",
|
||||||
"@cornerstonejs/core": "^1.4.1",
|
"@cornerstonejs/core": "^1.4.4",
|
||||||
"@cornerstonejs/streaming-image-volume-loader": "^1.4.1",
|
"@cornerstonejs/streaming-image-volume-loader": "^1.4.4",
|
||||||
"@cornerstonejs/tools": "^1.4.1",
|
"@cornerstonejs/tools": "^1.4.4",
|
||||||
"@kitware/vtk.js": "27.3.1",
|
"@kitware/vtk.js": "27.3.1",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"lodash.debounce": "4.0.8",
|
"lodash.debounce": "4.0.8",
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import SUPPORTED_TOOLS from './constants/supportedTools';
|
import SUPPORTED_TOOLS from './constants/supportedTools';
|
||||||
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
|
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
|
||||||
import getModalityUnit from './utils/getModalityUnit';
|
|
||||||
import { utils } from '@ohif/core';
|
import { utils } from '@ohif/core';
|
||||||
|
|
||||||
const CircleROI = {
|
const CircleROI = {
|
||||||
@ -112,8 +111,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const { SeriesNumber } = displaySet;
|
const { SeriesNumber } = displaySet;
|
||||||
const { mean, stdDev, max, area, Modality } = targetStats;
|
const { mean, stdDev, max, area, Modality, modalityUnit } = targetStats;
|
||||||
const unit = getModalityUnit(Modality);
|
|
||||||
|
|
||||||
annotations.push({
|
annotations.push({
|
||||||
SeriesInstanceUID,
|
SeriesInstanceUID,
|
||||||
@ -121,7 +119,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
|
|||||||
SeriesNumber,
|
SeriesNumber,
|
||||||
frameNumber,
|
frameNumber,
|
||||||
Modality,
|
Modality,
|
||||||
unit,
|
unit: modalityUnit,
|
||||||
mean,
|
mean,
|
||||||
stdDev,
|
stdDev,
|
||||||
max,
|
max,
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import SUPPORTED_TOOLS from './constants/supportedTools';
|
import SUPPORTED_TOOLS from './constants/supportedTools';
|
||||||
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
|
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
|
||||||
import getModalityUnit from './utils/getModalityUnit';
|
|
||||||
import { utils } from '@ohif/core';
|
import { utils } from '@ohif/core';
|
||||||
|
|
||||||
const EllipticalROI = {
|
const EllipticalROI = {
|
||||||
@ -112,8 +111,7 @@ function getMappedAnnotations(annotation, displaySetService) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const { SeriesNumber } = displaySet;
|
const { SeriesNumber } = displaySet;
|
||||||
const { mean, stdDev, max, area, Modality } = targetStats;
|
const { mean, stdDev, max, area, Modality, modalityUnit } = targetStats;
|
||||||
const unit = getModalityUnit(Modality);
|
|
||||||
|
|
||||||
annotations.push({
|
annotations.push({
|
||||||
SeriesInstanceUID,
|
SeriesInstanceUID,
|
||||||
@ -121,7 +119,7 @@ function getMappedAnnotations(annotation, displaySetService) {
|
|||||||
SeriesNumber,
|
SeriesNumber,
|
||||||
frameNumber,
|
frameNumber,
|
||||||
Modality,
|
Modality,
|
||||||
unit,
|
unit: modalityUnit,
|
||||||
mean,
|
mean,
|
||||||
stdDev,
|
stdDev,
|
||||||
max,
|
max,
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import SUPPORTED_TOOLS from './constants/supportedTools';
|
import SUPPORTED_TOOLS from './constants/supportedTools';
|
||||||
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
|
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
|
||||||
import getModalityUnit from './utils/getModalityUnit';
|
|
||||||
import { utils } from '@ohif/core';
|
import { utils } from '@ohif/core';
|
||||||
|
|
||||||
const RectangleROI = {
|
const RectangleROI = {
|
||||||
@ -106,8 +105,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const { SeriesNumber } = displaySet;
|
const { SeriesNumber } = displaySet;
|
||||||
const { mean, stdDev, max, area, Modality } = targetStats;
|
const { mean, stdDev, max, area, Modality, modalityUnit } = targetStats;
|
||||||
const unit = getModalityUnit(Modality);
|
|
||||||
|
|
||||||
annotations.push({
|
annotations.push({
|
||||||
SeriesInstanceUID,
|
SeriesInstanceUID,
|
||||||
@ -115,7 +113,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
|
|||||||
SeriesNumber,
|
SeriesNumber,
|
||||||
frameNumber,
|
frameNumber,
|
||||||
Modality,
|
Modality,
|
||||||
unit,
|
unit: modalityUnit,
|
||||||
mean,
|
mean,
|
||||||
stdDev,
|
stdDev,
|
||||||
max,
|
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,
|
setAnnotationSelected,
|
||||||
getFirstAnnotationSelected,
|
getFirstAnnotationSelected,
|
||||||
} from './selection';
|
} from './selection';
|
||||||
import getModalityUnit from './getModalityUnit';
|
|
||||||
import getSOPInstanceAttributes from './getSOPInstanceAttributes';
|
import getSOPInstanceAttributes from './getSOPInstanceAttributes';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getModalityUnit,
|
|
||||||
getHandlesFromPoints,
|
getHandlesFromPoints,
|
||||||
getSOPInstanceAttributes,
|
getSOPInstanceAttributes,
|
||||||
isAnnotationSelected,
|
isAnnotationSelected,
|
||||||
|
|||||||
@ -30,8 +30,8 @@
|
|||||||
"start": "yarn run dev"
|
"start": "yarn run dev"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@cornerstonejs/core": "^1.4.1",
|
"@cornerstonejs/core": "^1.4.4",
|
||||||
"@cornerstonejs/tools": "^1.4.1",
|
"@cornerstonejs/tools": "^1.4.4",
|
||||||
"@ohif/core": "3.7.0-beta.32",
|
"@ohif/core": "3.7.0-beta.32",
|
||||||
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.32",
|
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.32",
|
||||||
"@ohif/ui": "3.7.0-beta.32",
|
"@ohif/ui": "3.7.0-beta.32",
|
||||||
|
|||||||
@ -51,7 +51,7 @@
|
|||||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||||
"@cornerstonejs/dicom-image-loader": "^1.4.1",
|
"@cornerstonejs/dicom-image-loader": "^1.4.4",
|
||||||
"@ohif/core": "3.7.0-beta.32",
|
"@ohif/core": "3.7.0-beta.32",
|
||||||
"@ohif/extension-cornerstone": "3.7.0-beta.32",
|
"@ohif/extension-cornerstone": "3.7.0-beta.32",
|
||||||
"@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.32",
|
"@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.32",
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||||
"@cornerstonejs/dicom-image-loader": "^1.4.1",
|
"@cornerstonejs/dicom-image-loader": "^1.4.4",
|
||||||
"@ohif/ui": "3.7.0-beta.32",
|
"@ohif/ui": "3.7.0-beta.32",
|
||||||
"cornerstone-math": "0.1.9",
|
"cornerstone-math": "0.1.9",
|
||||||
"dicom-parser": "^1.8.21"
|
"dicom-parser": "^1.8.21"
|
||||||
|
|||||||
@ -405,6 +405,14 @@ class MetadataProvider {
|
|||||||
};
|
};
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
case WADO_IMAGE_LOADER_TAGS.PER_SERIES_MODULE:
|
||||||
|
metadata = {
|
||||||
|
correctedImage: instance.CorrectedImage,
|
||||||
|
units: instance.Units,
|
||||||
|
decayCorrection: instance.DecayCorrection,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -508,6 +516,7 @@ const WADO_IMAGE_LOADER_TAGS = {
|
|||||||
MODALITY_LUT_MODULE: 'modalityLutModule',
|
MODALITY_LUT_MODULE: 'modalityLutModule',
|
||||||
SOP_COMMON_MODULE: 'sopCommonModule',
|
SOP_COMMON_MODULE: 'sopCommonModule',
|
||||||
PET_ISOTOPE_MODULE: 'petIsotopeModule',
|
PET_ISOTOPE_MODULE: 'petIsotopeModule',
|
||||||
|
PER_SERIES_MODULE: 'petSeriesModule',
|
||||||
OVERLAY_PLANE_MODULE: 'overlayPlaneModule',
|
OVERLAY_PLANE_MODULE: 'overlayPlaneModule',
|
||||||
PATIENT_DEMOGRAPHIC_MODULE: 'patientDemographicModule',
|
PATIENT_DEMOGRAPHIC_MODULE: 'patientDemographicModule',
|
||||||
|
|
||||||
|
|||||||
46
yarn.lock
46
yarn.lock
@ -1589,10 +1589,10 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
|
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
|
||||||
integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==
|
integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==
|
||||||
|
|
||||||
"@cornerstonejs/adapters@^1.4.1":
|
"@cornerstonejs/adapters@^1.4.4":
|
||||||
version "1.4.1"
|
version "1.4.4"
|
||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/adapters/-/adapters-1.4.1.tgz#48ca911cb76c2c6dfaab3c7c1119bf0fb400bb71"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/adapters/-/adapters-1.4.4.tgz#49e31d5f25412688ac451a666bc7a5e5937b59ec"
|
||||||
integrity sha512-w/5c8/m7GKTGFw33vJh5IK3aJNOq9gBeQu0BSAczCBh6DfVY4JWw+ZNUZk2qRYsIcs5rIWSY0/Ykwsq3ziAblA==
|
integrity sha512-MY7o6QX319DtjUCmJ2cHvzreFcaeKm2jwYH8uf5pCHbpjeW8W2HTifqSLec4CYTefWlxQgRAT46On9sDmGojJA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime-corejs2" "^7.17.8"
|
"@babel/runtime-corejs2" "^7.17.8"
|
||||||
dcmjs "^0.29.5"
|
dcmjs "^0.29.5"
|
||||||
@ -1640,43 +1640,43 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/codec-openjph/-/codec-openjph-2.4.2.tgz#e96721d56f6ec96f7f95c16321d88cc8467d8d81"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/codec-openjph/-/codec-openjph-2.4.2.tgz#e96721d56f6ec96f7f95c16321d88cc8467d8d81"
|
||||||
integrity sha512-lgdvBvvNezleY+4pIe2ceUsJzlZe/0PipdeubQ3vZZOz3xxtHHMR1XFCl4fgd8gosR8COHuD7h6q+MwgrwBsng==
|
integrity sha512-lgdvBvvNezleY+4pIe2ceUsJzlZe/0PipdeubQ3vZZOz3xxtHHMR1XFCl4fgd8gosR8COHuD7h6q+MwgrwBsng==
|
||||||
|
|
||||||
"@cornerstonejs/core@^1.4.1":
|
"@cornerstonejs/core@^1.4.4":
|
||||||
version "1.4.1"
|
version "1.4.4"
|
||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/core/-/core-1.4.1.tgz#e7a2de14160545382771a8dbaf64935f9c654904"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/core/-/core-1.4.4.tgz#5da3732c8881315b6b30e019c5ad85a8c6607964"
|
||||||
integrity sha512-0pDTy4QZdaXISfs1SW04XitUmv5rn874P0M4XiEwNvP05AEr/Ib6yV95yvQD+xaq35JyEjDS0xCSEL4w9W7TmQ==
|
integrity sha512-FG4wGtam+jr18r6Ei2WbLp/5ENCQ4OK9xOxLoKJypXpyERsK2eOQgRFVQ1/sXTq/OQXR+2RKevlKfyYfFztvVg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@kitware/vtk.js" "27.3.1"
|
"@kitware/vtk.js" "27.3.1"
|
||||||
detect-gpu "^5.0.22"
|
detect-gpu "^5.0.22"
|
||||||
gl-matrix "^3.4.3"
|
gl-matrix "^3.4.3"
|
||||||
lodash.clonedeep "4.5.0"
|
lodash.clonedeep "4.5.0"
|
||||||
|
|
||||||
"@cornerstonejs/dicom-image-loader@^1.4.1":
|
"@cornerstonejs/dicom-image-loader@^1.4.4":
|
||||||
version "1.4.1"
|
version "1.4.4"
|
||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/dicom-image-loader/-/dicom-image-loader-1.4.1.tgz#41ba4531e87827b83684e9de939ef5025eb53db2"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/dicom-image-loader/-/dicom-image-loader-1.4.4.tgz#49eae4dcb32427d7b992f10d277423692632e507"
|
||||||
integrity sha512-J47sWG8iEISc+mSsn8iw4Fi1GL4mGuHUD+UegcGl7SgTVA6xmtEoVJJJ7lcfmPxsLJfzRv3x3Okc25GdugE8Bw==
|
integrity sha512-vcNaG0OYQXuizGo4ZsFFXJ0jo75Ly971bew4lZJ6zvWJh5IxmfFm+6iH/rmfeQU3fe5+Dx9IP0qahLotJCduIg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cornerstonejs/codec-charls" "^1.2.3"
|
"@cornerstonejs/codec-charls" "^1.2.3"
|
||||||
"@cornerstonejs/codec-libjpeg-turbo-8bit" "^1.2.2"
|
"@cornerstonejs/codec-libjpeg-turbo-8bit" "^1.2.2"
|
||||||
"@cornerstonejs/codec-openjpeg" "^1.2.2"
|
"@cornerstonejs/codec-openjpeg" "^1.2.2"
|
||||||
"@cornerstonejs/codec-openjph" "^2.4.2"
|
"@cornerstonejs/codec-openjph" "^2.4.2"
|
||||||
"@cornerstonejs/core" "^1.4.1"
|
"@cornerstonejs/core" "^1.4.4"
|
||||||
dicom-parser "^1.8.9"
|
dicom-parser "^1.8.9"
|
||||||
pako "^2.0.4"
|
pako "^2.0.4"
|
||||||
uuid "^9.0.0"
|
uuid "^9.0.0"
|
||||||
|
|
||||||
"@cornerstonejs/streaming-image-volume-loader@^1.4.1":
|
"@cornerstonejs/streaming-image-volume-loader@^1.4.4":
|
||||||
version "1.4.1"
|
version "1.4.4"
|
||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/streaming-image-volume-loader/-/streaming-image-volume-loader-1.4.1.tgz#7377add2ee2567793dadc4cce74012b95a201eed"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/streaming-image-volume-loader/-/streaming-image-volume-loader-1.4.4.tgz#f92575eecd6ac5988a40c7f9e2d7a223e9948e6c"
|
||||||
integrity sha512-dwW1IrunYoSo+UM55zpY+KIcC573YOKgCJrcy/AL6kwIJnuglmFMSzeJLM+xxdprbod2QP3LMWwpz0ikfGy67w==
|
integrity sha512-/er5VwRsOlMssFx+zPBqLWD/RM3MCqzTVXg+DHw3fi/TFTUqK1TmrrEoLQmL6wKPV2zpKbnhqaWFj0GyLu0kVA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cornerstonejs/core" "^1.4.1"
|
"@cornerstonejs/core" "^1.4.4"
|
||||||
|
|
||||||
"@cornerstonejs/tools@^1.4.1":
|
"@cornerstonejs/tools@^1.4.4":
|
||||||
version "1.4.1"
|
version "1.4.4"
|
||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/tools/-/tools-1.4.1.tgz#2ea8ab701ecf93ed9d02dcd5b95ea810bcfa98a8"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/tools/-/tools-1.4.4.tgz#3568dfe089977a2be23b631a81106542799713d0"
|
||||||
integrity sha512-UfwWzmJT3aKu2gvlWQZ3ZLmof8krRYyk0L/HTsTglS2izzbjIPuMAPfh5+FrTIhLE1RQmGwujCp7UZRIEa9s/w==
|
integrity sha512-edS63QnkoYxjSGfjetOGfotNACVk57R9or+GYz6r7NsBxnjy00Xxrj5twf4SM0PsAJcaDi/1gDwtahoiUlLELg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cornerstonejs/core" "^1.4.1"
|
"@cornerstonejs/core" "^1.4.4"
|
||||||
lodash.clonedeep "4.5.0"
|
lodash.clonedeep "4.5.0"
|
||||||
lodash.get "^4.4.2"
|
lodash.get "^4.4.2"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user