Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5426773ffc | ||
|
|
a507a00f59 | ||
|
|
cedeb756c0 | ||
|
|
64385485b6 | ||
|
|
32828d9a6e | ||
|
|
b94d4782d1 | ||
|
|
36b47ce3a3 | ||
|
|
fe57c00577 | ||
|
|
21a3bc2ded | ||
|
|
b6b09f22fc |
No files matched your search
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.12.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.12.9...@ohif/extension-cornerstone@2.12.10) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.12.9](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.12.8...@ohif/extension-cornerstone@2.12.9) (2022-03-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.12.8](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.12.7...@ohif/extension-cornerstone@2.12.8) (2022-03-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.12.7](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.12.6...@ohif/extension-cornerstone@2.12.7) (2022-02-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone",
|
||||
"version": "2.12.7",
|
||||
"version": "2.12.10",
|
||||
"description": "OHIF extension for Cornerstone",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -36,7 +36,7 @@
|
||||
"cornerstone-math": "^0.1.9",
|
||||
"cornerstone-tools": "^6.0.6",
|
||||
"cornerstone-wado-image-loader": "^4.1.0",
|
||||
"dcmjs": "0.19.4",
|
||||
"dcmjs": "0.19.9",
|
||||
"dicom-parser": "^1.8.11",
|
||||
"hammerjs": "^2.0.8",
|
||||
"prop-types": "^15.6.2",
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.3.21](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.20...@ohif/extension-dicom-html@1.3.21) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.3.20](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.19...@ohif/extension-dicom-html@1.3.20) (2022-03-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.3.19](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.18...@ohif/extension-dicom-html@1.3.19) (2022-03-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.3.18](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.17...@ohif/extension-dicom-html@1.3.18) (2022-02-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-html
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-html",
|
||||
"version": "1.3.18",
|
||||
"version": "1.3.21",
|
||||
"description": "OHIF extension for rendering structured reports to HTML",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "^0.50.0",
|
||||
"dcmjs": "0.19.4",
|
||||
"dcmjs": "0.19.9",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.8.6",
|
||||
"react-dom": "^16.8.6"
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.7.11](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.7.10...@ohif/extension-dicom-rt@0.7.11) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-rt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.7.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.7.9...@ohif/extension-dicom-rt@0.7.10) (2022-03-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-rt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.7.9](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.7.8...@ohif/extension-dicom-rt@0.7.9) (2022-03-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-rt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.7.8](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.7.7...@ohif/extension-dicom-rt@0.7.8) (2022-02-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-rt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-rt",
|
||||
"version": "0.7.8",
|
||||
"version": "0.7.11",
|
||||
"description": "OHIF extension for rendering DICOM RTSTRUCTs on top of cornerstone images.",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -31,7 +31,7 @@
|
||||
"@ohif/core": "^0.50.0",
|
||||
"cornerstone-core": "^2.6.1",
|
||||
"cornerstone-tools": "^6.0.6",
|
||||
"dcmjs": "0.19.4",
|
||||
"dcmjs": "0.19.9",
|
||||
"gl-matrix": "^3.3.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.8.6",
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.7.11](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.7.10...@ohif/extension-dicom-segmentation@0.7.11) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-segmentation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.7.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.7.9...@ohif/extension-dicom-segmentation@0.7.10) (2022-03-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-segmentation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.7.9](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.7.8...@ohif/extension-dicom-segmentation@0.7.9) (2022-03-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-segmentation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.7.8](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.7.7...@ohif/extension-dicom-segmentation@0.7.8) (2022-02-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-segmentation
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-segmentation",
|
||||
"version": "0.7.8",
|
||||
"version": "0.7.11",
|
||||
"description": "OHIF extension for viewing segmentations in the 2D MPR view",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -31,7 +31,7 @@
|
||||
"@ohif/core": "^0.50.0",
|
||||
"cornerstone-core": "^2.6.1",
|
||||
"cornerstone-tools": "^6.0.6",
|
||||
"dcmjs": "0.19.4",
|
||||
"dcmjs": "0.19.9",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.8.6",
|
||||
"react-dom": "^16.8.6"
|
||||
|
||||
+1
-16
@@ -226,7 +226,6 @@ const SegmentationPanel = ({
|
||||
};
|
||||
}, [
|
||||
activeIndex,
|
||||
updateSegmentationComboBox,
|
||||
viewports,
|
||||
]);
|
||||
|
||||
@@ -234,23 +233,9 @@ const SegmentationPanel = ({
|
||||
const index = e.detail.activatedLabelmapIndex;
|
||||
if (index !== -1) {
|
||||
setState(state => ({ ...state, selectedSegmentation: index }));
|
||||
} else {
|
||||
cleanSegmentationComboBox();
|
||||
}
|
||||
};
|
||||
|
||||
const cleanSegmentationComboBox = () => {
|
||||
setState(state => ({
|
||||
...state,
|
||||
segmentsHidden: [],
|
||||
segmentNumbers: [],
|
||||
labelMapList: [],
|
||||
segmentList: [],
|
||||
isDisabled: true,
|
||||
selectedSegmentation: -1,
|
||||
}));
|
||||
};
|
||||
|
||||
const refreshSegmentations = () => {
|
||||
const activeViewport = getActiveViewport();
|
||||
const isDisabled = !activeViewport || !activeViewport.StudyInstanceUID;
|
||||
@@ -709,7 +694,7 @@ const SegmentationPanel = ({
|
||||
count={state.segmentList.length}
|
||||
isVisible={
|
||||
state.segmentsHidden.filter(isHidden => isHidden === true).length <
|
||||
state.segmentNumbers.length
|
||||
state.segmentNumbers.length && state.segmentNumbers.length > 0
|
||||
}
|
||||
onVisibilityChange={onVisibilityChangeHandler}
|
||||
>
|
||||
|
||||
@@ -47,14 +47,23 @@ export default async function setActiveLabelmap(
|
||||
return labelmapIndex;
|
||||
}
|
||||
|
||||
if (!displaySet.isLoaded) {
|
||||
if (!displaySet.isLoaded && !displaySet.loadError) {
|
||||
try {
|
||||
await displaySet.load(referencedDisplaySet, studies);
|
||||
} catch (error) {
|
||||
displaySet.isLoaded = false;
|
||||
displaySet.loadError = true;
|
||||
displaySet.segLoadErrorMessagge = error.message;
|
||||
onDisplaySetLoadFailure(error);
|
||||
|
||||
/*
|
||||
* TODO: Improve the way we notify parts of the app
|
||||
* that depends on derived display sets to be loaded.
|
||||
* (Implement pubsub for better tracking of derived display sets)
|
||||
*/
|
||||
const event = new CustomEvent('segmentationLoadingError');
|
||||
document.dispatchEvent(event);
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,38 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.2.23](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.22...@ohif/extension-dicom-tag-browser@0.2.23) (2022-04-06)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.2.22](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.21...@ohif/extension-dicom-tag-browser@0.2.22) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.2.21](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.20...@ohif/extension-dicom-tag-browser@0.2.21) (2022-03-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.2.20](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.19...@ohif/extension-dicom-tag-browser@0.2.20) (2022-03-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.2.19](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.18...@ohif/extension-dicom-tag-browser@0.2.19) (2022-02-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-tag-browser",
|
||||
"version": "0.2.19",
|
||||
"version": "0.2.23",
|
||||
"description": "OHIF extension for checking DICOM headers.",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "^2.6.0",
|
||||
"dcmjs": "0.19.4",
|
||||
"dcmjs": "0.19.9",
|
||||
"react": "^16.8.6"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -59,7 +59,7 @@ const DicomTagBrowser = ({ displaySets, displaySetInstanceUID }) => {
|
||||
let metadata;
|
||||
const isImageStack =
|
||||
activeDisplaySet instanceof ImageSet &&
|
||||
activeDisplaySet.isModalitySupported === true;
|
||||
activeDisplaySet.isSOPClassUIDSupported === true;
|
||||
|
||||
let instanceList;
|
||||
|
||||
|
||||
@@ -3,6 +3,38 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.12.22](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.21...@ohif/extension-vtk@1.12.22) (2022-04-06)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.12.21](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.20...@ohif/extension-vtk@1.12.21) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.12.20](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.19...@ohif/extension-vtk@1.12.20) (2022-03-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.12.19](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.18...@ohif/extension-vtk@1.12.19) (2022-03-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.12.18](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.17...@ohif/extension-vtk@1.12.18) (2022-03-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-vtk",
|
||||
"version": "1.12.18",
|
||||
"version": "1.12.22",
|
||||
"description": "OHIF extension for VTK.js",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -35,7 +35,7 @@
|
||||
"cornerstone-core": "^2.6.1",
|
||||
"cornerstone-tools": "^6.0.6",
|
||||
"cornerstone-wado-image-loader": "^4.1.0",
|
||||
"dcmjs": "0.19.4",
|
||||
"dcmjs": "0.19.9",
|
||||
"dicom-parser": "^1.8.11",
|
||||
"i18next": "^17.0.3",
|
||||
"i18next-browser-languagedetector": "^3.0.1",
|
||||
@@ -53,8 +53,8 @@
|
||||
"react-vtkjs-viewport": "^0.14.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ohif/core": "^2.16.13",
|
||||
"@ohif/ui": "^1.10.7",
|
||||
"@ohif/core": "^2.16.17",
|
||||
"@ohif/ui": "^1.10.8",
|
||||
"cornerstone-tools": "^6.0.6",
|
||||
"cornerstone-wado-image-loader": "^4.1.0",
|
||||
"dicom-parser": "^1.8.11",
|
||||
|
||||
@@ -3,6 +3,38 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.16.17](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.16...@ohif/core@2.16.17) (2022-04-06)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.16.16](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.15...@ohif/core@2.16.16) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.16.15](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.14...@ohif/core@2.16.15) (2022-03-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.16.14](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.13...@ohif/core@2.16.14) (2022-03-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.16.13](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.12...@ohif/core@2.16.13) (2022-03-14)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/core",
|
||||
"version": "2.16.13",
|
||||
"version": "2.16.17",
|
||||
"description": "Generic business logic for web-based medical imaging applications",
|
||||
"author": "OHIF Core Team",
|
||||
"license": "MIT",
|
||||
@@ -39,7 +39,7 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"ajv": "^6.10.0",
|
||||
"dcmjs": "0.19.4",
|
||||
"dcmjs": "0.19.9",
|
||||
"dicomweb-client": "^0.8.3",
|
||||
"immer": "9.0.12",
|
||||
"isomorphic-base64": "^1.0.2",
|
||||
|
||||
@@ -401,7 +401,7 @@ class StackLoadingListener extends BaseLoadingListener {
|
||||
const totalFramesCount = this.stack.imageIds.length;
|
||||
const loadedFramesCount = this.loadedCount;
|
||||
const loadingFramesCount = totalFramesCount - loadedFramesCount;
|
||||
const percentComplete = Math.round(
|
||||
const percentComplete = Math.ceil(
|
||||
(loadedFramesCount / totalFramesCount) * 100
|
||||
);
|
||||
const progressId = this._getProgressId();
|
||||
|
||||
@@ -3,12 +3,12 @@ import DICOMWeb from './../../DICOMWeb';
|
||||
import ImageSet from './../ImageSet';
|
||||
import { InstanceMetadata } from './InstanceMetadata';
|
||||
import { Metadata } from './Metadata';
|
||||
import OHIFError from '../OHIFError';
|
||||
import { SeriesMetadata } from './SeriesMetadata';
|
||||
// - createStacks
|
||||
import { api } from 'dicomweb-client';
|
||||
// - createStacks
|
||||
import { isImage } from '../../utils/isImage';
|
||||
import { naturalizeSOPClassUID } from '../../utils/naturalizeSOPClassUID';
|
||||
import {
|
||||
isDisplaySetReconstructable,
|
||||
isSpacingUniform,
|
||||
@@ -169,8 +169,12 @@ class StudyMetadata extends Metadata {
|
||||
!isImage(instance.getTagValue('SOPClassUID')) &&
|
||||
!instance.getTagValue('Rows')
|
||||
) {
|
||||
// we set an empty display and we add a isModalitySupported variable to
|
||||
// print a warning that the modality is not supported in the thumbnail.
|
||||
// we set an empty display and we add a isSOPClassUIDSupported variable to
|
||||
// print a warning that the series is not supported in the thumbnail.
|
||||
// SOPClassUIDNaturalized is human readable name, since for non image series,
|
||||
// we could have a mismatch between the SOPClassUID and the Modality.
|
||||
// For example, in the Parametric map IOD Modality is expected to match
|
||||
// the value for the series used to generate Parametric map, and there is no "PM" modality.
|
||||
const displaySet = new ImageSet([]);
|
||||
const seriesData = series.getData();
|
||||
displaySet.setAttributes({
|
||||
@@ -188,7 +192,10 @@ class StudyMetadata extends Metadata {
|
||||
InstanceNumber: instance.getTagValue('InstanceNumber'), // Include the instance number
|
||||
AcquisitionDatetime: instance.getTagValue('AcquisitionDateTime'), // Include the acquisition datetime
|
||||
isReconstructable: false,
|
||||
isModalitySupported: false,
|
||||
isSOPClassUIDSupported: false,
|
||||
SOPClassUIDNaturalized: naturalizeSOPClassUID(
|
||||
instance.getTagValue('SOPClassUID')
|
||||
),
|
||||
metadata: instance.getData().metadata,
|
||||
});
|
||||
|
||||
@@ -923,7 +930,7 @@ const makeDisplaySet = (series, instances) => {
|
||||
: displayReconstructableInfo.reconstructionIssues;
|
||||
}
|
||||
|
||||
imageSet.isModalitySupported = true;
|
||||
imageSet.isSOPClassUIDSupported = true;
|
||||
|
||||
return imageSet;
|
||||
};
|
||||
|
||||
@@ -49,7 +49,12 @@ import studyMetadataManager from './studyMetadataManager';
|
||||
* @param {object} snackbar
|
||||
* @returns void
|
||||
*/
|
||||
async function loadAndCacheDerivedDisplaySets(referencedDisplaySet, studies, logger, snackbar) {
|
||||
async function loadAndCacheDerivedDisplaySets(
|
||||
referencedDisplaySet,
|
||||
studies,
|
||||
logger,
|
||||
snackbar
|
||||
) {
|
||||
const { StudyInstanceUID, SeriesInstanceUID } = referencedDisplaySet;
|
||||
const promises = [];
|
||||
const studyMetadata = studyMetadataManager.get(StudyInstanceUID);
|
||||
@@ -80,60 +85,111 @@ async function loadAndCacheDerivedDisplaySets(referencedDisplaySet, studies, log
|
||||
});
|
||||
|
||||
// For each type, see if any are loaded, if not load the most recent.
|
||||
await Promise.all(Object.keys(displaySetsPerModality).map(async (key) => {
|
||||
const displaySets = displaySetsPerModality[key];
|
||||
await Promise.all(
|
||||
Object.keys(displaySetsPerModality).map(async key => {
|
||||
const displaySets = displaySetsPerModality[key];
|
||||
|
||||
const isLoaded = displaySets.some(displaySet => displaySet.isLoaded);
|
||||
if (isLoaded) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (displaySets.some(displaySet => displaySet.loadError)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// find most recent and load it.
|
||||
let recentDateTime = 0;
|
||||
let recentDisplaySet = displaySets[0];
|
||||
|
||||
displaySets.forEach(displaySet => {
|
||||
const dateTime = Number(
|
||||
`${displaySet.SeriesDate}${displaySet.SeriesTime}`
|
||||
);
|
||||
if (dateTime > recentDateTime) {
|
||||
recentDateTime = dateTime;
|
||||
recentDisplaySet = displaySet;
|
||||
const isLoaded = displaySets.some(displaySet => displaySet.isLoaded);
|
||||
if (isLoaded) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
if (recentDisplaySet.hasOwnProperty('getSourceDisplaySet') &&
|
||||
typeof recentDisplaySet.getSourceDisplaySet === 'function') {
|
||||
await recentDisplaySet.getSourceDisplaySet(studies);
|
||||
} else {
|
||||
await recentDisplaySet.load(referencedDisplaySet, studies);
|
||||
if (displaySets.some(displaySet => displaySet.loadError)) {
|
||||
return;
|
||||
}
|
||||
} catch (error) {
|
||||
recentDisplaySet.isLoaded = false;
|
||||
recentDisplaySet.loadError = true;
|
||||
logger.error({ error, message: error.message });
|
||||
snackbar.show({
|
||||
title: 'Error loading derived display set:',
|
||||
message: error.message,
|
||||
type: 'error',
|
||||
error,
|
||||
autoClose: false,
|
||||
|
||||
// find most recent and load it.
|
||||
let recentDateTime = 0;
|
||||
let recentDisplaySet = displaySets[0];
|
||||
|
||||
displaySets.forEach(displaySet => {
|
||||
const dateTime = Number(
|
||||
`${displaySet.SeriesDate}${displaySet.SeriesTime}`
|
||||
);
|
||||
if (dateTime > recentDateTime) {
|
||||
recentDateTime = dateTime;
|
||||
recentDisplaySet = displaySet;
|
||||
}
|
||||
});
|
||||
}
|
||||
}));
|
||||
|
||||
try {
|
||||
if (
|
||||
recentDisplaySet.hasOwnProperty('getSourceDisplaySet') &&
|
||||
typeof recentDisplaySet.getSourceDisplaySet === 'function'
|
||||
) {
|
||||
if (recentDisplaySet.Modality === 'SEG' && logger) {
|
||||
const onDisplaySetLoadFailureHandler = error => {
|
||||
logger.error({ error, message: error.message });
|
||||
snackbar.show({
|
||||
title: 'DICOM Segmentation Loader',
|
||||
message: error.message,
|
||||
type: 'error',
|
||||
autoClose: true,
|
||||
});
|
||||
};
|
||||
|
||||
let activatedLabelmapIndex = -1;
|
||||
while (activatedLabelmapIndex == -1) {
|
||||
const {
|
||||
referencedDisplaySet,
|
||||
activatedLabelmapPromise,
|
||||
} = await recentDisplaySet.getSourceDisplaySet(
|
||||
studies,
|
||||
true,
|
||||
onDisplaySetLoadFailureHandler
|
||||
);
|
||||
|
||||
activatedLabelmapIndex = await activatedLabelmapPromise;
|
||||
const selectionFired = new CustomEvent(
|
||||
'extensiondicomsegmentationsegselected',
|
||||
{
|
||||
detail: { activatedLabelmapIndex: activatedLabelmapIndex },
|
||||
}
|
||||
);
|
||||
document.dispatchEvent(selectionFired);
|
||||
|
||||
const lastDateTime = Number(
|
||||
`${recentDisplaySet.SeriesDate}${recentDisplaySet.SeriesTime}`
|
||||
);
|
||||
recentDateTime = 0;
|
||||
displaySets.forEach(displaySet => {
|
||||
const dateTime = Number(
|
||||
`${displaySet.SeriesDate}${displaySet.SeriesTime}`
|
||||
);
|
||||
if (dateTime > recentDateTime && dateTime < lastDateTime) {
|
||||
recentDateTime = dateTime;
|
||||
recentDisplaySet = displaySet;
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
await recentDisplaySet.getSourceDisplaySet(studies);
|
||||
}
|
||||
} else {
|
||||
await recentDisplaySet.load(referencedDisplaySet, studies);
|
||||
}
|
||||
} catch (error) {
|
||||
recentDisplaySet.isLoaded = false;
|
||||
recentDisplaySet.loadError = true;
|
||||
logger.error({ error, message: error.message });
|
||||
snackbar.show({
|
||||
title: 'Error loading derived display set:',
|
||||
message: error.message,
|
||||
type: 'error',
|
||||
error,
|
||||
autoClose: false,
|
||||
});
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
/*
|
||||
* TODO: Improve the way we notify parts of the app
|
||||
* that depends on derived display sets to be loaded.
|
||||
* (Implement pubsub for better tracking of derived display sets)
|
||||
*/
|
||||
* TODO: Improve the way we notify parts of the app
|
||||
* that depends on derived display sets to be loaded.
|
||||
* (Implement pubsub for better tracking of derived display sets)
|
||||
*/
|
||||
const event = new CustomEvent('deriveddisplaysetsloadedandcached');
|
||||
document.dispatchEvent(event);
|
||||
};
|
||||
}
|
||||
|
||||
export default loadAndCacheDerivedDisplaySets;
|
||||
@@ -0,0 +1,200 @@
|
||||
import { sopClassDictionary } from './sopClassDictionary';
|
||||
import { isImage } from './isImage';
|
||||
|
||||
/**
|
||||
* Naturalize SOP Class UID which do not have image data
|
||||
* @param {string} SOPClassUID - SOP Class UID to be converted
|
||||
* @returns {string} - human readable name
|
||||
*/
|
||||
export const naturalizeSOPClassUID = SOPClassUID => {
|
||||
let naturalizedName = '';
|
||||
if (!SOPClassUID) return naturalizedName;
|
||||
if (!isImage) return naturalizedName;
|
||||
|
||||
if (sopClassDictionary.MRSpectroscopyStorage === SOPClassUID) {
|
||||
naturalizedName = 'MRSpectroscopy';
|
||||
} else if (sopClassDictionary.EnhancedUSVolumeStorage === SOPClassUID) {
|
||||
naturalizedName = 'EnhancedUSVolume';
|
||||
} else if (sopClassDictionary.Sop12LeadECGWaveformStorage === SOPClassUID) {
|
||||
naturalizedName = 'Sop12LeadECGWaveform';
|
||||
} else if (sopClassDictionary.GeneralECGWaveformStorage === SOPClassUID) {
|
||||
naturalizedName = 'GeneralECGWaveform';
|
||||
} else if (sopClassDictionary.AmbulatoryECGWaveformStorage === SOPClassUID) {
|
||||
naturalizedName = 'AECAmbulatoryECGWaveformGW';
|
||||
} else if (sopClassDictionary.HemodynamicWaveformStorage === SOPClassUID) {
|
||||
naturalizedName = 'HemodynamicWaveform';
|
||||
} else if (
|
||||
sopClassDictionary.CardiacElectrophysiologyWaveformStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'CardiacElectrophysiologyWaveform';
|
||||
} else if (
|
||||
sopClassDictionary.BasicVoiceAudioWaveformStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'BasicVoiceAudioWaveform';
|
||||
} else if (sopClassDictionary.GeneralAudioWaveformStorage === SOPClassUID) {
|
||||
naturalizedName = 'GGeneralAudioWaveformAW';
|
||||
} else if (sopClassDictionary.ArterialPulseWaveformStorage === SOPClassUID) {
|
||||
naturalizedName = 'APArterialPulseWaveformW';
|
||||
} else if (sopClassDictionary.RespiratoryWaveformStorage === SOPClassUID) {
|
||||
naturalizedName = 'RespiratoryWaveform';
|
||||
} else if (
|
||||
sopClassDictionary.GrayscaleSoftcopyPresentationStateStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'GrayscaleSoftcopyPresentationState';
|
||||
} else if (
|
||||
sopClassDictionary.ColorSoftcopyPresentationStateStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'ColorSoftcopyPresentationState';
|
||||
} else if (
|
||||
sopClassDictionary.PseudoColorSoftcopyPresentationStateStorage ===
|
||||
SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'PseudoColorSoftcopyPresentationState';
|
||||
} else if (
|
||||
sopClassDictionary.BlendingSoftcopyPresentationStateStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'BlendingSoftcopyPresentationState';
|
||||
} else if (
|
||||
sopClassDictionary.XAXRFGrayscaleSoftcopyPresentationStateStorage ===
|
||||
SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'XAXRFGrayscaleSoftcopyPresentationState';
|
||||
} else if (sopClassDictionary.RawDataStorage === SOPClassUID) {
|
||||
naturalizedName = 'RawData';
|
||||
} else if (sopClassDictionary.SpatialRegistrationStorage === SOPClassUID) {
|
||||
naturalizedName = 'SpatialRegistration';
|
||||
} else if (sopClassDictionary.SpatialFiducialsStorage === SOPClassUID) {
|
||||
naturalizedName = 'SpatialFiducials';
|
||||
} else if (
|
||||
sopClassDictionary.DeformableSpatialRegistrationStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'DeformableSpatialRegistration';
|
||||
} else if (sopClassDictionary.SegmentationStorage === SOPClassUID) {
|
||||
naturalizedName = 'SEG';
|
||||
} else if (sopClassDictionary.SurfaceSegmentationStorage === SOPClassUID) {
|
||||
naturalizedName = 'SurfaceSEG';
|
||||
} else if (sopClassDictionary.RealWorldValueMappingStorage === SOPClassUID) {
|
||||
naturalizedName = 'RealWorldValueMapping';
|
||||
} else if (sopClassDictionary.SurfaceScanMeshStorage === SOPClassUID) {
|
||||
naturalizedName = 'SurfaceScanMesh';
|
||||
} else if (sopClassDictionary.SurfaceScanPointCloudStorage === SOPClassUID) {
|
||||
naturalizedName = 'SurfaceScanPointCloud';
|
||||
} else if (
|
||||
sopClassDictionary.StereometricRelationshipStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'StereometricRelationship';
|
||||
} else if (sopClassDictionary.LensometryMeasurementsStorage === SOPClassUID) {
|
||||
naturalizedName = 'LensometryMeasurements';
|
||||
} else if (
|
||||
sopClassDictionary.AutorefractionMeasurementsStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'AutorefractionMeasurements';
|
||||
} else if (
|
||||
sopClassDictionary.KeratometryMeasurementsStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'KeratometryMeasurements';
|
||||
} else if (
|
||||
sopClassDictionary.SubjectiveRefractionMeasurementsStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'SubjectiveRefractionMeasurements';
|
||||
} else if (
|
||||
sopClassDictionary.VisualAcuityMeasurementsStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'VisualAcuityMeasurements';
|
||||
} else if (
|
||||
sopClassDictionary.SpectaclePrescriptionReportStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'SpectaclePrescriptionReport';
|
||||
} else if (
|
||||
sopClassDictionary.OphthalmicAxialMeasurementsStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'OphthalmicAxialMeasurements';
|
||||
} else if (
|
||||
sopClassDictionary.IntraocularLensCalculationsStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'IntraocularLensCalculations';
|
||||
} else if (
|
||||
sopClassDictionary.MacularGridThicknessandVolumeReport === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'MacularGridThicknessandVolume';
|
||||
} else if (
|
||||
sopClassDictionary.OphthalmicVisualFieldStaticPerimetryMeasurementsStorage ===
|
||||
SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'OphthalmicVisualFieldStaticPerimetryMeasurements';
|
||||
} else if (sopClassDictionary.OphthalmicThicknessMapStorage === SOPClassUID) {
|
||||
naturalizedName = 'OphthalmicThicknessMap';
|
||||
} else if (sopClassDictionary.CornealTopographyMapStorage === SOPClassUID) {
|
||||
naturalizedName = 'CornealTopographyMap';
|
||||
} else if (sopClassDictionary.BasicTextSR === SOPClassUID) {
|
||||
naturalizedName = 'BasicTextSR';
|
||||
} else if (sopClassDictionary.EnhancedSR === SOPClassUID) {
|
||||
naturalizedName = 'EnhancedSR';
|
||||
} else if (sopClassDictionary.ComprehensiveSR === SOPClassUID) {
|
||||
naturalizedName = 'ComprehensiveSR';
|
||||
} else if (sopClassDictionary.Comprehensive3DSR === SOPClassUID) {
|
||||
naturalizedName = 'Comprehensive3DSR';
|
||||
} else if (sopClassDictionary.ProcedureLog === SOPClassUID) {
|
||||
naturalizedName = 'ProcedureLog';
|
||||
} else if (sopClassDictionary.MammographyCADSR === SOPClassUID) {
|
||||
naturalizedName = 'MammographyCADSR';
|
||||
} else if (sopClassDictionary.KeyObjectSelection === SOPClassUID) {
|
||||
naturalizedName = 'KeyObject';
|
||||
} else if (sopClassDictionary.ChestCADSR === SOPClassUID) {
|
||||
naturalizedName = 'ChestCADSR';
|
||||
} else if (sopClassDictionary.XRayRadiationDoseSR === SOPClassUID) {
|
||||
naturalizedName = 'XRayRadiationDoseSR';
|
||||
} else if (
|
||||
sopClassDictionary.RadiopharmaceuticalRadiationDoseSR === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'RadiopharmaceuticalRadiationDoseSR';
|
||||
} else if (sopClassDictionary.ColonCADSR === SOPClassUID) {
|
||||
naturalizedName = 'ColonCADSR';
|
||||
} else if (
|
||||
sopClassDictionary.ImplantationPlanSRDocumentStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'ImplantationPlanSRDocument';
|
||||
} else if (sopClassDictionary.EncapsulatedPDFStorage === SOPClassUID) {
|
||||
naturalizedName = 'EncapsulatedPDF';
|
||||
} else if (sopClassDictionary.EncapsulatedCDAStorage === SOPClassUID) {
|
||||
naturalizedName = 'EncapsulatedCDA';
|
||||
} else if (sopClassDictionary.BasicStructuredDisplayStorage === SOPClassUID) {
|
||||
naturalizedName = 'BasicStructuredDisplay';
|
||||
} else if (sopClassDictionary.RTDoseStorage === SOPClassUID) {
|
||||
naturalizedName = 'RTDose';
|
||||
} else if (sopClassDictionary.RTStructureSetStorage === SOPClassUID) {
|
||||
naturalizedName = 'RTStructureSet';
|
||||
} else if (sopClassDictionary.RTBeamsTreatmentRecordStorage === SOPClassUID) {
|
||||
naturalizedName = 'RTBeamsTreatmentRecord';
|
||||
} else if (sopClassDictionary.RTPlanStorage === SOPClassUID) {
|
||||
naturalizedName = 'RTPlan';
|
||||
} else if (
|
||||
sopClassDictionary.RTBrachyTreatmentRecordStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'RTBrachyTreatmentRecord';
|
||||
} else if (
|
||||
sopClassDictionary.RTTreatmentSummaryRecordStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'RTTreatmentSummaryRecord';
|
||||
} else if (sopClassDictionary.RTIonPlanStorage === SOPClassUID) {
|
||||
naturalizedName = 'RTIonPlan';
|
||||
} else if (
|
||||
sopClassDictionary.RTIonBeamsTreatmentRecordStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'RTIonBeamsTreatmentRecord';
|
||||
} else if (
|
||||
sopClassDictionary.RTBeamsDeliveryInstructionStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'RTBeamsDeliveryInstruction';
|
||||
} else if (sopClassDictionary.GenericImplantTemplateStorage === SOPClassUID) {
|
||||
naturalizedName = 'GenericImplantTemplate';
|
||||
} else if (
|
||||
sopClassDictionary.ImplantAssemblyTemplateStorage === SOPClassUID
|
||||
) {
|
||||
naturalizedName = 'ImplantAssemblyTemplate';
|
||||
} else if (sopClassDictionary.ImplantTemplateGroupStorage === SOPClassUID) {
|
||||
naturalizedName = 'ImplantTemplateGroup';
|
||||
}
|
||||
|
||||
return naturalizedName;
|
||||
};
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.10.8](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.10.7...@ohif/ui@1.10.8) (2022-04-06)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.10.7](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.10.6...@ohif/ui@1.10.7) (2022-03-14)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/ui",
|
||||
"version": "1.10.7",
|
||||
"version": "1.10.8",
|
||||
"description": "A set of React components for Medical Imaging Viewers",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -177,7 +177,9 @@ function Thumbnail(props) {
|
||||
const { progressId, progressData } = detail;
|
||||
if (`StackProgress:${displaySetInstanceUID}` === progressId) {
|
||||
const percent = progressData ? progressData.percentComplete : 0;
|
||||
setStackPercentComplete(percent);
|
||||
if (percent > stackPercentComplete) {
|
||||
setStackPercentComplete(percent);
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
box-shadow: inset 0 0 0 1px var(--ui-border-color-dark);
|
||||
border: 2px solid transparent;
|
||||
border-radius: 12px;
|
||||
height: 135px;
|
||||
min-height: 135px;
|
||||
max-height: 250px;
|
||||
margin: 0 auto;
|
||||
padding: 5px;
|
||||
position: relative;
|
||||
@@ -36,6 +37,11 @@
|
||||
h1
|
||||
text-align: center
|
||||
color: var(--text-primary-color);
|
||||
max-width: 200px;
|
||||
max-height: 250px;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
hyphens: auto;
|
||||
|
||||
.series-details
|
||||
display: flex;
|
||||
|
||||
@@ -3,6 +3,38 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [4.12.25](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.24...@ohif/viewer@4.12.25) (2022-04-06)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.12.24](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.23...@ohif/viewer@4.12.24) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.12.23](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.22...@ohif/viewer@4.12.23) (2022-03-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.12.22](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.21...@ohif/viewer@4.12.22) (2022-03-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.12.21](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.20...@ohif/viewer@4.12.21) (2022-03-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/viewer",
|
||||
"version": "4.12.21",
|
||||
"version": "4.12.25",
|
||||
"description": "OHIF Viewer",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
@@ -47,18 +47,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@ohif/core": "^2.16.13",
|
||||
"@ohif/extension-cornerstone": "^2.12.7",
|
||||
"@ohif/core": "^2.16.17",
|
||||
"@ohif/extension-cornerstone": "^2.12.10",
|
||||
"@ohif/extension-debugging": "^0.3.2",
|
||||
"@ohif/extension-dicom-html": "^1.3.18",
|
||||
"@ohif/extension-dicom-html": "^1.3.21",
|
||||
"@ohif/extension-dicom-microscopy": "^0.52.0",
|
||||
"@ohif/extension-dicom-pdf": "^1.1.2",
|
||||
"@ohif/extension-dicom-rt": "^0.7.8",
|
||||
"@ohif/extension-dicom-segmentation": "^0.7.8",
|
||||
"@ohif/extension-dicom-rt": "^0.7.11",
|
||||
"@ohif/extension-dicom-segmentation": "^0.7.11",
|
||||
"@ohif/extension-lesion-tracker": "^0.2.1",
|
||||
"@ohif/extension-vtk": "^1.12.18",
|
||||
"@ohif/extension-vtk": "^1.12.22",
|
||||
"@ohif/i18n": "^0.53.0",
|
||||
"@ohif/ui": "^1.10.7",
|
||||
"@ohif/ui": "^1.10.8",
|
||||
"@tanem/react-nprogress": "^1.1.25",
|
||||
"classnames": "^2.2.6",
|
||||
"core-js": "^3.2.1",
|
||||
@@ -66,7 +66,7 @@
|
||||
"cornerstone-math": "^0.1.9",
|
||||
"cornerstone-tools": "^6.0.6",
|
||||
"cornerstone-wado-image-loader": "^4.1.0",
|
||||
"dcmjs": "0.19.4",
|
||||
"dcmjs": "0.19.9",
|
||||
"dicom-parser": "^1.8.11",
|
||||
"dicomweb-client": "^0.8.3",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
||||
@@ -30,6 +30,7 @@ window.config = {
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// Extensions should be able to suggest default values for these?
|
||||
// Or we can require that these be explicitly set
|
||||
hotkeys: [
|
||||
|
||||
@@ -79,7 +79,7 @@ const mapDispatchToProps = (dispatch, ownProps) => {
|
||||
});
|
||||
}
|
||||
|
||||
if (displaySet.isModalitySupported === false) {
|
||||
if (displaySet.isSOPClassUIDSupported === false) {
|
||||
const error = new Error('Modality not supported');
|
||||
const message = 'Modality not supported';
|
||||
LoggerService.error({ error, message });
|
||||
|
||||
@@ -105,6 +105,11 @@ class Viewer extends Component {
|
||||
if (this.props.dialog) {
|
||||
this.props.dialog.dismissAll();
|
||||
}
|
||||
|
||||
document.removeEventListener(
|
||||
'segmentationLoadingError',
|
||||
this._updateThumbnails
|
||||
);
|
||||
}
|
||||
|
||||
retrieveTimepoints = filter => {
|
||||
@@ -212,6 +217,12 @@ class Viewer extends Component {
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener(
|
||||
'segmentationLoadingError',
|
||||
this._updateThumbnails.bind(this),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
@@ -255,6 +266,20 @@ class Viewer extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
_updateThumbnails() {
|
||||
const { studies, activeViewportIndex, viewports } = this.props;
|
||||
|
||||
const activeViewport = viewports[activeViewportIndex];
|
||||
const activeDisplaySetInstanceUID = activeViewport
|
||||
? activeViewport.displaySetInstanceUID
|
||||
: undefined;
|
||||
|
||||
this.setState({
|
||||
thumbnails: _mapStudiesToThumbnails(studies, activeDisplaySetInstanceUID),
|
||||
activeDisplaySetInstanceUID,
|
||||
});
|
||||
}
|
||||
|
||||
_getActiveViewport() {
|
||||
return this.props.viewports[this.props.activeViewportIndex];
|
||||
}
|
||||
@@ -461,9 +486,7 @@ const _checkForDerivedDisplaySets = async function(displaySet, study) {
|
||||
/**
|
||||
* Async function to check if there are any inconsistences in the series.
|
||||
*
|
||||
* For segmentation checks that the geometry is consistent with the source images:
|
||||
* 1) no frames out of plane;
|
||||
* 2) have the same width and height.
|
||||
* For segmentation returns any error during loading.
|
||||
*
|
||||
* For reconstructable 3D volume:
|
||||
* 1) Is series multiframe?
|
||||
@@ -477,10 +500,7 @@ const _checkForDerivedDisplaySets = async function(displaySet, study) {
|
||||
* @param {*object} displaySet
|
||||
* @returns {[string]} an array of strings containing the warnings
|
||||
*/
|
||||
const _checkForSeriesInconsistencesWarnings = async function(
|
||||
displaySet,
|
||||
studies
|
||||
) {
|
||||
const _checkForSeriesInconsistencesWarnings = async function(displaySet) {
|
||||
if (displaySet.inconsistencyWarnings) {
|
||||
// warnings already checked and cached in displaySet
|
||||
return displaySet.inconsistencyWarnings;
|
||||
@@ -543,101 +563,17 @@ const _checkForSeriesInconsistencesWarnings = async function(
|
||||
);
|
||||
}
|
||||
|
||||
if (displaySet.isModalitySupported === false) {
|
||||
inconsistencyWarnings.push('The datasets modality is not supported.');
|
||||
if (displaySet.isSOPClassUIDSupported === false) {
|
||||
inconsistencyWarnings.push('The datasets is not supported.');
|
||||
}
|
||||
displaySet.inconsistencyWarnings = inconsistencyWarnings;
|
||||
} else {
|
||||
const segMetadata = displaySet.metadata;
|
||||
if (!segMetadata) {
|
||||
return inconsistencyWarnings;
|
||||
}
|
||||
|
||||
const { referencedDisplaySet } = displaySet.getSourceDisplaySet(
|
||||
studies,
|
||||
false
|
||||
);
|
||||
if (!referencedDisplaySet) {
|
||||
return inconsistencyWarnings;
|
||||
}
|
||||
|
||||
const imageIds = referencedDisplaySet.images.map(image =>
|
||||
image.getImageId()
|
||||
);
|
||||
if (!imageIds || imageIds.length === 0) {
|
||||
return inconsistencyWarnings;
|
||||
}
|
||||
|
||||
for (
|
||||
let i = 0,
|
||||
groupsLen = segMetadata.PerFrameFunctionalGroupsSequence.length;
|
||||
i < groupsLen;
|
||||
++i
|
||||
) {
|
||||
const PerFrameFunctionalGroups =
|
||||
segMetadata.PerFrameFunctionalGroupsSequence[i];
|
||||
if (!PerFrameFunctionalGroups) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let SourceImageSequence = undefined;
|
||||
if (segMetadata.SourceImageSequence) {
|
||||
SourceImageSequence = segMetadata.SourceImageSequence[i];
|
||||
} else if (PerFrameFunctionalGroups.DerivationImageSequence) {
|
||||
SourceImageSequence =
|
||||
PerFrameFunctionalGroups.DerivationImageSequence.SourceImageSequence;
|
||||
}
|
||||
if (!SourceImageSequence) {
|
||||
if (inconsistencyWarnings.length === 0) {
|
||||
const warningMessage =
|
||||
'The segmentation ' +
|
||||
'has frames out of plane respect to the source images.';
|
||||
inconsistencyWarnings.push(warningMessage);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
const { ReferencedSOPInstanceUID } = SourceImageSequence;
|
||||
|
||||
const imageId = imageIds.find(imageId => {
|
||||
const sopCommonModule = cornerstone.metaData.get(
|
||||
'sopCommonModule',
|
||||
imageId
|
||||
);
|
||||
if (!sopCommonModule) {
|
||||
return;
|
||||
}
|
||||
|
||||
return sopCommonModule.sopInstanceUID === ReferencedSOPInstanceUID;
|
||||
});
|
||||
|
||||
if (!imageId) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const sourceImageMetadata = cornerstone.metaData.get('instance', imageId);
|
||||
if (
|
||||
segMetadata.Rows !== sourceImageMetadata.Rows ||
|
||||
segMetadata.Columns !== sourceImageMetadata.Columns
|
||||
) {
|
||||
const warningMessage =
|
||||
'The segmentation ' +
|
||||
'has frames with different geometry ' +
|
||||
'dimensions (Rows and Columns) respect to the source images.';
|
||||
inconsistencyWarnings.push(warningMessage);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (inconsistencyWarnings.length !== 0) {
|
||||
const warningMessage =
|
||||
'The segmentation format is not supported yet. ' +
|
||||
'The segmentation data (segments) could not be loaded.';
|
||||
inconsistencyWarnings.push(warningMessage);
|
||||
if (displaySet.loadError) {
|
||||
inconsistencyWarnings.push(displaySet.segLoadErrorMessagge);
|
||||
displaySet.inconsistencyWarnings = inconsistencyWarnings;
|
||||
}
|
||||
}
|
||||
|
||||
// cache the warnings
|
||||
displaySet.inconsistencyWarnings = inconsistencyWarnings;
|
||||
return inconsistencyWarnings;
|
||||
};
|
||||
|
||||
@@ -732,14 +668,13 @@ const _mapStudiesToThumbnails = function(studies, activeDisplaySetInstanceUID) {
|
||||
} else if (displaySet.images && displaySet.images.length) {
|
||||
const imageIndex = Math.floor(displaySet.images.length / 2);
|
||||
imageId = displaySet.images[imageIndex].getImageId();
|
||||
} else if (displaySet.isSOPClassUIDSupported === false) {
|
||||
altImageText = displaySet.SOPClassUIDNaturalized;
|
||||
} else {
|
||||
altImageText = displaySet.Modality ? displaySet.Modality : 'UN';
|
||||
}
|
||||
|
||||
const hasWarnings = _checkForSeriesInconsistencesWarnings(
|
||||
displaySet,
|
||||
studies
|
||||
);
|
||||
const hasWarnings = _checkForSeriesInconsistencesWarnings(displaySet);
|
||||
|
||||
const hasDerivedDisplaySets = _checkForDerivedDisplaySets(
|
||||
displaySet,
|
||||
|
||||
@@ -154,12 +154,25 @@ class ViewerMain extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
const { referencedDisplaySet } = displaySet.getSourceDisplaySet(
|
||||
const {
|
||||
referencedDisplaySet,
|
||||
activatedLabelmapPromise,
|
||||
} = displaySet.getSourceDisplaySet(
|
||||
this.props.studies,
|
||||
true,
|
||||
onDisplaySetLoadFailureHandler
|
||||
);
|
||||
displaySet = referencedDisplaySet;
|
||||
|
||||
activatedLabelmapPromise.then(activatedLabelmapIndex => {
|
||||
const selectionFired = new CustomEvent(
|
||||
'extensiondicomsegmentationsegselected',
|
||||
{
|
||||
detail: { activatedLabelmapIndex: activatedLabelmapIndex },
|
||||
}
|
||||
);
|
||||
document.dispatchEvent(selectionFired);
|
||||
});
|
||||
} else {
|
||||
displaySet = displaySet.getSourceDisplaySet(this.props.studies);
|
||||
}
|
||||
@@ -177,7 +190,7 @@ class ViewerMain extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
if (displaySet.isModalitySupported === false) {
|
||||
if (displaySet.isSOPClassUIDSupported === false) {
|
||||
const error = new Error('Modality not supported');
|
||||
const message = 'Modality not supported';
|
||||
LoggerService.error({ error, message });
|
||||
|
||||
@@ -36,7 +36,7 @@ function DicomStorePickerModal({
|
||||
user,
|
||||
url,
|
||||
},
|
||||
onClose
|
||||
onClose,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5449,10 +5449,10 @@ dateformat@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
|
||||
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
|
||||
|
||||
dcmjs@0.19.4:
|
||||
version "0.19.4"
|
||||
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.19.4.tgz#b2ce1cc1e672ead3fba12bafd2e8a655b398601a"
|
||||
integrity sha512-ZpOsuyBMcmDVPo0EtqztRGu1ARKMqIfbJGbtDxmBwxeE5SEHMQJvrZHhyLoxuS10R3w+jL2SJ0r7Dn9aSDZH1w==
|
||||
dcmjs@0.19.9:
|
||||
version "0.19.9"
|
||||
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.19.9.tgz#be500101b1f75a28ea9eb7ef845a8ed197355e76"
|
||||
integrity sha512-V+0tND+SPX5e7WFeLzeoooaTsZbiKmEP2i3AyERsojaXXfaDV5E+pta5IqId4Ok1yfRT5qfTFwLGstGT6nLplA==
|
||||
dependencies:
|
||||
"@babel/polyfill" "^7.8.3"
|
||||
"@babel/runtime" "^7.8.4"
|
||||
|
||||
Reference in new issue
Block a user