Upgrade to cornerstoneTools 4.0.1 and dcmjs 0.6.0
This commit is contained in:
1 parent
16b063a504
commit
5220cd371c
8 files changed
+1307
-1303
No files matched your search
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user