Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64385485b6 | ||
|
|
32828d9a6e | ||
|
|
b94d4782d1 | ||
|
|
36b47ce3a3 | ||
|
|
fe57c00577 | ||
|
|
21a3bc2ded | ||
|
|
b6b09f22fc | ||
|
|
64a4d60e52 | ||
|
|
0ba796c73c |
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,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [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.22",
|
||||
"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": {
|
||||
|
||||
@@ -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.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.12.17](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.16...@ohif/extension-vtk@1.12.17) (2022-03-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-vtk",
|
||||
"version": "1.12.17",
|
||||
"version": "1.12.21",
|
||||
"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,7 +53,7 @@
|
||||
"react-vtkjs-viewport": "^0.14.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ohif/core": "^2.16.12",
|
||||
"@ohif/core": "^2.16.16",
|
||||
"@ohif/ui": "^1.10.7",
|
||||
"cornerstone-tools": "^6.0.6",
|
||||
"cornerstone-wado-image-loader": "^4.1.0",
|
||||
|
||||
@@ -3,6 +3,41 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Update fetchPaletteColorLookupTableData: LUT Entries shall be 0 if the table entries value is 2^16 ([#2395](https://github.com/OHIF/Viewers/issues/2395)) ([0ba796c](https://github.com/OHIF/Viewers/commit/0ba796c73c5254f1bc5ac72c58fd06abf19d7102))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.16.12](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.11...@ohif/core@2.16.12) (2022-02-15)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/core",
|
||||
"version": "2.16.12",
|
||||
"version": "2.16.16",
|
||||
"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",
|
||||
|
||||
@@ -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;
|
||||
@@ -113,7 +113,7 @@ const _paletteColorCache = {
|
||||
};
|
||||
|
||||
function _getPaletteColor(server, paletteColorLookupTableData, lutDescriptor) {
|
||||
const numLutEntries = lutDescriptor[0];
|
||||
const numLutEntries = lutDescriptor[0] ? lutDescriptor[0] : 65536;
|
||||
const bits = lutDescriptor[2];
|
||||
|
||||
const arrayBufferToPaletteColorLUT = arraybuffer => {
|
||||
|
||||
@@ -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.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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.12.20](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.19...@ohif/viewer@4.12.20) (2022-03-14)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/viewer",
|
||||
"version": "4.12.20",
|
||||
"version": "4.12.24",
|
||||
"description": "OHIF Viewer",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
@@ -47,16 +47,16 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@ohif/core": "^2.16.12",
|
||||
"@ohif/extension-cornerstone": "^2.12.7",
|
||||
"@ohif/core": "^2.16.16",
|
||||
"@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.17",
|
||||
"@ohif/extension-vtk": "^1.12.21",
|
||||
"@ohif/i18n": "^0.53.0",
|
||||
"@ohif/ui": "^1.10.7",
|
||||
"@tanem/react-nprogress": "^1.1.25",
|
||||
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
@@ -546,98 +566,14 @@ const _checkForSeriesInconsistencesWarnings = async function(
|
||||
if (displaySet.isModalitySupported === false) {
|
||||
inconsistencyWarnings.push('The datasets modality 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;
|
||||
};
|
||||
|
||||
@@ -736,10 +672,7 @@ const _mapStudiesToThumbnails = function(studies, activeDisplaySetInstanceUID) {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -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