Upgrade to cornerstoneTools 4.0.1 and dcmjs 0.6.0

This commit is contained in:
James A. Petts 2019-09-09 15:32:52 +01:00
parent 16b063a504
commit 5220cd371c
8 changed files with 1307 additions and 1303 deletions

View File

@ -32,9 +32,9 @@
"@ohif/ui": "^0.50.0",
"cornerstone-core": "^2.2.8",
"cornerstone-math": "^0.1.8",
"cornerstone-tools": "^3.1.0",
"cornerstone-tools": "^4.0.1",
"cornerstone-wado-image-loader": "^3.0.0",
"dcmjs": "^0.3.8",
"dcmjs": "^0.6.0",
"dicom-parser": "^1.8.3",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",

View File

@ -1,8 +1,8 @@
import * as dcmjs from "dcmjs";
import * as dcmjs from 'dcmjs';
import OHIF from "@ohif/core";
import cornerstone from "cornerstone-core";
import cornerstoneTools from "cornerstone-tools";
import OHIF from '@ohif/core';
import cornerstone from 'cornerstone-core';
import cornerstoneTools from 'cornerstone-tools';
const { StackManager } = OHIF.utils;
@ -56,7 +56,7 @@ function retrieveDicomData(wadoUri) {
// TODO: Authorization header depends on the server. If we ever have multiple servers
// we will need to figure out how / when to pass this information in.
return fetch(wadoUri, {
headers: OHIF.DICOMWeb.getAuthorizationHeader()
headers: OHIF.DICOMWeb.getAuthorizationHeader(),
}).then(response => response.arrayBuffer());
}
@ -91,7 +91,7 @@ async function handleSegmentationStorage(
if (displaySets.length > 1) {
console.warn(
"More than one display set with the same seriesInstanceUid. This is not supported yet..."
'More than one display set with the same seriesInstanceUid. This is not supported yet...'
);
}
@ -100,17 +100,20 @@ async function handleSegmentationStorage(
const results = parseSeg(arrayBuffer, imageIds);
if (!results) {
throw new Error("Fractional segmentations are not supported");
throw new Error('Fractional segmentations are not supported');
}
const { segMetadata, toolState } = results;
const { labelmapBuffer, segMetadata, segmentsOnFrame } = results;
segMetadata.seriesInstanceUid = seriesInstanceUid;
const { setters } = cornerstoneTools.getModule('segmentation');
addSegMetadataToCornerstoneToolState(
setters.labelmap3DByFirstImageId(
imageIds[0],
labelmapBuffer,
0, // TODO -> Can define a color LUT based on colors in the SEG later.
segMetadata,
toolState,
displaySetInstanceUid
imageIds.length,
segmentsOnFrame
);
const cachedStack = StackManager.findOrCreateStack(
@ -123,7 +126,7 @@ async function handleSegmentationStorage(
return {
studyInstanceUid,
displaySetInstanceUid,
stack
stack,
};
}

View File

@ -29,7 +29,7 @@
},
"peerDependencies": {
"@ohif/core": "^0.50.0",
"dcmjs": "^0.3.3",
"dcmjs": "^0.6.0",
"prop-types": "^15.6.2",
"react": "^15.0.0 || ^16.0.0",
"react-dom": "^15.0.0 || ^16.0.0"

View File

@ -34,7 +34,7 @@
"@ohif/ui": "^0.50.0",
"cornerstone-core": "^2.2.8",
"cornerstone-wado-image-loader": "^3.0.0",
"dcmjs": "^0.4.7",
"dcmjs": "^0.6.0",
"dicom-parser": "^1.8.3",
"i18next": "^17.0.3",
"i18next-browser-languagedetector": "^3.0.1",
@ -53,9 +53,9 @@
"devDependencies": {
"@ohif/core": "^0.50.5",
"@ohif/ui": "^0.50.4",
"cornerstone-tools": "^3.13.0",
"cornerstone-tools": "^4.0.0",
"cornerstone-wado-image-loader": "^3.0.0",
"dcmjs": "^0.5.1",
"dcmjs": "^0.6.0",
"dicom-parser": "^1.8.3",
"gh-pages": "^2.0.1",
"i18next": "^17.0.3",

View File

@ -32,7 +32,7 @@
},
"peerDependencies": {
"cornerstone-core": "^2.2.8",
"cornerstone-tools": "^3.9.0",
"cornerstone-tools": "^4.0.0",
"cornerstone-wado-image-loader": "^3.0.0",
"dicom-parser": "^1.8.3"
},

View File

@ -54,9 +54,9 @@
"core-js": "^3.2.1",
"cornerstone-core": "^2.2.8",
"cornerstone-math": "^0.1.8",
"cornerstone-tools": "^3.19.2",
"cornerstone-tools": "^4.0.0",
"cornerstone-wado-image-loader": "^3.0.0",
"dcmjs": "^0.4.7",
"dcmjs": "^0.6.0",
"dicom-parser": "^1.8.3",
"dicomweb-client": "^0.4.4",
"hammerjs": "^2.0.8",

View File

@ -177,7 +177,7 @@ export default function setupTools(store) {
{ name: 'StackScroll', mouseButtonMasks: [1] },
{ name: 'Brush', mouseButtonMasks: [1] },
{
name: 'FreehandMouse',
name: 'FreehandRoi',
props: {
configuration: {
getMeasurementLocationCallback: toolLabellingFlowCallback,

2561
yarn.lock

File diff suppressed because it is too large Load Diff