Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ede8a525a | ||
|
|
2c23818c86 | ||
|
|
fa4b03d62d | ||
|
|
698e900b85 | ||
|
|
b7d47383c5 | ||
|
|
6123741765 | ||
|
|
ab25be3520 | ||
|
|
950a54c704 | ||
|
|
4293c073f0 | ||
|
|
62a2cd5ff3 | ||
|
|
2d827c2a49 | ||
|
|
a8305772d0 |
No files matched your search
@@ -3,6 +3,28 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [2.8.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.8.1...@ohif/extension-cornerstone@2.8.2) (2020-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 🐛 Disable seg panel when data for seg unavailable ([#1732](https://github.com/OHIF/Viewers/issues/1732)) ([698e900](https://github.com/OHIF/Viewers/commit/698e900b85121d3c2a46747c443ef69fb7a8c95b)), closes [#1728](https://github.com/OHIF/Viewers/issues/1728)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.8.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.8.0...@ohif/extension-cornerstone@2.8.1) (2020-06-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 🐛 Infinite frame index change when quickly jumping between ([#1734](https://github.com/OHIF/Viewers/issues/1734)) ([a830577](https://github.com/OHIF/Viewers/commit/a8305772d0fbec506549ad7ea08504a8bc3a4f39)), closes [#1733](https://github.com/OHIF/Viewers/issues/1733)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.8.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.7.3...@ohif/extension-cornerstone@2.8.0) (2020-06-04)
|
# [2.8.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.7.3...@ohif/extension-cornerstone@2.8.0) (2020-06-04)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/extension-cornerstone",
|
"name": "@ohif/extension-cornerstone",
|
||||||
"version": "2.8.0",
|
"version": "2.8.2",
|
||||||
"description": "OHIF extension for Cornerstone",
|
"description": "OHIF extension for Cornerstone",
|
||||||
"author": "OHIF",
|
"author": "OHIF",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"cornerstone-math": "^0.1.8",
|
"cornerstone-math": "^0.1.8",
|
||||||
"cornerstone-tools": "4.15.1",
|
"cornerstone-tools": "4.15.1",
|
||||||
"cornerstone-wado-image-loader": "^3.1.0",
|
"cornerstone-wado-image-loader": "^3.1.0",
|
||||||
"dcmjs": "^0.12.3",
|
"dcmjs": "0.13.0",
|
||||||
"dicom-parser": "^1.8.3",
|
"dicom-parser": "^1.8.3",
|
||||||
"hammerjs": "^2.0.8",
|
"hammerjs": "^2.0.8",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
@@ -51,6 +51,6 @@
|
|||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"lodash.throttle": "^4.1.1",
|
"lodash.throttle": "^4.1.1",
|
||||||
"react-cornerstone-viewport": "2.3.8"
|
"react-cornerstone-viewport": "2.3.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,6 @@ import ConnectedCornerstoneViewport from './ConnectedCornerstoneViewport';
|
|||||||
import OHIF from '@ohif/core';
|
import OHIF from '@ohif/core';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import cornerstone from 'cornerstone-core';
|
import cornerstone from 'cornerstone-core';
|
||||||
import debounce from 'lodash.debounce';
|
|
||||||
|
|
||||||
const { StackManager } = OHIF.utils;
|
const { StackManager } = OHIF.utils;
|
||||||
|
|
||||||
@@ -216,9 +215,10 @@ class OHIFCornerstoneViewport extends Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const debouncedNewImageHandler = debounce(({ currentImageIdIndex, sopInstanceUid }) => {
|
const newImageHandler = ({ currentImageIdIndex, sopInstanceUid }) => {
|
||||||
const { displaySet } = this.props.viewportData;
|
const { displaySet } = this.props.viewportData;
|
||||||
const { StudyInstanceUID } = displaySet;
|
const { StudyInstanceUID } = displaySet;
|
||||||
|
|
||||||
if (currentImageIdIndex > 0) {
|
if (currentImageIdIndex > 0) {
|
||||||
this.props.onNewImage({
|
this.props.onNewImage({
|
||||||
StudyInstanceUID,
|
StudyInstanceUID,
|
||||||
@@ -227,7 +227,7 @@ class OHIFCornerstoneViewport extends Component {
|
|||||||
activeViewportIndex: viewportIndex,
|
activeViewportIndex: viewportIndex,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 700);
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -235,7 +235,8 @@ class OHIFCornerstoneViewport extends Component {
|
|||||||
viewportIndex={viewportIndex}
|
viewportIndex={viewportIndex}
|
||||||
imageIds={imageIds}
|
imageIds={imageIds}
|
||||||
imageIdIndex={currentImageIdIndex}
|
imageIdIndex={currentImageIdIndex}
|
||||||
onNewImage={debouncedNewImageHandler}
|
onNewImage={newImageHandler}
|
||||||
|
onNewImageDebounceTime={700}
|
||||||
// ~~ Connected (From REDUX)
|
// ~~ Connected (From REDUX)
|
||||||
// frameRate={frameRate}
|
// frameRate={frameRate}
|
||||||
// isPlaying={false}
|
// isPlaying={false}
|
||||||
|
|||||||
@@ -3,6 +3,17 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.2.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.2.2...@ohif/extension-dicom-html@1.2.3) (2020-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 🐛 Disable seg panel when data for seg unavailable ([#1732](https://github.com/OHIF/Viewers/issues/1732)) ([698e900](https://github.com/OHIF/Viewers/commit/698e900b85121d3c2a46747c443ef69fb7a8c95b)), closes [#1728](https://github.com/OHIF/Viewers/issues/1728)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.2.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.2.1...@ohif/extension-dicom-html@1.2.2) (2020-05-04)
|
## [1.2.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.2.1...@ohif/extension-dicom-html@1.2.2) (2020-05-04)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/extension-dicom-html",
|
"name": "@ohif/extension-dicom-html",
|
||||||
"version": "1.2.2",
|
"version": "1.2.3",
|
||||||
"description": "OHIF extension for rendering structured reports to HTML",
|
"description": "OHIF extension for rendering structured reports to HTML",
|
||||||
"author": "OHIF",
|
"author": "OHIF",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@ohif/core": "^0.50.0",
|
"@ohif/core": "^0.50.0",
|
||||||
"dcmjs": "^0.12.3",
|
"dcmjs": "0.13.0",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
"react": "^16.8.6",
|
"react": "^16.8.6",
|
||||||
"react-dom": "^16.8.6"
|
"react-dom": "^16.8.6"
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [0.1.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-p10-downloader@0.1.0...@ohif/extension-dicom-p10-downloader@0.1.1) (2020-06-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/extension-dicom-p10-downloader
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [0.1.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-p10-downloader@0.0.2...@ohif/extension-dicom-p10-downloader@0.1.0) (2020-04-23)
|
# [0.1.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-p10-downloader@0.0.2...@ohif/extension-dicom-p10-downloader@0.1.0) (2020-04-23)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/extension-dicom-p10-downloader",
|
"name": "@ohif/extension-dicom-p10-downloader",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"description": "OHIF extension for downloading DICOM P10 files",
|
"description": "OHIF extension for downloading DICOM P10 files",
|
||||||
"author": "OHIF",
|
"author": "OHIF",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import OHIF from '@ohif/core';
|
|||||||
import {
|
import {
|
||||||
save,
|
save,
|
||||||
getDicomWebClientFromContext,
|
getDicomWebClientFromContext,
|
||||||
|
getStudyInstanceUIDFromStudies,
|
||||||
getSOPInstanceReferenceFromActiveViewport,
|
getSOPInstanceReferenceFromActiveViewport,
|
||||||
getSOPInstanceReferencesFromViewports,
|
getSOPInstanceReferencesFromViewports,
|
||||||
} from './utils';
|
} from './utils';
|
||||||
@@ -41,6 +42,14 @@ export function getCommands(context) {
|
|||||||
listOfUIDs
|
listOfUIDs
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
downloadAndZipStudy({ servers, studies, progress }) {
|
||||||
|
const dicomWebClient = getDicomWebClientFromContext(context, servers);
|
||||||
|
const listOfUIDs = getStudyInstanceUIDFromStudies(studies);
|
||||||
|
return save(
|
||||||
|
_downloadAndZip(dicomWebClient, listOfUIDs, { progress }),
|
||||||
|
listOfUIDs
|
||||||
|
);
|
||||||
|
},
|
||||||
downloadAndZipSeriesOnViewports({ servers, viewports, progress }) {
|
downloadAndZipSeriesOnViewports({ servers, viewports, progress }) {
|
||||||
const dicomWebClient = getDicomWebClientFromContext(context, servers);
|
const dicomWebClient = getDicomWebClientFromContext(context, servers);
|
||||||
const listOfUIDs = getSOPInstanceReferencesFromViewports(viewports);
|
const listOfUIDs = getSOPInstanceReferencesFromViewports(viewports);
|
||||||
@@ -64,6 +73,11 @@ export function getCommands(context) {
|
|||||||
commandFn: queue.bindSafe(actions.downloadAndZip, error),
|
commandFn: queue.bindSafe(actions.downloadAndZip, error),
|
||||||
storeContexts: ['servers'],
|
storeContexts: ['servers'],
|
||||||
},
|
},
|
||||||
|
downloadAndZipStudy: {
|
||||||
|
commandFn: queue.bindSafe(actions.downloadAndZipStudy, error),
|
||||||
|
storeContexts: ['servers', 'studies'],
|
||||||
|
options: { progress },
|
||||||
|
},
|
||||||
downloadAndZipSeriesOnViewports: {
|
downloadAndZipSeriesOnViewports: {
|
||||||
commandFn: queue.bindSafe(actions.downloadAndZipSeriesOnViewports, error),
|
commandFn: queue.bindSafe(actions.downloadAndZipSeriesOnViewports, error),
|
||||||
storeContexts: ['servers', 'viewports'],
|
storeContexts: ['servers', 'viewports'],
|
||||||
|
|||||||
@@ -100,11 +100,16 @@ function save(promise, listOfUIDs) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getStudyInstanceUIDFromStudies(studies) {
|
||||||
|
return Object.keys(Object(Object(studies).studyData)).slice(0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
save,
|
save,
|
||||||
validDicomUid,
|
validDicomUid,
|
||||||
getDicomWebClientFromConfig,
|
getDicomWebClientFromConfig,
|
||||||
getDicomWebClientFromContext,
|
getDicomWebClientFromContext,
|
||||||
|
getStudyInstanceUIDFromStudies,
|
||||||
getSOPInstanceReferenceFromActiveViewport,
|
getSOPInstanceReferenceFromActiveViewport,
|
||||||
getSOPInstanceReferencesFromViewports,
|
getSOPInstanceReferencesFromViewports,
|
||||||
};
|
};
|
||||||
@@ -3,6 +3,17 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [0.2.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.2.0...@ohif/extension-dicom-rt@0.2.1) (2020-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 🐛 Disable seg panel when data for seg unavailable ([#1732](https://github.com/OHIF/Viewers/issues/1732)) ([698e900](https://github.com/OHIF/Viewers/commit/698e900b85121d3c2a46747c443ef69fb7a8c95b)), closes [#1728](https://github.com/OHIF/Viewers/issues/1728)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [0.2.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.1.4...@ohif/extension-dicom-rt@0.2.0) (2020-06-04)
|
# [0.2.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.1.4...@ohif/extension-dicom-rt@0.2.0) (2020-06-04)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/extension-dicom-rt",
|
"name": "@ohif/extension-dicom-rt",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"description": "OHIF extension for rendering DICOM RTSTRUCTs on top of cornerstone images.",
|
"description": "OHIF extension for rendering DICOM RTSTRUCTs on top of cornerstone images.",
|
||||||
"author": "OHIF",
|
"author": "OHIF",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
"@ohif/core": "^0.50.0",
|
"@ohif/core": "^0.50.0",
|
||||||
"cornerstone-core": "^2.2.8",
|
"cornerstone-core": "^2.2.8",
|
||||||
"cornerstone-tools": "4.15.1",
|
"cornerstone-tools": "4.15.1",
|
||||||
"dcmjs": "^0.12.3",
|
"dcmjs": "0.13.0",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
"react": "^16.8.6",
|
"react": "^16.8.6",
|
||||||
"react-dom": "^16.8.6"
|
"react-dom": "^16.8.6"
|
||||||
|
|||||||
@@ -3,6 +3,17 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [0.3.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.3.0...@ohif/extension-dicom-segmentation@0.3.1) (2020-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 🐛 Disable seg panel when data for seg unavailable ([#1732](https://github.com/OHIF/Viewers/issues/1732)) ([698e900](https://github.com/OHIF/Viewers/commit/698e900b85121d3c2a46747c443ef69fb7a8c95b)), closes [#1728](https://github.com/OHIF/Viewers/issues/1728)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [0.3.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.2.6...@ohif/extension-dicom-segmentation@0.3.0) (2020-06-04)
|
# [0.3.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.2.6...@ohif/extension-dicom-segmentation@0.3.0) (2020-06-04)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/extension-dicom-segmentation",
|
"name": "@ohif/extension-dicom-segmentation",
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"description": "OHIF extension for viewing segmentations in the 2D MPR view",
|
"description": "OHIF extension for viewing segmentations in the 2D MPR view",
|
||||||
"author": "OHIF",
|
"author": "OHIF",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
"@ohif/core": "^0.50.0",
|
"@ohif/core": "^0.50.0",
|
||||||
"cornerstone-core": "^2.2.8",
|
"cornerstone-core": "^2.2.8",
|
||||||
"cornerstone-tools": "4.15.1",
|
"cornerstone-tools": "4.15.1",
|
||||||
"dcmjs": "^0.12.2",
|
"dcmjs": "0.13.0",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
"react": "^16.8.6",
|
"react": "^16.8.6",
|
||||||
"react-dom": "^16.8.6"
|
"react-dom": "^16.8.6"
|
||||||
|
|||||||
@@ -8,6 +8,11 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dcmseg-segmentation-panel.disabled {
|
||||||
|
opacity: 0.6;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.dcmseg-segmentation-panel h3 {
|
.dcmseg-segmentation-panel h3 {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
|||||||
+41
-34
@@ -77,7 +77,8 @@ const SegmentationPanel = ({
|
|||||||
labelmapList: [],
|
labelmapList: [],
|
||||||
segmentList: [],
|
segmentList: [],
|
||||||
cachedSegmentsProperties: [],
|
cachedSegmentsProperties: [],
|
||||||
isLoading: false
|
isLoading: false,
|
||||||
|
isDisabled: true
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -139,39 +140,45 @@ const SegmentationPanel = ({
|
|||||||
const refreshSegmentations = useCallback(() => {
|
const refreshSegmentations = useCallback(() => {
|
||||||
const module = cornerstoneTools.getModule('segmentation');
|
const module = cornerstoneTools.getModule('segmentation');
|
||||||
const activeViewport = viewports[activeIndex];
|
const activeViewport = viewports[activeIndex];
|
||||||
const studyMetadata = studyMetadataManager.get(
|
|
||||||
activeViewport.StudyInstanceUID
|
const isDisabled = !activeViewport || !activeViewport.StudyInstanceUID;
|
||||||
);
|
if (!isDisabled) {
|
||||||
const firstImageId = studyMetadata.getFirstImageId(
|
const studyMetadata = studyMetadataManager.get(
|
||||||
activeViewport.displaySetInstanceUID
|
activeViewport.StudyInstanceUID
|
||||||
);
|
|
||||||
const brushStackState = module.state.series[firstImageId];
|
|
||||||
if (brushStackState) {
|
|
||||||
const labelmap3D =
|
|
||||||
brushStackState.labelmaps3D[brushStackState.activeLabelmapIndex];
|
|
||||||
const labelmapList = getLabelmapList(
|
|
||||||
brushStackState,
|
|
||||||
firstImageId,
|
|
||||||
activeViewport
|
|
||||||
);
|
);
|
||||||
const segmentList = getSegmentList(
|
const firstImageId = studyMetadata.getFirstImageId(
|
||||||
labelmap3D,
|
activeViewport.displaySetInstanceUID
|
||||||
firstImageId,
|
|
||||||
brushStackState
|
|
||||||
);
|
);
|
||||||
setState(state => ({
|
const brushStackState = module.state.series[firstImageId];
|
||||||
...state,
|
if (brushStackState) {
|
||||||
brushStackState,
|
const labelmap3D =
|
||||||
selectedSegmentation: brushStackState.activeLabelmapIndex,
|
brushStackState.labelmaps3D[brushStackState.activeLabelmapIndex];
|
||||||
labelmapList,
|
const labelmapList = getLabelmapList(
|
||||||
segmentList,
|
brushStackState,
|
||||||
}));
|
firstImageId,
|
||||||
} else {
|
activeViewport
|
||||||
setState(state => ({
|
);
|
||||||
...state,
|
const segmentList = getSegmentList(
|
||||||
labelmapList: [],
|
labelmap3D,
|
||||||
segmentList: [],
|
firstImageId,
|
||||||
}));
|
brushStackState
|
||||||
|
);
|
||||||
|
setState(state => ({
|
||||||
|
...state,
|
||||||
|
brushStackState,
|
||||||
|
selectedSegmentation: brushStackState.activeLabelmapIndex,
|
||||||
|
labelmapList,
|
||||||
|
segmentList,
|
||||||
|
isDisabled
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
setState(state => ({
|
||||||
|
...state,
|
||||||
|
labelmapList: [],
|
||||||
|
segmentList: [],
|
||||||
|
isDisabled
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
viewports,
|
viewports,
|
||||||
@@ -181,7 +188,7 @@ const SegmentationPanel = ({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
refreshSegmentations();
|
refreshSegmentations();
|
||||||
}, [viewports, activeIndex, state.selectedSegmentation, activeContexts, state.isLoading]);
|
}, [viewports, activeIndex, isOpen, state.selectedSegmentation, activeContexts, state.isLoading]);
|
||||||
|
|
||||||
/* Handle open/closed panel behaviour */
|
/* Handle open/closed panel behaviour */
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -507,7 +514,7 @@ const SegmentationPanel = ({
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<div className="dcmseg-segmentation-panel">
|
<div className={`dcmseg-segmentation-panel ${state.isDisabled && 'disabled'}`}>
|
||||||
<Icon
|
<Icon
|
||||||
className="cog-icon"
|
className="cog-icon"
|
||||||
name="cog"
|
name="cog"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default {
|
|||||||
return toolbarModule;
|
return toolbarModule;
|
||||||
},
|
},
|
||||||
getPanelModule({ commandsManager, api, servicesManager }) {
|
getPanelModule({ commandsManager, api, servicesManager }) {
|
||||||
const { UINotificationService } = servicesManager;
|
const { UINotificationService } = servicesManager.services;
|
||||||
|
|
||||||
const ExtendedSegmentationPanel = props => {
|
const ExtendedSegmentationPanel = props => {
|
||||||
const { activeContexts } = api.hooks.useAppContext();
|
const { activeContexts } = api.hooks.useAppContext();
|
||||||
|
|||||||
@@ -3,6 +3,41 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.6.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.3...@ohif/extension-vtk@1.6.4) (2020-06-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/extension-vtk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.6.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.2...@ohif/extension-vtk@1.6.3) (2020-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 🐛 Disable seg panel when data for seg unavailable ([#1732](https://github.com/OHIF/Viewers/issues/1732)) ([698e900](https://github.com/OHIF/Viewers/commit/698e900b85121d3c2a46747c443ef69fb7a8c95b)), closes [#1728](https://github.com/OHIF/Viewers/issues/1728)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.6.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.1...@ohif/extension-vtk@1.6.2) (2020-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/extension-vtk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.6.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.0...@ohif/extension-vtk@1.6.1) (2020-06-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/extension-vtk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [1.6.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.5.6...@ohif/extension-vtk@1.6.0) (2020-06-04)
|
# [1.6.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.5.6...@ohif/extension-vtk@1.6.0) (2020-06-04)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/extension-vtk",
|
"name": "@ohif/extension-vtk",
|
||||||
"version": "1.6.0",
|
"version": "1.6.4",
|
||||||
"description": "OHIF extension for VTK.js",
|
"description": "OHIF extension for VTK.js",
|
||||||
"author": "OHIF",
|
"author": "OHIF",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
"cornerstone-core": "^2.2.8",
|
"cornerstone-core": "^2.2.8",
|
||||||
"cornerstone-tools": "4.15.1",
|
"cornerstone-tools": "4.15.1",
|
||||||
"cornerstone-wado-image-loader": "^3.1.0",
|
"cornerstone-wado-image-loader": "^3.1.0",
|
||||||
"dcmjs": "^0.12.2",
|
"dcmjs": "0.13.0",
|
||||||
"dicom-parser": "^1.8.3",
|
"dicom-parser": "^1.8.3",
|
||||||
"i18next": "^17.0.3",
|
"i18next": "^17.0.3",
|
||||||
"i18next-browser-languagedetector": "^3.0.1",
|
"i18next-browser-languagedetector": "^3.0.1",
|
||||||
@@ -53,8 +53,8 @@
|
|||||||
"react-vtkjs-viewport": "^0.9.0"
|
"react-vtkjs-viewport": "^0.9.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ohif/core": "^2.9.6",
|
"@ohif/core": "^2.9.9",
|
||||||
"@ohif/ui": "^1.5.0",
|
"@ohif/ui": "^1.5.1",
|
||||||
"cornerstone-tools": "4.15.1",
|
"cornerstone-tools": "4.15.1",
|
||||||
"cornerstone-wado-image-loader": "^3.1.0",
|
"cornerstone-wado-image-loader": "^3.1.0",
|
||||||
"dicom-parser": "^1.8.3",
|
"dicom-parser": "^1.8.3",
|
||||||
|
|||||||
@@ -3,6 +3,33 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [2.9.9](https://github.com/OHIF/Viewers/compare/@ohif/core@2.9.8...@ohif/core@2.9.9) (2020-06-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/core
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.9.8](https://github.com/OHIF/Viewers/compare/@ohif/core@2.9.7...@ohif/core@2.9.8) (2020-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 🐛 Disable seg panel when data for seg unavailable ([#1732](https://github.com/OHIF/Viewers/issues/1732)) ([698e900](https://github.com/OHIF/Viewers/commit/698e900b85121d3c2a46747c443ef69fb7a8c95b)), closes [#1728](https://github.com/OHIF/Viewers/issues/1728)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.9.7](https://github.com/OHIF/Viewers/compare/@ohif/core@2.9.6...@ohif/core@2.9.7) (2020-06-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/core
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [2.9.6](https://github.com/OHIF/Viewers/compare/@ohif/core@2.9.5...@ohif/core@2.9.6) (2020-05-14)
|
## [2.9.6](https://github.com/OHIF/Viewers/compare/@ohif/core@2.9.5...@ohif/core@2.9.6) (2020-05-14)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/core",
|
"name": "@ohif/core",
|
||||||
"version": "2.9.6",
|
"version": "2.9.9",
|
||||||
"description": "Generic business logic for web-based medical imaging applications",
|
"description": "Generic business logic for web-based medical imaging applications",
|
||||||
"author": "OHIF Core Team",
|
"author": "OHIF Core Team",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.5.5",
|
"@babel/runtime": "^7.5.5",
|
||||||
"ajv": "^6.10.0",
|
"ajv": "^6.10.0",
|
||||||
"dcmjs": "^0.12.2",
|
"dcmjs": "0.13.0",
|
||||||
"dicomweb-client": "^0.6.0",
|
"dicomweb-client": "^0.6.0",
|
||||||
"immer": "6.0.2",
|
"immer": "6.0.2",
|
||||||
"isomorphic-base64": "^1.0.2",
|
"isomorphic-base64": "^1.0.2",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const findMostRecentStructuredReport = studies => {
|
|||||||
// Skip series that may not have instances yet
|
// Skip series that may not have instances yet
|
||||||
// This can happen if we have retrieved just the initial
|
// This can happen if we have retrieved just the initial
|
||||||
// details about the series via QIDO-RS, but not the full metadata
|
// details about the series via QIDO-RS, but not the full metadata
|
||||||
if (!series.instances.length) {
|
if (!series.instances || !series.instances.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export class StudyMetadata extends Metadata {
|
|||||||
Object.defineProperty(this, 'studyInstanceUID', {
|
Object.defineProperty(this, 'studyInstanceUID', {
|
||||||
configurable: false,
|
configurable: false,
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
get: function () {
|
get: function() {
|
||||||
return this.getStudyInstanceUID();
|
return this.getStudyInstanceUID();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -215,6 +215,14 @@ export class StudyMetadata extends Metadata {
|
|||||||
// TODO -> Get x Modality by referencedSeriesInstanceUid, FoR, etc.
|
// TODO -> Get x Modality by referencedSeriesInstanceUid, FoR, etc.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the displaySets to the studies list of derived displaySets.
|
||||||
|
* @param {array} displaySets The displaySets array to append to the derived displaysets list.
|
||||||
|
*/
|
||||||
|
_addDerivedDisplaySets(displaySets) {
|
||||||
|
displaySets.map(displaySet => this._derivedDisplaySets.push(displaySet));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of derived datasets in the study, filtered by the given filter.
|
* Returns a list of derived datasets in the study, filtered by the given filter.
|
||||||
* @param {object} filter An object containing search filters
|
* @param {object} filter An object containing search filters
|
||||||
@@ -263,7 +271,7 @@ export class StudyMetadata extends Metadata {
|
|||||||
filteredDerivedDisplaySets = filteredDerivedDisplaySets.filter(
|
filteredDerivedDisplaySets = filteredDerivedDisplaySets.filter(
|
||||||
displaySet =>
|
displaySet =>
|
||||||
displaySet.ReferencedFrameOfReferenceUID ===
|
displaySet.ReferencedFrameOfReferenceUID ===
|
||||||
ReferencedFrameOfReferenceUID
|
referencedFrameOfReferenceUID
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,12 @@ const defaultState = {
|
|||||||
|
|
||||||
const servers = (state = defaultState, action) => {
|
const servers = (state = defaultState, action) => {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case 'SET_STUDY_DATA':
|
case 'SET_STUDY_DATA': {
|
||||||
const updatedStudyData = cloneDeep(state).studyData;
|
const updatedStudyData = cloneDeep(state.studyData);
|
||||||
updatedStudyData[action.StudyInstanceUID] = action.data;
|
updatedStudyData[action.StudyInstanceUID] = cloneDeep(action.data);
|
||||||
|
|
||||||
return Object.assign({}, state, { studyData: updatedStudyData });
|
return Object.assign({}, state, { studyData: updatedStudyData });
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.5.1](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.5.0...@ohif/ui@1.5.1) (2020-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/ui
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [1.5.0](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.4.4...@ohif/ui@1.5.0) (2020-06-04)
|
# [1.5.0](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.4.4...@ohif/ui@1.5.0) (2020-06-04)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/ui",
|
"name": "@ohif/ui",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"description": "A set of React components for Medical Imaging Viewers",
|
"description": "A set of React components for Medical Imaging Viewers",
|
||||||
"author": "OHIF Contributors",
|
"author": "OHIF Contributors",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -51,3 +51,9 @@ button.close
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
||||||
|
.btn-sm
|
||||||
|
padding: .25rem .5rem;
|
||||||
|
font-size: .875rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-radius: .2rem;
|
||||||
@@ -3,6 +3,60 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [4.2.6](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.2.5...@ohif/viewer@4.2.6) (2020-06-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/viewer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.2.5](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.2.4...@ohif/viewer@4.2.5) (2020-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 🐛 Disable seg panel when data for seg unavailable ([#1732](https://github.com/OHIF/Viewers/issues/1732)) ([698e900](https://github.com/OHIF/Viewers/commit/698e900b85121d3c2a46747c443ef69fb7a8c95b)), closes [#1728](https://github.com/OHIF/Viewers/issues/1728)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.2.4](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.2.3...@ohif/viewer@4.2.4) (2020-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* OIDC Redirect erases query parameters ([#1773](https://github.com/OHIF/Viewers/issues/1773)) ([6123741](https://github.com/OHIF/Viewers/commit/6123741765e81d0bea8fbd5dbb0f310aaca0fb33))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.2.3](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.2.2...@ohif/viewer@4.2.3) (2020-06-05)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/viewer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.2.2](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.2.1...@ohif/viewer@4.2.2) (2020-06-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/viewer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.2.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.2.0...@ohif/viewer@4.2.1) (2020-06-04)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/viewer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [4.2.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.1.0...@ohif/viewer@4.2.0) (2020-06-04)
|
# [4.2.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.1.0...@ohif/viewer@4.2.0) (2020-06-04)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ describe('OHIF Study List', function() {
|
|||||||
//Wait result list to be displayed
|
//Wait result list to be displayed
|
||||||
cy.waitStudyList();
|
cy.waitStudyList();
|
||||||
cy.get('@searchResult').should($list => {
|
cy.get('@searchResult').should($list => {
|
||||||
expect($list.length).to.be.eq(15); // TODO: Where are you hiding MISTER^MR?
|
// TODO: Why are we facing some inconsistency with this result? ¯\_(ツ)_/¯
|
||||||
|
expect($list.length).to.be.eq(15);
|
||||||
expect($list).to.contain('MR');
|
expect($list).to.contain('MR');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -147,7 +148,8 @@ describe('OHIF Study List', function() {
|
|||||||
//Wait result list to be displayed
|
//Wait result list to be displayed
|
||||||
cy.waitStudyList();
|
cy.waitStudyList();
|
||||||
cy.get('@searchResult').should($list => {
|
cy.get('@searchResult').should($list => {
|
||||||
expect($list.length).to.be.eq(15); // TODO: Where are you hiding MISTER^MR?
|
// TODO: Why are we facing some inconsistency with this result? ¯\_(ツ)_/¯
|
||||||
|
expect($list.length).to.be.eq(15);
|
||||||
expect($list).to.contain('MR');
|
expect($list).to.contain('MR');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ Cypress.Commands.add('waitStudyList', () => {
|
|||||||
|
|
||||||
Cypress.Commands.add('waitVTKLoading', () => {
|
Cypress.Commands.add('waitVTKLoading', () => {
|
||||||
// Wait for start loading
|
// Wait for start loading
|
||||||
cy.get('[data-cy="viewprt-grid"]', { timeout: 10000 }).should($grid => {
|
cy.get('[data-cy="viewprt-grid"]', { timeout: 20000 }).should($grid => {
|
||||||
expect($grid).to.contain.text('Loading');
|
expect($grid).to.contain.text('Loading');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/viewer",
|
"name": "@ohif/viewer",
|
||||||
"version": "4.2.0",
|
"version": "4.2.6",
|
||||||
"description": "OHIF Viewer",
|
"description": "OHIF Viewer",
|
||||||
"author": "OHIF Contributors",
|
"author": "OHIF Contributors",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -48,18 +48,18 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.5.5",
|
"@babel/runtime": "^7.5.5",
|
||||||
"@ohif/core": "^2.9.6",
|
"@ohif/core": "^2.9.9",
|
||||||
"@ohif/extension-cornerstone": "^2.8.0",
|
"@ohif/extension-cornerstone": "^2.8.2",
|
||||||
"@ohif/extension-dicom-html": "^1.2.2",
|
"@ohif/extension-dicom-html": "^1.2.3",
|
||||||
"@ohif/extension-dicom-microscopy": "^0.51.0",
|
"@ohif/extension-dicom-microscopy": "^0.51.0",
|
||||||
"@ohif/extension-dicom-p10-downloader": "^0.1.0",
|
"@ohif/extension-dicom-p10-downloader": "^0.1.1",
|
||||||
"@ohif/extension-dicom-pdf": "^1.0.3",
|
"@ohif/extension-dicom-pdf": "^1.0.3",
|
||||||
"@ohif/extension-dicom-rt": "^0.2.0",
|
"@ohif/extension-dicom-rt": "^0.2.1",
|
||||||
"@ohif/extension-dicom-segmentation": "^0.3.0",
|
"@ohif/extension-dicom-segmentation": "^0.3.1",
|
||||||
"@ohif/extension-lesion-tracker": "^0.2.0",
|
"@ohif/extension-lesion-tracker": "^0.2.0",
|
||||||
"@ohif/extension-vtk": "^1.6.0",
|
"@ohif/extension-vtk": "^1.6.4",
|
||||||
"@ohif/i18n": "^0.52.8",
|
"@ohif/i18n": "^0.52.8",
|
||||||
"@ohif/ui": "^1.5.0",
|
"@ohif/ui": "^1.5.1",
|
||||||
"@tanem/react-nprogress": "^1.1.25",
|
"@tanem/react-nprogress": "^1.1.25",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"core-js": "^3.2.1",
|
"core-js": "^3.2.1",
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
"cornerstone-math": "^0.1.8",
|
"cornerstone-math": "^0.1.8",
|
||||||
"cornerstone-tools": "4.15.1",
|
"cornerstone-tools": "4.15.1",
|
||||||
"cornerstone-wado-image-loader": "^3.1.0",
|
"cornerstone-wado-image-loader": "^3.1.0",
|
||||||
"dcmjs": "^0.12.2",
|
"dcmjs": "0.13.0",
|
||||||
"dicom-parser": "^1.8.3",
|
"dicom-parser": "^1.8.3",
|
||||||
"dicomweb-client": "^0.4.4",
|
"dicomweb-client": "^0.4.4",
|
||||||
"hammerjs": "^2.0.8",
|
"hammerjs": "^2.0.8",
|
||||||
|
|||||||
@@ -52,10 +52,13 @@ class OHIFStandaloneViewer extends Component {
|
|||||||
const { appConfig = {} } = this.context;
|
const { appConfig = {} } = this.context;
|
||||||
const userNotLoggedIn = userManager && (!user || user.expired);
|
const userNotLoggedIn = userManager && (!user || user.expired);
|
||||||
if (userNotLoggedIn) {
|
if (userNotLoggedIn) {
|
||||||
const pathname = this.props.location.pathname;
|
const { pathname, search } = this.props.location;
|
||||||
|
|
||||||
if (pathname !== '/callback') {
|
if (pathname !== '/callback') {
|
||||||
sessionStorage.setItem('ohif-redirect-to', pathname);
|
sessionStorage.setItem(
|
||||||
|
'ohif-redirect-to',
|
||||||
|
JSON.stringify({ pathname, search })
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -103,12 +106,21 @@ class OHIFStandaloneViewer extends Component {
|
|||||||
|
|
||||||
userManager.removeUser().then(() => {
|
userManager.removeUser().then(() => {
|
||||||
if (targetLinkUri !== null) {
|
if (targetLinkUri !== null) {
|
||||||
|
const ohifRedirectTo = {
|
||||||
|
pathname: new URL(targetLinkUri).pathname,
|
||||||
|
};
|
||||||
sessionStorage.setItem(
|
sessionStorage.setItem(
|
||||||
'ohif-redirect-to',
|
'ohif-redirect-to',
|
||||||
new URL(targetLinkUri).pathname
|
JSON.stringify(ohifRedirectTo)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
sessionStorage.setItem('ohif-redirect-to', '/');
|
const ohifRedirectTo = {
|
||||||
|
pathname: '/',
|
||||||
|
};
|
||||||
|
sessionStorage.setItem(
|
||||||
|
'ohif-redirect-to',
|
||||||
|
JSON.stringify(ohifRedirectTo)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loginHint !== null) {
|
if (loginHint !== null) {
|
||||||
@@ -191,10 +203,10 @@ class OHIFStandaloneViewer extends Component {
|
|||||||
{match === null ? (
|
{match === null ? (
|
||||||
<></>
|
<></>
|
||||||
) : (
|
) : (
|
||||||
<ErrorBoundary context={match.url}>
|
<ErrorBoundary context={match.url}>
|
||||||
<Component match={match} location={this.props.location} />
|
<Component match={match} location={this.props.location} />
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
)}
|
)}
|
||||||
</CSSTransition>
|
</CSSTransition>
|
||||||
)}
|
)}
|
||||||
</Route>
|
</Route>
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
.ErrorBoundaryDialogTitle {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ErrorBoundaryDialogButton {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ErrorBoundaryDialogIcon {
|
||||||
|
margin-right: 5px;
|
||||||
|
width: 10px;
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ErrorBoundaryDialogIcon.opened {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
@@ -1,26 +1,46 @@
|
|||||||
import React from 'react';
|
import React, { useState } from 'react';
|
||||||
|
import classnames from 'classnames';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { ErrorBoundary } from '@ohif/ui';
|
import { ErrorBoundary, Icon } from '@ohif/ui';
|
||||||
import { servicesManager } from './../../App';
|
import { servicesManager } from './../../App';
|
||||||
|
|
||||||
|
import './ErrorBoundaryDialog.css';
|
||||||
|
|
||||||
const { UIModalService } = servicesManager.services;
|
const { UIModalService } = servicesManager.services;
|
||||||
|
|
||||||
const ErrorBoundaryDialog = ({ context, children }) => {
|
const ErrorBoundaryDialog = ({ context, children }) => {
|
||||||
const handleOnError = (error, componentStack) => {
|
const handleOnError = (error, componentStack) => {
|
||||||
const ErrorDialog = () => (
|
const ErrorDialog = () => {
|
||||||
<div className="ErrorFallback" role="alert">
|
const [open, setOpen] = useState(false);
|
||||||
<div>
|
|
||||||
<h3>
|
return (
|
||||||
{context}: <span>{error.message}</span>
|
<div className="ErrorFallback" role="alert">
|
||||||
</h3>
|
<div className="ErrorBoundaryDialog">
|
||||||
|
<h3 className="ErrorBoundaryDialogTitle">
|
||||||
|
{context}: <span>{error.message}</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
className="btn btn-primary btn-sm ErrorBoundaryDialogButton"
|
||||||
|
onClick={() => setOpen(s => !s)}
|
||||||
|
>
|
||||||
|
<Icon
|
||||||
|
name="chevron-down"
|
||||||
|
className={classnames('ErrorBoundaryDialogIcon', {
|
||||||
|
opened: open,
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
Stack Trace
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{open && <pre>{componentStack}</pre>}
|
||||||
</div>
|
</div>
|
||||||
<pre>{componentStack}</pre>
|
);
|
||||||
</div>
|
};
|
||||||
);
|
|
||||||
|
|
||||||
UIModalService.show({
|
UIModalService.show({
|
||||||
content: ErrorDialog,
|
content: ErrorDialog,
|
||||||
title: `${context}: ${error.message}`,
|
title: `Something went wrong in ${context}`,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { connect } from 'react-redux';
|
|||||||
import ViewerRetrieveStudyData from './ViewerRetrieveStudyData.js';
|
import ViewerRetrieveStudyData from './ViewerRetrieveStudyData.js';
|
||||||
import OHIF from '@ohif/core';
|
import OHIF from '@ohif/core';
|
||||||
|
|
||||||
const { clearViewportSpecificData } = OHIF.redux.actions;
|
const { clearViewportSpecificData, setStudyData } = OHIF.redux.actions;
|
||||||
const isActive = a => a.active === true;
|
const isActive = a => a.active === true;
|
||||||
|
|
||||||
const mapStateToProps = (state, ownProps) => {
|
const mapStateToProps = (state, ownProps) => {
|
||||||
@@ -14,6 +14,9 @@ const mapStateToProps = (state, ownProps) => {
|
|||||||
};
|
};
|
||||||
const mapDispatchToProps = dispatch => {
|
const mapDispatchToProps = dispatch => {
|
||||||
return {
|
return {
|
||||||
|
setStudyData: (StudyInstanceUID, data) => {
|
||||||
|
dispatch(setStudyData(StudyInstanceUID, data));
|
||||||
|
},
|
||||||
clearViewportSpecificData: () => {
|
clearViewportSpecificData: () => {
|
||||||
dispatch(clearViewportSpecificData());
|
dispatch(clearViewportSpecificData());
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect, useContext } from 'react';
|
import React, { useState, useEffect, useContext, useCallback } from 'react';
|
||||||
import { metadata, studies, utils, log } from '@ohif/core';
|
import { metadata, studies, utils, log } from '@ohif/core';
|
||||||
import usePrevious from '../customHooks/usePrevious';
|
import usePrevious from '../customHooks/usePrevious';
|
||||||
|
|
||||||
@@ -7,13 +7,13 @@ import PropTypes from 'prop-types';
|
|||||||
import { extensionManager } from './../App.js';
|
import { extensionManager } from './../App.js';
|
||||||
import { useSnackbarContext } from '@ohif/ui';
|
import { useSnackbarContext } from '@ohif/ui';
|
||||||
|
|
||||||
|
// Contexts
|
||||||
|
import AppContext from '../context/AppContext';
|
||||||
|
|
||||||
const { OHIFStudyMetadata, OHIFSeriesMetadata } = metadata;
|
const { OHIFStudyMetadata, OHIFSeriesMetadata } = metadata;
|
||||||
const { retrieveStudiesMetadata, deleteStudyMetadataPromise } = studies;
|
const { retrieveStudiesMetadata, deleteStudyMetadataPromise } = studies;
|
||||||
const { studyMetadataManager, makeCancelable } = utils;
|
const { studyMetadataManager, makeCancelable } = utils;
|
||||||
|
|
||||||
// Contexts
|
|
||||||
import AppContext from '../context/AppContext';
|
|
||||||
|
|
||||||
const _promoteToFront = (list, value, searchMethod) => {
|
const _promoteToFront = (list, value, searchMethod) => {
|
||||||
let response = [...list];
|
let response = [...list];
|
||||||
let promoted = false;
|
let promoted = false;
|
||||||
@@ -105,7 +105,7 @@ const _showUserMessage = (queryParamApplied, message, dialog = {}) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { show: showUserMessage = () => { } } = dialog;
|
const { show: showUserMessage = () => {} } = dialog;
|
||||||
showUserMessage({
|
showUserMessage({
|
||||||
message,
|
message,
|
||||||
});
|
});
|
||||||
@@ -125,9 +125,14 @@ const _addSeriesToStudy = (studyMetadata, series) => {
|
|||||||
|
|
||||||
studyMetadata.createAndAddDisplaySetsForSeries(
|
studyMetadata.createAndAddDisplaySetsForSeries(
|
||||||
sopClassHandlerModules,
|
sopClassHandlerModules,
|
||||||
seriesMetadata,
|
seriesMetadata
|
||||||
);
|
);
|
||||||
|
|
||||||
study.displaySets = studyMetadata.getDisplaySets();
|
study.displaySets = studyMetadata.getDisplaySets();
|
||||||
|
study.derivedDisplaySets = studyMetadata.getDerivedDatasets({
|
||||||
|
Modality: series.Modality,
|
||||||
|
});
|
||||||
|
|
||||||
_updateStudyMetadataManager(study, studyMetadata);
|
_updateStudyMetadataManager(study, studyMetadata);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -147,6 +152,10 @@ const _updateStudyDisplaySets = (study, studyMetadata) => {
|
|||||||
study.displaySets = studyMetadata.createDisplaySets(sopClassHandlerModules);
|
study.displaySets = studyMetadata.createDisplaySets(sopClassHandlerModules);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (study.derivedDisplaySets) {
|
||||||
|
studyMetadata._addDerivedDisplaySets(study.derivedDisplaySets);
|
||||||
|
}
|
||||||
|
|
||||||
studyMetadata.setDisplaySets(study.displaySets);
|
studyMetadata.setDisplaySets(study.displaySets);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -154,11 +163,21 @@ const _sortStudyDisplaySet = (study, studyMetadata) => {
|
|||||||
studyMetadata.sortDisplaySets(study.displaySets);
|
studyMetadata.sortDisplaySets(study.displaySets);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const _thinStudyData = study => {
|
||||||
|
return {
|
||||||
|
StudyInstanceUID: study.StudyInstanceUID,
|
||||||
|
series: study.series.map(item => ({
|
||||||
|
SeriesInstanceUID: item.SeriesInstanceUID,
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
function ViewerRetrieveStudyData({
|
function ViewerRetrieveStudyData({
|
||||||
server,
|
server,
|
||||||
studyInstanceUIDs,
|
studyInstanceUIDs,
|
||||||
seriesInstanceUIDs,
|
seriesInstanceUIDs,
|
||||||
clearViewportSpecificData,
|
clearViewportSpecificData,
|
||||||
|
setStudyData,
|
||||||
}) {
|
}) {
|
||||||
// hooks
|
// hooks
|
||||||
const [error, setError] = useState(false);
|
const [error, setError] = useState(false);
|
||||||
@@ -220,6 +239,7 @@ function ViewerRetrieveStudyData({
|
|||||||
if (Array.isArray(studiesData) && studiesData.length > 0) {
|
if (Array.isArray(studiesData) && studiesData.length > 0) {
|
||||||
// Map studies to new format, update metadata manager?
|
// Map studies to new format, update metadata manager?
|
||||||
const studies = studiesData.map(study => {
|
const studies = studiesData.map(study => {
|
||||||
|
setStudyData(study.StudyInstanceUID, _thinStudyData(study));
|
||||||
const studyMetadata = new OHIFStudyMetadata(
|
const studyMetadata = new OHIFStudyMetadata(
|
||||||
study,
|
study,
|
||||||
study.StudyInstanceUID
|
study.StudyInstanceUID
|
||||||
@@ -265,7 +285,8 @@ function ViewerRetrieveStudyData({
|
|||||||
return loadNextSeries();
|
return loadNextSeries();
|
||||||
};
|
};
|
||||||
|
|
||||||
const concurrentRequestsAllowed = maxConcurrentMetadataRequests || studyMetadata.getSeriesCount();
|
const concurrentRequestsAllowed =
|
||||||
|
maxConcurrentMetadataRequests || studyMetadata.getSeriesCount();
|
||||||
const promises = Array(concurrentRequestsAllowed)
|
const promises = Array(concurrentRequestsAllowed)
|
||||||
.fill(null)
|
.fill(null)
|
||||||
.map(loadNextSeries);
|
.map(loadNextSeries);
|
||||||
@@ -311,7 +332,7 @@ function ViewerRetrieveStudyData({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const purgeCancellablePromises = () => {
|
const purgeCancellablePromises = useCallback(() => {
|
||||||
for (let studyInstanceUIDs in cancelableStudiesPromises) {
|
for (let studyInstanceUIDs in cancelableStudiesPromises) {
|
||||||
if ('cancel' in cancelableStudiesPromises[studyInstanceUIDs]) {
|
if ('cancel' in cancelableStudiesPromises[studyInstanceUIDs]) {
|
||||||
cancelableStudiesPromises[studyInstanceUIDs].cancel();
|
cancelableStudiesPromises[studyInstanceUIDs].cancel();
|
||||||
@@ -325,7 +346,7 @@ function ViewerRetrieveStudyData({
|
|||||||
studyMetadataManager.remove(studyInstanceUIDs);
|
studyMetadataManager.remove(studyInstanceUIDs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
const prevStudyInstanceUIDs = usePrevious(studyInstanceUIDs);
|
const prevStudyInstanceUIDs = usePrevious(studyInstanceUIDs);
|
||||||
|
|
||||||
@@ -339,7 +360,7 @@ function ViewerRetrieveStudyData({
|
|||||||
studyMetadataManager.purge();
|
studyMetadataManager.purge();
|
||||||
purgeCancellablePromises();
|
purgeCancellablePromises();
|
||||||
}
|
}
|
||||||
}, [studyInstanceUIDs]);
|
}, [prevStudyInstanceUIDs, purgeCancellablePromises, studyInstanceUIDs]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
cancelableSeriesPromises = {};
|
cancelableSeriesPromises = {};
|
||||||
@@ -369,6 +390,7 @@ ViewerRetrieveStudyData.propTypes = {
|
|||||||
seriesInstanceUIDs: PropTypes.array,
|
seriesInstanceUIDs: PropTypes.array,
|
||||||
server: PropTypes.object,
|
server: PropTypes.object,
|
||||||
clearViewportSpecificData: PropTypes.func.isRequired,
|
clearViewportSpecificData: PropTypes.func.isRequired,
|
||||||
|
setStudyData: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ViewerRetrieveStudyData;
|
export default ViewerRetrieveStudyData;
|
||||||
@@ -14,9 +14,11 @@ class CallbackPage extends Component {
|
|||||||
<CallbackComponent
|
<CallbackComponent
|
||||||
userManager={this.props.userManager}
|
userManager={this.props.userManager}
|
||||||
successCallback={() => {
|
successCallback={() => {
|
||||||
const pathname = sessionStorage.getItem('ohif-redirect-to');
|
const { pathname, search = '' } = JSON.parse(
|
||||||
|
sessionStorage.getItem('ohif-redirect-to')
|
||||||
|
);
|
||||||
|
|
||||||
this.props.history.push(pathname);
|
this.props.history.push({ pathname, search });
|
||||||
}}
|
}}
|
||||||
errorCallback={error => {
|
errorCallback={error => {
|
||||||
//this.props.history.push("/");
|
//this.props.history.push("/");
|
||||||
|
|||||||
@@ -6534,10 +6534,10 @@ dateformat@^3.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
|
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
|
||||||
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
|
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
|
||||||
|
|
||||||
dcmjs@^0.12.2:
|
dcmjs@0.13.0:
|
||||||
version "0.12.2"
|
version "0.13.0"
|
||||||
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.12.2.tgz#1c16e19c27ff43202abc7cd25c5ecd6d8bf7672e"
|
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.13.0.tgz#16310a137a0fe800ccb2d4751a28cf023765f347"
|
||||||
integrity sha512-B7cEVCfDi3mOLKoBYUMYy+6COjLZhtKaesNpq5XNA4IbEH4EJYVweJfiI9gsR5hypv9LAPg72xG/xrbqjy8TgQ==
|
integrity sha512-U+qGwlnkG8vwDKB4R7ryqQUtWQM1JHMKMBw5+Oy8wcPxS+vDmaRTqIcAItMh1DcZ0ia8RN0VI5TBVCOJl7GVhA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/polyfill" "^7.8.3"
|
"@babel/polyfill" "^7.8.3"
|
||||||
"@babel/runtime" "^7.8.4"
|
"@babel/runtime" "^7.8.4"
|
||||||
@@ -15603,10 +15603,10 @@ react-codemirror2@^6.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/react-codemirror2/-/react-codemirror2-6.0.0.tgz#180065df57a64026026cde569a9708fdf7656525"
|
resolved "https://registry.yarnpkg.com/react-codemirror2/-/react-codemirror2-6.0.0.tgz#180065df57a64026026cde569a9708fdf7656525"
|
||||||
integrity sha512-D7y9qZ05FbUh9blqECaJMdDwKluQiO3A9xB+fssd5jKM7YAXucRuEOlX32mJQumUvHUkHRHqXIPBjm6g0FW0Ag==
|
integrity sha512-D7y9qZ05FbUh9blqECaJMdDwKluQiO3A9xB+fssd5jKM7YAXucRuEOlX32mJQumUvHUkHRHqXIPBjm6g0FW0Ag==
|
||||||
|
|
||||||
react-cornerstone-viewport@2.3.8:
|
react-cornerstone-viewport@2.3.9:
|
||||||
version "2.3.8"
|
version "2.3.9"
|
||||||
resolved "https://registry.yarnpkg.com/react-cornerstone-viewport/-/react-cornerstone-viewport-2.3.8.tgz#7af8360f29bca986ae4e36b4e503269b88ddc52f"
|
resolved "https://registry.yarnpkg.com/react-cornerstone-viewport/-/react-cornerstone-viewport-2.3.9.tgz#f9761da8e536f0a217137c6ca1a983f5882249f9"
|
||||||
integrity sha512-aiG2uVNrDY6SQx4t/HBxIA3zsMsCwT+6TpcXK9qSSoXhs+X6OTmYEKncWUqL0jtxU1yfh6JTUz8ARTg03gtF+A==
|
integrity sha512-qrhq8CbX/jq6b93cQjV2qC/mhHOvFBpxzxcHlvHzEQZt/rmRMcaYxCqjpNaNbUmmBu61wNkxesUVsggkPTTcqg==
|
||||||
dependencies:
|
dependencies:
|
||||||
classnames "^2.2.6"
|
classnames "^2.2.6"
|
||||||
date-fns "^2.2.1"
|
date-fns "^2.2.1"
|
||||||
|
|||||||
Reference in new issue
Block a user