Merge branch 'master' of github.com:OHIF/Viewers into IDC-1801
This commit is contained in:
commit
6b99a21227
@ -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.10.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.10.1...@ohif/extension-vtk@1.10.2) (2021-01-21)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/extension-vtk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [1.10.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.10.0...@ohif/extension-vtk@1.10.1) (2020-12-10)
|
## [1.10.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.10.0...@ohif/extension-vtk@1.10.1) (2020-12-10)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/extension-vtk",
|
"name": "@ohif/extension-vtk",
|
||||||
"version": "1.10.1",
|
"version": "1.10.2",
|
||||||
"description": "OHIF extension for VTK.js",
|
"description": "OHIF extension for VTK.js",
|
||||||
"author": "OHIF",
|
"author": "OHIF",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -53,8 +53,8 @@
|
|||||||
"react-vtkjs-viewport": "^0.14.2"
|
"react-vtkjs-viewport": "^0.14.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ohif/core": "^2.12.0",
|
"@ohif/core": "^2.12.1",
|
||||||
"@ohif/ui": "^1.8.0",
|
"@ohif/ui": "^1.8.1",
|
||||||
"cornerstone-tools": "^4.20.1",
|
"cornerstone-tools": "^4.20.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",
|
||||||
|
|||||||
@ -138,6 +138,8 @@ class OHIFVTKViewport extends Component {
|
|||||||
SOPInstanceUID,
|
SOPInstanceUID,
|
||||||
frameIndex
|
frameIndex
|
||||||
) => {
|
) => {
|
||||||
|
const { UINotificationService } = this.props.servicesManager.services;
|
||||||
|
|
||||||
const stack = OHIFVTKViewport.getCornerstoneStack(
|
const stack = OHIFVTKViewport.getCornerstoneStack(
|
||||||
studies,
|
studies,
|
||||||
StudyInstanceUID,
|
StudyInstanceUID,
|
||||||
@ -159,11 +161,14 @@ class OHIFVTKViewport extends Component {
|
|||||||
const { activeLabelmapIndex } = brushStackState;
|
const { activeLabelmapIndex } = brushStackState;
|
||||||
const labelmap3D = brushStackState.labelmaps3D[activeLabelmapIndex];
|
const labelmap3D = brushStackState.labelmaps3D[activeLabelmapIndex];
|
||||||
|
|
||||||
if (brushStackState.labelmaps3D.length > 1 && this.props.viewportIndex === 0) {
|
if (
|
||||||
const { UINotificationService } = this.props.servicesManager.services;
|
brushStackState.labelmaps3D.length > 1 &&
|
||||||
|
this.props.viewportIndex === 0
|
||||||
|
) {
|
||||||
UINotificationService.show({
|
UINotificationService.show({
|
||||||
title: 'Overlapping Segmentation Found',
|
title: 'Overlapping Segmentation Found',
|
||||||
message: 'Overlapping segmentations cannot be displayed when in MPR mode',
|
message:
|
||||||
|
'Overlapping segmentations cannot be displayed when in MPR mode',
|
||||||
type: 'info',
|
type: 'info',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -305,6 +310,7 @@ class OHIFVTKViewport extends Component {
|
|||||||
seriesDescription: displaySet.seriesDescription,
|
seriesDescription: displaySet.seriesDescription,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
const {
|
const {
|
||||||
imageDataObject,
|
imageDataObject,
|
||||||
labelmapDataObject,
|
labelmapDataObject,
|
||||||
@ -351,6 +357,32 @@ class OHIFVTKViewport extends Component {
|
|||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
} catch (error) {
|
||||||
|
const errorTitle = 'Failed to load 2D MPR';
|
||||||
|
console.error(errorTitle, error);
|
||||||
|
const { UINotificationService } = this.props.servicesManager.services;
|
||||||
|
if (this.props.viewportIndex === 0) {
|
||||||
|
const message = error.message.includes('buffer')
|
||||||
|
? 'Dataset is too big to display in MPR'
|
||||||
|
: error.message;
|
||||||
|
console.error(errorTitle, error);
|
||||||
|
UINotificationService.show({
|
||||||
|
title: errorTitle,
|
||||||
|
message,
|
||||||
|
type: 'error',
|
||||||
|
autoClose: false,
|
||||||
|
action: {
|
||||||
|
label: 'Exit 2D MPR',
|
||||||
|
onClick: ({ close }) => {
|
||||||
|
// context: 'ACTIVE_VIEWPORT::VTK',
|
||||||
|
close();
|
||||||
|
this.props.commandsManager.runCommand('setCornerstoneLayout');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.setState({ isLoaded: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|||||||
@ -9,7 +9,9 @@ import { version } from '../package.json';
|
|||||||
// import loadLocales from './loadLocales';
|
// import loadLocales from './loadLocales';
|
||||||
|
|
||||||
const OHIFVTKViewport = asyncComponent(() =>
|
const OHIFVTKViewport = asyncComponent(() =>
|
||||||
retryImport(() => import(/* webpackChunkName: "OHIFVTKViewport" */ './OHIFVTKViewport.js'))
|
retryImport(() =>
|
||||||
|
import(/* webpackChunkName: "OHIFVTKViewport" */ './OHIFVTKViewport.js')
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
const vtkExtension = {
|
const vtkExtension = {
|
||||||
@ -21,7 +23,11 @@ const vtkExtension = {
|
|||||||
|
|
||||||
getViewportModule({ commandsManager, servicesManager }) {
|
getViewportModule({ commandsManager, servicesManager }) {
|
||||||
const ExtendedVTKViewport = props => (
|
const ExtendedVTKViewport = props => (
|
||||||
<OHIFVTKViewport {...props} servicesManager={servicesManager} />
|
<OHIFVTKViewport
|
||||||
|
{...props}
|
||||||
|
servicesManager={servicesManager}
|
||||||
|
commandsManager={commandsManager}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
return withCommandsManager(ExtendedVTKViewport, commandsManager);
|
return withCommandsManager(ExtendedVTKViewport, commandsManager);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [2.12.1](https://github.com/OHIF/Viewers/compare/@ohif/core@2.12.0...@ohif/core@2.12.1) (2021-01-21)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/core
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.12.0](https://github.com/OHIF/Viewers/compare/@ohif/core@2.11.1...@ohif/core@2.12.0) (2020-12-10)
|
# [2.12.0](https://github.com/OHIF/Viewers/compare/@ohif/core@2.11.1...@ohif/core@2.12.0) (2020-12-10)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/core",
|
"name": "@ohif/core",
|
||||||
"version": "2.12.0",
|
"version": "2.12.1",
|
||||||
"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",
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
* @property {string} [position="bottomRight"] -"topLeft" | "topCenter | "topRight" | "bottomLeft" | "bottomCenter" | "bottomRight"
|
* @property {string} [position="bottomRight"] -"topLeft" | "topCenter | "topRight" | "bottomLeft" | "bottomCenter" | "bottomRight"
|
||||||
* @property {string} [type="info"] - "info" | "error" | "warning" | "success"
|
* @property {string} [type="info"] - "info" | "error" | "warning" | "success"
|
||||||
* @property {boolean} [autoClose=true]
|
* @property {boolean} [autoClose=true]
|
||||||
|
* @property {object} [action=null]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const name = 'UINotificationService';
|
const name = 'UINotificationService';
|
||||||
@ -34,7 +35,7 @@ const serviceImplementation = {
|
|||||||
* Create and show a new UI notification; returns the
|
* Create and show a new UI notification; returns the
|
||||||
* ID of the created notification.
|
* ID of the created notification.
|
||||||
*
|
*
|
||||||
* @param {Notification} notification { title, message, duration, position, type, autoClose}
|
* @param {Notification} notification { title, message, duration, position, type, autoClose, action}
|
||||||
* @returns {number} id
|
* @returns {number} id
|
||||||
*/
|
*/
|
||||||
function _show({
|
function _show({
|
||||||
@ -44,6 +45,7 @@ function _show({
|
|||||||
position = 'bottomRight',
|
position = 'bottomRight',
|
||||||
type = 'info',
|
type = 'info',
|
||||||
autoClose = true,
|
autoClose = true,
|
||||||
|
action = null,
|
||||||
}) {
|
}) {
|
||||||
return serviceImplementation._show({
|
return serviceImplementation._show({
|
||||||
title,
|
title,
|
||||||
@ -52,6 +54,7 @@ function _show({
|
|||||||
position,
|
position,
|
||||||
type,
|
type,
|
||||||
autoClose,
|
autoClose,
|
||||||
|
action,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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.8.1](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.8.0...@ohif/ui@1.8.1) (2021-01-21)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/ui
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [1.8.0](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.7.1...@ohif/ui@1.8.0) (2020-12-10)
|
# [1.8.0](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.7.1...@ohif/ui@1.8.0) (2020-12-10)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/ui",
|
"name": "@ohif/ui",
|
||||||
"version": "1.8.0",
|
"version": "1.8.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",
|
||||||
|
|||||||
@ -156,19 +156,50 @@
|
|||||||
transition: all 300ms ease;
|
transition: all 300ms ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sb-success {
|
.sb-item .sb-action,
|
||||||
|
.sb-error .sb-action,
|
||||||
|
.sb-warning .sb-action,
|
||||||
|
.sb-info .sb-action,
|
||||||
|
.sb-success .sb-action {
|
||||||
|
margin-top: 10px;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 6px 12px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.42857143;
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
vertical-align: middle;
|
||||||
|
-ms-touch-action: manipulation;
|
||||||
|
touch-action: manipulation;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
background-image: none;
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sb-success,
|
||||||
|
.sb-success .sb-action {
|
||||||
background-color: var(--snackbar-success);
|
background-color: var(--snackbar-success);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sb-error {
|
.sb-error,
|
||||||
|
.sb-error .sb-action {
|
||||||
background-color: var(--snackbar-error);
|
background-color: var(--snackbar-error);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sb-warning {
|
.sb-warning,
|
||||||
|
.sb-warning .sb-action {
|
||||||
background-color: var(--snackbar-warning);
|
background-color: var(--snackbar-warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sb-info {
|
.sb-info,
|
||||||
|
.sb-info .sb-action {
|
||||||
background-color: var(--snackbar-info);
|
background-color: var(--snackbar-info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,14 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
|
|
||||||
const SnackbarItem = ({ options, onClose }) => {
|
const SnackbarItem = ({ options, onClose }) => {
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
onClose(options.id);
|
onClose(options.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleClick = () => {
|
||||||
|
options.action.onClick({ ...options, close: handleClose });
|
||||||
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (options.autoClose) {
|
if (options.autoClose) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -24,6 +28,11 @@ const SnackbarItem = ({ options, onClose }) => {
|
|||||||
</span>
|
</span>
|
||||||
{options.title && <div className="sb-title">{options.title}</div>}
|
{options.title && <div className="sb-title">{options.title}</div>}
|
||||||
{options.message && <div className="sb-message">{options.message}</div>}
|
{options.message && <div className="sb-message">{options.message}</div>}
|
||||||
|
{options.action && (
|
||||||
|
<button className="sb-action" onClick={handleClick}>
|
||||||
|
{options.action.label}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -22,6 +22,7 @@ const SnackbarProvider = ({ children, service }) => {
|
|||||||
autoClose: true,
|
autoClose: true,
|
||||||
position: 'bottomRight',
|
position: 'bottomRight',
|
||||||
type: SnackbarTypes.INFO,
|
type: SnackbarTypes.INFO,
|
||||||
|
action: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
const [count, setCount] = useState(1);
|
const [count, setCount] = useState(1);
|
||||||
|
|||||||
@ -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.
|
||||||
|
|
||||||
|
## [4.8.2](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.8.1...@ohif/viewer@4.8.2) (2021-01-21)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ohif/viewer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [4.8.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.8.0...@ohif/viewer@4.8.1) (2020-12-10)
|
## [4.8.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.8.0...@ohif/viewer@4.8.1) (2020-12-10)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ohif/viewer
|
**Note:** Version bump only for package @ohif/viewer
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/viewer",
|
"name": "@ohif/viewer",
|
||||||
"version": "4.8.1",
|
"version": "4.8.2",
|
||||||
"description": "OHIF Viewer",
|
"description": "OHIF Viewer",
|
||||||
"author": "OHIF Contributors",
|
"author": "OHIF Contributors",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -49,7 +49,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.5.5",
|
"@babel/runtime": "^7.5.5",
|
||||||
"@ohif/core": "^2.12.0",
|
"@ohif/core": "^2.12.1",
|
||||||
"@ohif/extension-cornerstone": "^2.10.0",
|
"@ohif/extension-cornerstone": "^2.10.0",
|
||||||
"@ohif/extension-debugging": "^0.1.6",
|
"@ohif/extension-debugging": "^0.1.6",
|
||||||
"@ohif/extension-dicom-html": "^1.3.0",
|
"@ohif/extension-dicom-html": "^1.3.0",
|
||||||
@ -58,9 +58,9 @@
|
|||||||
"@ohif/extension-dicom-rt": "^0.6.1",
|
"@ohif/extension-dicom-rt": "^0.6.1",
|
||||||
"@ohif/extension-dicom-segmentation": "^0.5.0",
|
"@ohif/extension-dicom-segmentation": "^0.5.0",
|
||||||
"@ohif/extension-lesion-tracker": "^0.2.1",
|
"@ohif/extension-lesion-tracker": "^0.2.1",
|
||||||
"@ohif/extension-vtk": "^1.10.1",
|
"@ohif/extension-vtk": "^1.10.2",
|
||||||
"@ohif/i18n": "^0.53.0",
|
"@ohif/i18n": "^0.53.0",
|
||||||
"@ohif/ui": "^1.8.0",
|
"@ohif/ui": "^1.8.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",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user