Compare commits
19
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec76bc3b0b | ||
|
|
b1070acaca | ||
|
|
7b5beb8f98 | ||
|
|
97410e12b9 | ||
|
|
bdecbfeee3 | ||
|
|
5a970056ae | ||
|
|
8581405352 | ||
|
|
df8c4db2ed | ||
|
|
ea62bdaddf | ||
|
|
e983b02677 | ||
|
|
1e4b78d78d | ||
|
|
ee6131f98e | ||
|
|
a56bdd035b | ||
|
|
04901c296e | ||
|
|
59cadad98c | ||
|
|
14d6454eaf | ||
|
|
64f87d2c93 | ||
|
|
cfd66e5ef7 | ||
|
|
6480389778 |
No files matched your search
@@ -248,9 +248,6 @@ To acknowledge the OHIF Viewer in an academic publication, please cite
|
||||
>
|
||||
> _Cancer Research_, November 1 2017 (77) (21) e119-e122 DOI:
|
||||
> [10.1158/0008-5472.CAN-17-0334](https://www.doi.org/10.1158/0008-5472.CAN-17-0334)
|
||||
>
|
||||
> NCI Imaging Data Commons: contract number 19X037Q from Leidos Biomedical
|
||||
> Research under Task Order HHSN26100071 from NCI.
|
||||
|
||||
**Note:** If you use or find this repository helpful, please take the time to
|
||||
star this repository on Github. This is an easy way for us to assess adoption
|
||||
@@ -261,6 +258,22 @@ Cancer Institute, Informatics Technology for Cancer Research (ITCR) program,
|
||||
under a
|
||||
[grant to Dr. Gordon Harris at Massachusetts General Hospital (U24 CA199460)](https://projectreporter.nih.gov/project_info_description.cfm?aid=8971104).
|
||||
|
||||
## Projects that contributed to OHIF Viewer
|
||||
|
||||
The following is a (partial) list of projects that contributed resources towards
|
||||
development of OHIF Viewer:
|
||||
|
||||
- [NCI Imaging Data Commons (IDC) project](https://imaging.datacommons.cancer.gov/)
|
||||
supported development of new features and bug fixes marked with
|
||||
["IDC:priority"](https://github.com/OHIF/Viewers/issues?q=is%3Aissue+is%3Aopen+label%3AIDC%3Apriority),
|
||||
["IDC:candidate"](https://github.com/OHIF/Viewers/issues?q=is%3Aissue+is%3Aopen+label%3AIDC%3Acandidate)
|
||||
or
|
||||
["IDC:collaboration"](https://github.com/OHIF/Viewers/issues?q=is%3Aissue+is%3Aopen+label%3AIDC%3Acollaboration).
|
||||
NCI Imaging Data Commons is supported by the contract number 19X037Q from
|
||||
Leidos Biomedical Research under Task Order HHSN26100071 from NCI.
|
||||
[IDC Viewer](https://learn.canceridc.dev/portal/visualization) is a customized
|
||||
version of the OHIF Viewer.
|
||||
|
||||
## License
|
||||
|
||||
MIT © [OHIF](https://github.com/OHIF)
|
||||
|
||||
@@ -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.10.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.10.3...@ohif/extension-cornerstone@2.10.4) (2021-03-09)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.10.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.10.2...@ohif/extension-cornerstone@2.10.3) (2021-03-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.10.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.10.1...@ohif/extension-cornerstone@2.10.2) (2021-02-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.10.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.10.0...@ohif/extension-cornerstone@2.10.1) (2021-02-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone",
|
||||
"version": "2.10.1",
|
||||
"version": "2.10.4",
|
||||
"description": "OHIF extension for Cornerstone",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -36,7 +36,7 @@
|
||||
"cornerstone-math": "^0.1.8",
|
||||
"cornerstone-tools": "^4.20.1",
|
||||
"cornerstone-wado-image-loader": "^3.1.0",
|
||||
"dcmjs": "0.17.2",
|
||||
"dcmjs": "0.18.3",
|
||||
"dicom-parser": "^1.8.3",
|
||||
"hammerjs": "^2.0.8",
|
||||
"prop-types": "^15.6.2",
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [0.2.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-debugging@0.1.6...@ohif/extension-debugging@0.2.0) (2021-03-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **log:** add new log service ([14d6454](https://github.com/OHIF/Viewers/commit/14d6454eafaa2ccb50e133c2945c9558052ea27e))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.1.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-debugging@0.1.5...@ohif/extension-debugging@0.1.6) (2020-10-06)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-debugging
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-debugging",
|
||||
"version": "0.1.6",
|
||||
"version": "0.2.0",
|
||||
"description": "OHIF extension for debugging.",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -12,3 +12,15 @@
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.debug-report-modal-container .errors {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.debug-report-modal-container .errors-container {
|
||||
border: 1px solid var(--active-color);
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
overflow: scroll;
|
||||
max-height: 300px;
|
||||
}
|
||||
@@ -10,6 +10,7 @@ const DubugReportModal = ({
|
||||
extensionManager,
|
||||
mailTo,
|
||||
debugModalMessage,
|
||||
errors = [],
|
||||
}) => {
|
||||
const copyDebugDataToClipboard = () => {
|
||||
const body = getEmailBody();
|
||||
@@ -131,6 +132,19 @@ const DubugReportModal = ({
|
||||
{getLayout(viewports)}
|
||||
</table>
|
||||
</div>
|
||||
<div className="errors">
|
||||
<h3>Errors ({errors.length})</h3>
|
||||
<div className="errors-container">
|
||||
{errors.map(error => {
|
||||
return (
|
||||
<div>
|
||||
<pre>Message: {error.message}</pre>
|
||||
{error.error && <pre>Stack: {error.error.stack}</pre>}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import OHIF from '@ohif/core';
|
||||
import { ToolbarButton, useLogger } from '@ohif/ui';
|
||||
|
||||
import {
|
||||
save,
|
||||
upload,
|
||||
@@ -95,6 +97,7 @@ export function getCommands(context, servicesManager, extensionManager) {
|
||||
const { UIModalService } = servicesManager.services;
|
||||
|
||||
const WrappedDebugReportModal = function() {
|
||||
const { state } = useLogger();
|
||||
return (
|
||||
<DebugReportModal
|
||||
viewports={viewports}
|
||||
@@ -103,6 +106,7 @@ export function getCommands(context, servicesManager, extensionManager) {
|
||||
extensionManager={extensionManager}
|
||||
mailTo={state.mailTo}
|
||||
debugModalMessage={state.debugModalMessage}
|
||||
errors={state.errors}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.3...@ohif/extension-dicom-html@1.3.4) (2021-03-09)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.3.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.2...@ohif/extension-dicom-html@1.3.3) (2021-03-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.3.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.1...@ohif/extension-dicom-html@1.3.2) (2021-02-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.3.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.0...@ohif/extension-dicom-html@1.3.1) (2021-02-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-html
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-html",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.4",
|
||||
"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.17.2",
|
||||
"dcmjs": "0.18.3",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.8.6",
|
||||
"react-dom": "^16.8.6"
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [0.52.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.51.4...@ohif/extension-dicom-microscopy@0.52.0) (2021-03-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **log:** add new log service ([14d6454](https://github.com/OHIF/Viewers/commit/14d6454eafaa2ccb50e133c2945c9558052ea27e))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.51.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.51.3...@ohif/extension-dicom-microscopy@0.51.4) (2021-01-21)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-microscopy",
|
||||
"version": "0.51.4",
|
||||
"version": "0.52.0",
|
||||
"description": "OHIF extension for Dicom Microscopy",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -70,12 +70,18 @@ class DicomMicroscopyViewport extends Component {
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('[Microscopy Viewer] Failed to load:', error);
|
||||
const { UINotificationService } = this.props.servicesManager.services;
|
||||
const {
|
||||
UINotificationService,
|
||||
LoggerService,
|
||||
} = this.props.servicesManager.services;
|
||||
if (UINotificationService) {
|
||||
const message =
|
||||
'Failed to load viewport. Please check that you have hardware acceleration enabled.';
|
||||
LoggerService.error({ error, message });
|
||||
UINotificationService.show({
|
||||
autoClose: false,
|
||||
title: 'Microscopy Viewport',
|
||||
message:
|
||||
'Failed to load viewport. Please check that you have hardware acceleration enabled.',
|
||||
message,
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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.6.7](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.6.6...@ohif/extension-dicom-rt@0.6.7) (2021-03-09)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-rt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.6.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.6.5...@ohif/extension-dicom-rt@0.6.6) (2021-03-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-rt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.6.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.6.4...@ohif/extension-dicom-rt@0.6.5) (2021-02-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-rt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.6.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.6.3...@ohif/extension-dicom-rt@0.6.4) (2021-02-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-rt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-rt",
|
||||
"version": "0.6.4",
|
||||
"version": "0.6.7",
|
||||
"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.2.8",
|
||||
"cornerstone-tools": "^4.20.1",
|
||||
"dcmjs": "0.17.2",
|
||||
"dcmjs": "0.18.3",
|
||||
"gl-matrix": "^3.3.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.8.6",
|
||||
|
||||
@@ -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.
|
||||
|
||||
## [0.6.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.6.0...@ohif/extension-dicom-segmentation@0.6.1) (2021-03-09)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-segmentation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [0.6.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.5.4...@ohif/extension-dicom-segmentation@0.6.0) (2021-03-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **log:** add new log service ([14d6454](https://github.com/OHIF/Viewers/commit/14d6454eafaa2ccb50e133c2945c9558052ea27e))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.5.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.5.3...@ohif/extension-dicom-segmentation@0.5.4) (2021-03-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-segmentation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.5.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.5.2...@ohif/extension-dicom-segmentation@0.5.3) (2021-02-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-segmentation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.5.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.5.1...@ohif/extension-dicom-segmentation@0.5.2) (2021-02-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-segmentation
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-segmentation",
|
||||
"version": "0.5.2",
|
||||
"version": "0.6.1",
|
||||
"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.2.8",
|
||||
"cornerstone-tools": "^4.20.1",
|
||||
"dcmjs": "0.17.2",
|
||||
"dcmjs": "0.18.3",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.8.6",
|
||||
"react-dom": "^16.8.6"
|
||||
|
||||
@@ -25,12 +25,13 @@ export default {
|
||||
return toolbarModule;
|
||||
},
|
||||
getPanelModule({ commandsManager, api, servicesManager }) {
|
||||
const { UINotificationService } = servicesManager.services;
|
||||
const { UINotificationService, LoggerService } = servicesManager.services;
|
||||
|
||||
const ExtendedSegmentationPanel = props => {
|
||||
const { activeContexts } = api.hooks.useAppContext();
|
||||
|
||||
const onDisplaySetLoadFailureHandler = error => {
|
||||
LoggerService.error({ error, message: error.message });
|
||||
UINotificationService.show({
|
||||
title: 'DICOM Segmentation Loader',
|
||||
message: error.message,
|
||||
|
||||
@@ -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.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.4...@ohif/extension-dicom-tag-browser@0.2.5) (2021-03-09)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.2.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.3...@ohif/extension-dicom-tag-browser@0.2.4) (2021-03-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.2.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.2...@ohif/extension-dicom-tag-browser@0.2.3) (2021-02-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.2.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.1...@ohif/extension-dicom-tag-browser@0.2.2) (2021-02-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-tag-browser",
|
||||
"version": "0.2.2",
|
||||
"version": "0.2.5",
|
||||
"description": "OHIF extension for checking DICOM headers.",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "^2.6.0",
|
||||
"dcmjs": "0.17.2",
|
||||
"dcmjs": "0.18.3",
|
||||
"react": "^16.8.6"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -3,6 +3,49 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.11.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.11.1...@ohif/extension-vtk@1.11.2) (2021-03-09)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.11.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.11.0...@ohif/extension-vtk@1.11.1) (2021-03-09)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [1.11.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.10.6...@ohif/extension-vtk@1.11.0) (2021-03-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **log:** add new log service ([14d6454](https://github.com/OHIF/Viewers/commit/14d6454eafaa2ccb50e133c2945c9558052ea27e))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.10.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.10.5...@ohif/extension-vtk@1.10.6) (2021-03-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.10.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.10.4...@ohif/extension-vtk@1.10.5) (2021-02-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.10.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.10.3...@ohif/extension-vtk@1.10.4) (2021-02-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-vtk",
|
||||
"version": "1.10.4",
|
||||
"version": "1.11.2",
|
||||
"description": "OHIF extension for VTK.js",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -35,7 +35,7 @@
|
||||
"cornerstone-core": "^2.2.8",
|
||||
"cornerstone-tools": "^4.20.1",
|
||||
"cornerstone-wado-image-loader": "^3.1.0",
|
||||
"dcmjs": "0.17.2",
|
||||
"dcmjs": "0.18.3",
|
||||
"dicom-parser": "^1.8.3",
|
||||
"i18next": "^17.0.3",
|
||||
"i18next-browser-languagedetector": "^3.0.1",
|
||||
@@ -53,8 +53,8 @@
|
||||
"react-vtkjs-viewport": "^0.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ohif/core": "^2.12.3",
|
||||
"@ohif/ui": "^1.8.2",
|
||||
"@ohif/core": "^2.13.1",
|
||||
"@ohif/ui": "^1.9.0",
|
||||
"cornerstone-tools": "^4.20.1",
|
||||
"cornerstone-wado-image-loader": "^3.1.0",
|
||||
"dicom-parser": "^1.8.3",
|
||||
|
||||
@@ -360,12 +360,15 @@ class OHIFVTKViewport extends Component {
|
||||
} catch (error) {
|
||||
const errorTitle = 'Failed to load 2D MPR';
|
||||
console.error(errorTitle, error);
|
||||
const { UINotificationService } = this.props.servicesManager.services;
|
||||
const {
|
||||
UINotificationService,
|
||||
LoggerService,
|
||||
} = 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);
|
||||
LoggerService.error({ error, message });
|
||||
UINotificationService.show({
|
||||
title: errorTitle,
|
||||
message,
|
||||
@@ -428,11 +431,15 @@ class OHIFVTKViewport extends Component {
|
||||
};
|
||||
|
||||
const onPixelDataInsertedErrorCallback = error => {
|
||||
const { UINotificationService } = this.props.servicesManager.services;
|
||||
const {
|
||||
UINotificationService,
|
||||
LoggerService,
|
||||
} = this.props.servicesManager.services;
|
||||
|
||||
if (!this.hasError) {
|
||||
if (this.props.viewportIndex === 0) {
|
||||
// Only show the notification from one viewport 1 in MPR2D.
|
||||
LoggerService.error({ error, message: error.message });
|
||||
UINotificationService.show({
|
||||
title: 'MPR Load Error',
|
||||
message: error.message,
|
||||
|
||||
@@ -14,7 +14,9 @@ import OHIFVTKViewport from './OHIFVTKViewport';
|
||||
|
||||
const { BlendMode } = Constants;
|
||||
|
||||
const commandsModule = ({ commandsManager, UINotificationService }) => {
|
||||
const commandsModule = ({ commandsManager, servicesManager }) => {
|
||||
const { UINotificationService, LoggerService } = servicesManager.services;
|
||||
|
||||
// TODO: Put this somewhere else
|
||||
let apis = {};
|
||||
let defaultVOI;
|
||||
@@ -175,7 +177,7 @@ const commandsModule = ({ commandsManager, UINotificationService }) => {
|
||||
segmentNumber,
|
||||
frameIndex,
|
||||
frame,
|
||||
done = () => { },
|
||||
done = () => {},
|
||||
}) => {
|
||||
let api = apis[viewports.activeViewportIndex];
|
||||
|
||||
@@ -473,10 +475,12 @@ const commandsModule = ({ commandsManager, UINotificationService }) => {
|
||||
const volumeLength = dimensions[0] * dimensions[1] * dimensions[2];
|
||||
|
||||
if (volumeLength > maxBufferLengthFloat32) {
|
||||
const message =
|
||||
'This volume is too large to fit in WebGL 1 textures and will display incorrectly. Please use a different browser to view this data';
|
||||
LoggerService.error({ message });
|
||||
UINotificationService.show({
|
||||
title: 'Browser does not support WebGL 2',
|
||||
message:
|
||||
'This volume is too large to fit in WebGL 1 textures and will display incorrectly. Please use a different browser to view this data',
|
||||
message,
|
||||
type: 'error',
|
||||
autoClose: false,
|
||||
});
|
||||
|
||||
@@ -35,8 +35,7 @@ const vtkExtension = {
|
||||
return toolbarModule;
|
||||
},
|
||||
getCommandsModule({ commandsManager, servicesManager }) {
|
||||
const { UINotificationService } = servicesManager.services;
|
||||
return commandsModule({ commandsManager, UINotificationService });
|
||||
return commandsModule({ commandsManager, servicesManager });
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import React from 'react';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ToolbarButton } from '@ohif/ui';
|
||||
import { utils } from '@ohif/core';
|
||||
|
||||
import { createSelector } from 'reselect';
|
||||
const { studyMetadataManager } = utils;
|
||||
|
||||
let isVisible = true;
|
||||
|
||||
const _isDisplaySetReconstructable = (viewportSpecificData = {}, activeViewportIndex) => {
|
||||
if (!viewportSpecificData[activeViewportIndex]) {
|
||||
const _isDisplaySetReconstructable = (
|
||||
displaySetInstanceUID = '',
|
||||
StudyInstanceUID = ''
|
||||
) => {
|
||||
if (displaySetInstanceUID == '' || StudyInstanceUID == '') {
|
||||
return false;
|
||||
};
|
||||
|
||||
const { displaySetInstanceUID, StudyInstanceUID } = viewportSpecificData[
|
||||
activeViewportIndex
|
||||
];
|
||||
}
|
||||
|
||||
const studies = studyMetadataManager.all();
|
||||
|
||||
@@ -27,7 +24,9 @@ const _isDisplaySetReconstructable = (viewportSpecificData = {}, activeViewportI
|
||||
return false;
|
||||
}
|
||||
|
||||
const displaySet = study._displaySets.find(set => set.displaySetInstanceUID === displaySetInstanceUID);
|
||||
const displaySet = study._displaySets.find(
|
||||
set => set.displaySetInstanceUID === displaySetInstanceUID
|
||||
);
|
||||
|
||||
if (!displaySet) {
|
||||
return false;
|
||||
@@ -45,33 +44,43 @@ const _isDisplaySetReconstructable = (viewportSpecificData = {}, activeViewportI
|
||||
const image = displaySet.images[ii];
|
||||
if (!image) continue;
|
||||
|
||||
const imageIdControl = image.getImageId()
|
||||
const instanceMetadataControl = cornerstone.metaData.get('instance', imageIdControl)
|
||||
const imageIdControl = image.getImageId();
|
||||
const instanceMetadataControl = cornerstone.metaData.get(
|
||||
'instance',
|
||||
imageIdControl
|
||||
);
|
||||
|
||||
if (!instanceMetadataControl ||
|
||||
if (
|
||||
!instanceMetadataControl ||
|
||||
instanceMetadataControl === undefined ||
|
||||
!instanceMetadataControl.ImagePositionPatient ||
|
||||
instanceMetadataControl.ImagePositionPatient === undefined) {
|
||||
instanceMetadataControl.ImagePositionPatient === undefined
|
||||
) {
|
||||
// if ImagePositionPatient is missing, skip the 4D datasets check.
|
||||
// do not return false, because it could be a 3D dataset.
|
||||
continue;
|
||||
}
|
||||
|
||||
let xImagePositionPatientControl = instanceMetadataControl.ImagePositionPatient[0];
|
||||
let yImagePositionPatientControl = instanceMetadataControl.ImagePositionPatient[1];
|
||||
let zImagePositionPatientControl = instanceMetadataControl.ImagePositionPatient[2];
|
||||
let xImagePositionPatientControl =
|
||||
instanceMetadataControl.ImagePositionPatient[0];
|
||||
let yImagePositionPatientControl =
|
||||
instanceMetadataControl.ImagePositionPatient[1];
|
||||
let zImagePositionPatientControl =
|
||||
instanceMetadataControl.ImagePositionPatient[2];
|
||||
|
||||
for (let jj = ii + 1; jj < displaySet.numImageFrames; ++jj) {
|
||||
const image = displaySet.images[jj];
|
||||
if (!image) continue;
|
||||
|
||||
const imageId = image.getImageId()
|
||||
const instanceMetadata = cornerstone.metaData.get('instance', imageId)
|
||||
const imageId = image.getImageId();
|
||||
const instanceMetadata = cornerstone.metaData.get('instance', imageId);
|
||||
|
||||
if (!instanceMetadata ||
|
||||
if (
|
||||
!instanceMetadata ||
|
||||
instanceMetadata === undefined ||
|
||||
!instanceMetadata.ImagePositionPatient ||
|
||||
instanceMetadata.ImagePositionPatient === undefined) {
|
||||
instanceMetadata.ImagePositionPatient === undefined
|
||||
) {
|
||||
// if ImagePositionPatient is missing, skip the 4D datasets check.
|
||||
// do not return false, because it could be a 3D dataset.
|
||||
continue;
|
||||
@@ -81,9 +90,12 @@ const _isDisplaySetReconstructable = (viewportSpecificData = {}, activeViewportI
|
||||
let yImagePositionPatient = instanceMetadata.ImagePositionPatient[1];
|
||||
let zImagePositionPatient = instanceMetadata.ImagePositionPatient[2];
|
||||
|
||||
if (xImagePositionPatientControl === xImagePositionPatient &&
|
||||
yImagePositionPatientControl === yImagePositionPatient &&
|
||||
zImagePositionPatientControl === zImagePositionPatient) {
|
||||
// ImagePositionPatient is float
|
||||
if (
|
||||
Math.abs( xImagePositionPatientControl - xImagePositionPatient ) < 1e-6 &&
|
||||
Math.abs( yImagePositionPatientControl - yImagePositionPatient ) < 1e-6 &&
|
||||
Math.abs( zImagePositionPatientControl - zImagePositionPatient ) < 1e-6
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -92,30 +104,53 @@ const _isDisplaySetReconstructable = (viewportSpecificData = {}, activeViewportI
|
||||
return displaySet.isReconstructable;
|
||||
};
|
||||
|
||||
function VTKMPRToolbarButton({
|
||||
parentContext,
|
||||
toolbarClickCallback,
|
||||
button,
|
||||
activeButtons,
|
||||
isActive,
|
||||
className,
|
||||
}) {
|
||||
const { id, label, icon } = button;
|
||||
const { viewportSpecificData, activeViewportIndex } = useSelector(state => {
|
||||
const { viewports = {} } = state;
|
||||
const { viewportSpecificData, activeViewportIndex } = viewports;
|
||||
const selectDisplaySetInstanceUID = state => {
|
||||
if (
|
||||
state.viewports.viewportSpecificData[state.viewports.activeViewportIndex]
|
||||
) {
|
||||
return state.viewports.viewportSpecificData[
|
||||
state.viewports.activeViewportIndex
|
||||
].displaySetInstanceUID;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
const selectStudyInstanceUID = state => {
|
||||
if (
|
||||
state.viewports.viewportSpecificData[state.viewports.activeViewportIndex]
|
||||
) {
|
||||
return state.viewports.viewportSpecificData[
|
||||
state.viewports.activeViewportIndex
|
||||
].StudyInstanceUID;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
const stateSelector = createSelector(
|
||||
[selectDisplaySetInstanceUID, selectStudyInstanceUID],
|
||||
(displaySetInstanceUID, StudyInstanceUID) => {
|
||||
return {
|
||||
viewportSpecificData,
|
||||
activeViewportIndex,
|
||||
}
|
||||
});
|
||||
displaySetInstanceUID,
|
||||
StudyInstanceUID,
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
isVisible = _isDisplaySetReconstructable(
|
||||
viewportSpecificData,
|
||||
activeViewportIndex,
|
||||
function VTKMPRToolbarButton({ toolbarClickCallback, button, isActive }) {
|
||||
const { id, label, icon } = button;
|
||||
const { displaySetInstanceUID, StudyInstanceUID } = useSelector(
|
||||
stateSelector
|
||||
);
|
||||
|
||||
const isVisible = useMemo(() => {
|
||||
return _isDisplaySetReconstructable(
|
||||
displaySetInstanceUID,
|
||||
StudyInstanceUID
|
||||
);
|
||||
}, [displaySetInstanceUID, StudyInstanceUID]);
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
{isVisible && (
|
||||
|
||||
@@ -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.13.1](https://github.com/OHIF/Viewers/compare/@ohif/core@2.13.0...@ohif/core@2.13.1) (2021-03-09)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.13.0](https://github.com/OHIF/Viewers/compare/@ohif/core@2.12.5...@ohif/core@2.13.0) (2021-03-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **log:** add new log service ([14d6454](https://github.com/OHIF/Viewers/commit/14d6454eafaa2ccb50e133c2945c9558052ea27e))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.12.5](https://github.com/OHIF/Viewers/compare/@ohif/core@2.12.4...@ohif/core@2.12.5) (2021-03-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.12.4](https://github.com/OHIF/Viewers/compare/@ohif/core@2.12.3...@ohif/core@2.12.4) (2021-02-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.12.3](https://github.com/OHIF/Viewers/compare/@ohif/core@2.12.2...@ohif/core@2.12.3) (2021-02-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/core",
|
||||
"version": "2.12.3",
|
||||
"version": "2.13.1",
|
||||
"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.17.2",
|
||||
"dcmjs": "0.18.3",
|
||||
"dicomweb-client": "^0.6.0",
|
||||
"immer": "6.0.2",
|
||||
"isomorphic-base64": "^1.0.2",
|
||||
|
||||
@@ -63,10 +63,15 @@ export class HotkeysManager {
|
||||
|
||||
definitions.forEach(definition => this.registerHotkeys(definition));
|
||||
} catch (error) {
|
||||
const { UINotificationService } = this._servicesManager.services;
|
||||
const {
|
||||
UINotificationService,
|
||||
LoggerService,
|
||||
} = this._servicesManager.services;
|
||||
const message = 'Erro while setting hotkeys';
|
||||
LoggerService.error({ error, message });
|
||||
UINotificationService.show({
|
||||
title: 'Hotkeys Manager',
|
||||
message: 'Erro while setting hotkeys',
|
||||
message,
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
UIModalService,
|
||||
UIDialogService,
|
||||
MeasurementService,
|
||||
LoggerService,
|
||||
} from './services';
|
||||
|
||||
const OHIF = {
|
||||
@@ -60,6 +61,7 @@ const OHIF = {
|
||||
UIModalService,
|
||||
UIDialogService,
|
||||
MeasurementService,
|
||||
LoggerService,
|
||||
};
|
||||
|
||||
export {
|
||||
@@ -93,6 +95,7 @@ export {
|
||||
UIModalService,
|
||||
UIDialogService,
|
||||
MeasurementService,
|
||||
LoggerService,
|
||||
};
|
||||
|
||||
export { OHIF };
|
||||
|
||||
@@ -14,6 +14,7 @@ describe('Top level exports', () => {
|
||||
'UIModalService',
|
||||
'UIDialogService',
|
||||
'MeasurementService',
|
||||
'LoggerService',
|
||||
//
|
||||
'utils',
|
||||
'hotkeys',
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
const name = 'LoggerService';
|
||||
|
||||
const publicAPI = {
|
||||
name,
|
||||
info: _info,
|
||||
error: _error,
|
||||
setServiceImplementation,
|
||||
};
|
||||
|
||||
const serviceImplementation = {
|
||||
_info: () => console.warn('info() NOT IMPLEMENTED'),
|
||||
_error: () => console.warn('error() NOT IMPLEMENTED'),
|
||||
};
|
||||
|
||||
/**
|
||||
* Logs an info
|
||||
*
|
||||
* @param {object} props { message, displayOnConsole }
|
||||
*/
|
||||
function _info({ message, displayOnConsole }) {
|
||||
return serviceImplementation._info({
|
||||
message,
|
||||
displayOnConsole,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs an error
|
||||
*
|
||||
* @param {object} props { error, stack, message, displayOnConsole }
|
||||
* @returns void
|
||||
*/
|
||||
function _error({ error, stack, message, displayOnConsole }) {
|
||||
return serviceImplementation._error({
|
||||
error,
|
||||
stack,
|
||||
message,
|
||||
displayOnConsole,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param {*} {
|
||||
* info: infoImplementation,
|
||||
* error: errorImplementation,
|
||||
* }
|
||||
*/
|
||||
function setServiceImplementation({
|
||||
info: infoImplementation,
|
||||
error: errorImplementation,
|
||||
}) {
|
||||
if (infoImplementation) {
|
||||
serviceImplementation._info = infoImplementation;
|
||||
}
|
||||
if (errorImplementation) {
|
||||
serviceImplementation._error = errorImplementation;
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name,
|
||||
create: ({ configuration = {} }) => {
|
||||
return publicAPI;
|
||||
},
|
||||
};
|
||||
@@ -3,6 +3,7 @@ import UINotificationService from './UINotificationService';
|
||||
import UIModalService from './UIModalService';
|
||||
import UIDialogService from './UIDialogService';
|
||||
import MeasurementService from './MeasurementService';
|
||||
import LoggerService from './LoggerService';
|
||||
|
||||
export {
|
||||
UINotificationService,
|
||||
@@ -10,4 +11,5 @@ export {
|
||||
UIDialogService,
|
||||
ServicesManager,
|
||||
MeasurementService,
|
||||
LoggerService,
|
||||
};
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.9.0](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.8.2...@ohif/ui@1.9.0) (2021-03-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **log:** add new log service ([14d6454](https://github.com/OHIF/Viewers/commit/14d6454eafaa2ccb50e133c2945c9558052ea27e))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.8.2](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.8.1...@ohif/ui@1.8.2) (2021-02-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/ui",
|
||||
"version": "1.8.2",
|
||||
"version": "1.9.0",
|
||||
"description": "A set of React components for Medical Imaging Viewers",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
import React, { useState, createContext, useContext, useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const LoggerContext = createContext(null);
|
||||
const { Provider } = LoggerContext;
|
||||
|
||||
export const useLogger = () => useContext(LoggerContext);
|
||||
|
||||
const LoggerProvider = ({ children, service }) => {
|
||||
const [state, setState] = useState({
|
||||
errors: [],
|
||||
infos: [],
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
const onErrorHandler = ({ error: errorObject, message }) => {
|
||||
error({ error: errorObject, message });
|
||||
};
|
||||
window.addEventListener('error', onErrorHandler);
|
||||
return () => {
|
||||
window.removeEventListener('error', onErrorHandler);
|
||||
};
|
||||
}, []);
|
||||
|
||||
/**
|
||||
* Logs an error
|
||||
*
|
||||
* @param {object} props { error, stack, message, displayOnConsole }
|
||||
* @returns void
|
||||
*/
|
||||
const error = ({
|
||||
error = {},
|
||||
stack = '',
|
||||
message = '',
|
||||
displayOnConsole = true,
|
||||
}) => {
|
||||
const errorObject = { error, stack, message, displayOnConsole };
|
||||
setState(state => ({ ...state, errors: [...state.errors, errorObject] }));
|
||||
|
||||
if (displayOnConsole) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Logs an info
|
||||
*
|
||||
* @param {object} props { message, displayOnConsole }
|
||||
* @returns void
|
||||
*/
|
||||
const info = ({ message = '', displayOnConsole = true }) => {
|
||||
setState(state => ({
|
||||
...state,
|
||||
infos: state.infos.push({ message, displayOnConsole }),
|
||||
}));
|
||||
|
||||
if (displayOnConsole) {
|
||||
console.info(message);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the implementation of a log service that can be used by extensions
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
useEffect(() => {
|
||||
if (service) {
|
||||
service.setServiceImplementation({ error, info });
|
||||
}
|
||||
}, [error, service, info]);
|
||||
|
||||
return <Provider value={{ info, error, state }}>{children}</Provider>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Higher Order Component to use the log methods through a Class Component
|
||||
*
|
||||
* @returns
|
||||
*/
|
||||
export const withLogger = Component => {
|
||||
return function WrappedComponent(props) {
|
||||
const { error, info, state } = useLogger();
|
||||
return <Component {...props} logger={{ error, info, state }} />;
|
||||
};
|
||||
};
|
||||
|
||||
LoggerProvider.defaultProps = {
|
||||
service: null,
|
||||
};
|
||||
|
||||
LoggerProvider.propTypes = {
|
||||
children: PropTypes.oneOfType([
|
||||
PropTypes.arrayOf(PropTypes.node),
|
||||
PropTypes.node,
|
||||
]).isRequired,
|
||||
service: PropTypes.shape({
|
||||
setServiceImplementation: PropTypes.func,
|
||||
}),
|
||||
};
|
||||
|
||||
export default LoggerProvider;
|
||||
|
||||
export const LogConsumer = LoggerContext.Consumer;
|
||||
@@ -18,3 +18,8 @@ export {
|
||||
withDialog,
|
||||
useDialog,
|
||||
} from './DialogProvider.js';
|
||||
export {
|
||||
default as LoggerProvider,
|
||||
withLogger,
|
||||
useLogger,
|
||||
} from './LoggerProvider.js';
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
AboutContent,
|
||||
OHIFModal,
|
||||
ErrorBoundary,
|
||||
ErrorPage
|
||||
ErrorPage,
|
||||
} from './components';
|
||||
import { useDebounce, useMedia } from './hooks';
|
||||
|
||||
@@ -66,6 +66,9 @@ import {
|
||||
ModalConsumer,
|
||||
useModal,
|
||||
withModal,
|
||||
LoggerProvider,
|
||||
withLogger,
|
||||
useLogger,
|
||||
} from './contextProviders';
|
||||
|
||||
export {
|
||||
@@ -127,11 +130,14 @@ export {
|
||||
useDialog,
|
||||
ErrorBoundary,
|
||||
ErrorPage,
|
||||
LoggerProvider,
|
||||
withLogger,
|
||||
useLogger,
|
||||
// Hooks
|
||||
useDebounce,
|
||||
useMedia,
|
||||
// Utils
|
||||
ViewerbaseDragDropContext,
|
||||
asyncComponent,
|
||||
retryImport
|
||||
retryImport,
|
||||
};
|
||||
@@ -3,6 +3,49 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [4.9.2](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.9.1...@ohif/viewer@4.9.2) (2021-03-09)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.9.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.9.0...@ohif/viewer@4.9.1) (2021-03-09)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [4.9.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.8.12...@ohif/viewer@4.9.0) (2021-03-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **log:** add new log service ([14d6454](https://github.com/OHIF/Viewers/commit/14d6454eafaa2ccb50e133c2945c9558052ea27e))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.8.12](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.8.11...@ohif/viewer@4.8.12) (2021-03-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.8.11](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.8.10...@ohif/viewer@4.8.11) (2021-02-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.8.10](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.8.9...@ohif/viewer@4.8.10) (2021-02-08)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/viewer",
|
||||
"version": "4.8.10",
|
||||
"version": "4.9.2",
|
||||
"description": "OHIF Viewer",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
@@ -49,18 +49,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@ohif/core": "^2.12.3",
|
||||
"@ohif/extension-cornerstone": "^2.10.1",
|
||||
"@ohif/extension-debugging": "^0.1.6",
|
||||
"@ohif/extension-dicom-html": "^1.3.1",
|
||||
"@ohif/extension-dicom-microscopy": "^0.51.4",
|
||||
"@ohif/core": "^2.13.1",
|
||||
"@ohif/extension-cornerstone": "^2.10.4",
|
||||
"@ohif/extension-debugging": "^0.2.0",
|
||||
"@ohif/extension-dicom-html": "^1.3.4",
|
||||
"@ohif/extension-dicom-microscopy": "^0.52.0",
|
||||
"@ohif/extension-dicom-pdf": "^1.0.6",
|
||||
"@ohif/extension-dicom-rt": "^0.6.4",
|
||||
"@ohif/extension-dicom-segmentation": "^0.5.2",
|
||||
"@ohif/extension-dicom-rt": "^0.6.7",
|
||||
"@ohif/extension-dicom-segmentation": "^0.6.1",
|
||||
"@ohif/extension-lesion-tracker": "^0.2.1",
|
||||
"@ohif/extension-vtk": "^1.10.4",
|
||||
"@ohif/extension-vtk": "^1.11.2",
|
||||
"@ohif/i18n": "^0.53.0",
|
||||
"@ohif/ui": "^1.8.2",
|
||||
"@ohif/ui": "^1.9.0",
|
||||
"@tanem/react-nprogress": "^1.1.25",
|
||||
"classnames": "^2.2.6",
|
||||
"core-js": "^3.2.1",
|
||||
@@ -68,7 +68,7 @@
|
||||
"cornerstone-math": "^0.1.8",
|
||||
"cornerstone-tools": "^4.20.1",
|
||||
"cornerstone-wado-image-loader": "^3.1.0",
|
||||
"dcmjs": "0.17.2",
|
||||
"dcmjs": "0.18.3",
|
||||
"dicom-parser": "^1.8.3",
|
||||
"dicomweb-client": "^0.4.4",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
||||
+30
-19
@@ -13,6 +13,7 @@ import {
|
||||
ModalProvider,
|
||||
DialogProvider,
|
||||
OHIFModal,
|
||||
LoggerProvider,
|
||||
ErrorBoundary,
|
||||
} from '@ohif/ui';
|
||||
|
||||
@@ -24,6 +25,7 @@ import {
|
||||
UINotificationService,
|
||||
UIModalService,
|
||||
UIDialogService,
|
||||
LoggerService,
|
||||
MeasurementService,
|
||||
utils,
|
||||
redux as reduxOHIF,
|
||||
@@ -141,6 +143,7 @@ class App extends Component {
|
||||
UIModalService,
|
||||
UIDialogService,
|
||||
MeasurementService,
|
||||
LoggerService,
|
||||
]);
|
||||
_initExtensions(
|
||||
[...defaultExtensions, ...extensions],
|
||||
@@ -164,6 +167,7 @@ class App extends Component {
|
||||
UIDialogService,
|
||||
UIModalService,
|
||||
MeasurementService,
|
||||
LoggerService,
|
||||
} = servicesManager.services;
|
||||
|
||||
if (this._userManager) {
|
||||
@@ -176,18 +180,20 @@ class App extends Component {
|
||||
<UserManagerContext.Provider value={this._userManager}>
|
||||
<Router basename={routerBasename}>
|
||||
<WhiteLabelingContext.Provider value={whiteLabeling}>
|
||||
<SnackbarProvider service={UINotificationService}>
|
||||
<DialogProvider service={UIDialogService}>
|
||||
<ModalProvider
|
||||
modal={OHIFModal}
|
||||
service={UIModalService}
|
||||
>
|
||||
<OHIFStandaloneViewer
|
||||
userManager={this._userManager}
|
||||
/>
|
||||
</ModalProvider>
|
||||
</DialogProvider>
|
||||
</SnackbarProvider>
|
||||
<LoggerProvider service={LoggerService}>
|
||||
<SnackbarProvider service={UINotificationService}>
|
||||
<DialogProvider service={UIDialogService}>
|
||||
<ModalProvider
|
||||
modal={OHIFModal}
|
||||
service={UIModalService}
|
||||
>
|
||||
<OHIFStandaloneViewer
|
||||
userManager={this._userManager}
|
||||
/>
|
||||
</ModalProvider>
|
||||
</DialogProvider>
|
||||
</SnackbarProvider>
|
||||
</LoggerProvider>
|
||||
</WhiteLabelingContext.Provider>
|
||||
</Router>
|
||||
</UserManagerContext.Provider>
|
||||
@@ -206,13 +212,18 @@ class App extends Component {
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<Router basename={routerBasename}>
|
||||
<WhiteLabelingContext.Provider value={whiteLabeling}>
|
||||
<SnackbarProvider service={UINotificationService}>
|
||||
<DialogProvider service={UIDialogService}>
|
||||
<ModalProvider modal={OHIFModal} service={UIModalService}>
|
||||
<OHIFStandaloneViewer />
|
||||
</ModalProvider>
|
||||
</DialogProvider>
|
||||
</SnackbarProvider>
|
||||
<LoggerProvider service={LoggerService}>
|
||||
<SnackbarProvider service={UINotificationService}>
|
||||
<DialogProvider service={UIDialogService}>
|
||||
<ModalProvider
|
||||
modal={OHIFModal}
|
||||
service={UIModalService}
|
||||
>
|
||||
<OHIFStandaloneViewer />
|
||||
</ModalProvider>
|
||||
</DialogProvider>
|
||||
</SnackbarProvider>
|
||||
</LoggerProvider>
|
||||
</WhiteLabelingContext.Provider>
|
||||
</Router>
|
||||
</I18nextProvider>
|
||||
|
||||
@@ -4,7 +4,7 @@ import React, { useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import { utils } from '@ohif/core';
|
||||
import { useSnackbarContext } from '@ohif/ui';
|
||||
import { useSnackbarContext, useLogger } from '@ohif/ui';
|
||||
//
|
||||
import ViewportPane from './ViewportPane.js';
|
||||
import DefaultViewport from './DefaultViewport.js';
|
||||
@@ -12,7 +12,7 @@ import EmptyViewport from './EmptyViewport.js';
|
||||
|
||||
const { loadAndCacheDerivedDisplaySets } = utils;
|
||||
|
||||
const ViewportGrid = function (props) {
|
||||
const ViewportGrid = function(props) {
|
||||
const {
|
||||
activeViewportIndex,
|
||||
availablePlugins,
|
||||
@@ -36,14 +36,15 @@ const ViewportGrid = function (props) {
|
||||
}
|
||||
|
||||
const snackbar = useSnackbarContext();
|
||||
const logger = useLogger();
|
||||
|
||||
useEffect(() => {
|
||||
if (isStudyLoaded) {
|
||||
viewportData.forEach(displaySet => {
|
||||
const promises = loadAndCacheDerivedDisplaySets(displaySet, studies);
|
||||
|
||||
promises.forEach(promise => {
|
||||
promise.catch(error => {
|
||||
logger.error({ error, message: error.message });
|
||||
snackbar.show({
|
||||
title: 'Error loading derived display set:',
|
||||
message: error.message,
|
||||
|
||||
@@ -6619,10 +6619,10 @@ dateformat@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
|
||||
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
|
||||
|
||||
dcmjs@0.17.2:
|
||||
version "0.17.2"
|
||||
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.17.2.tgz#81d6e696119c25afbd26967a6250a32c25f06535"
|
||||
integrity sha512-wM9AUWt9vM2S+owI/4UjoBCSV9Mfi/m5rykHH5WTDZVxQZUrL/ehOC/l7d7gkcMaOSD0C0r9X56Nn/562Jt1/Q==
|
||||
dcmjs@0.18.3:
|
||||
version "0.18.3"
|
||||
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.18.3.tgz#17d5a23d96b63264b8a1a859e4cb000b3e20495b"
|
||||
integrity sha512-nmG6wEBcIMnadXAZOTcXwacBv+lrh8bqPwIKZwdy7AkdihLEwI6/OnyP+PYjzcdltuPu9wOQcKZionvXuCteag==
|
||||
dependencies:
|
||||
"@babel/polyfill" "^7.8.3"
|
||||
"@babel/runtime" "^7.8.4"
|
||||
|
||||
Reference in new issue
Block a user