From c27981552a2d51b1cb1c37b94457623e31572377 Mon Sep 17 00:00:00 2001 From: James Petts Date: Fri, 18 Sep 2020 16:13:48 +0100 Subject: [PATCH] Idc update (#5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 🎸 Update react-vtkjs-viewport usage to use requestPool (#1984) * feat: 🎸 Update react-vtkjs-viewport usage to use requestPool * Fix import of react-vtkjs-viewport to cornerstone-tools path. * Increase maximum load time of MPR test now we are throttling requests. * Remove debugger Co-authored-by: Erik Ziegler * chore(release): publish [skip ci] - @ohif/extension-cornerstone@2.9.0 - @ohif/extension-dicom-rt@0.4.0 - @ohif/extension-dicom-segmentation@0.4.0 - @ohif/extension-vtk@1.7.0 - @ohif/core@2.10.0 - @ohif/viewer@4.4.0 * fix: Avoid lerna:restore unless we are on Netlify (closes #1926, #1996) * wip * fix: Fix incorrect command name in Percy test (#1999) * perf(stackPrefetch): Added stackPrefetch config with 20 max concurrent requests (#2000) Co-authored-by: Danny Brown * chore(release): publish [skip ci] - @ohif/extension-cornerstone@2.9.1 - @ohif/viewer@4.4.1 * feat: 🎸 Filter/promote multiple series instances (#1533) improve filter/promote to be applied on multiple series instances ✅ Closes: 1532 Co-authored-by: Rodolfo Ladeira * chore(release): publish [skip ci] - @ohif/viewer@4.5.0 * fix: Updated react-cornerstone-viewport to version 4.0.2 (#2001) Co-authored-by: Danny Brown * chore(release): publish [skip ci] - @ohif/extension-cornerstone@2.9.2 - @ohif/viewer@4.5.1 * fix: 🐛 Fail gracefully on an MPR load error (#1992) * feat: 🎸 Update react-vtkjs-viewport usage to use requestPool * Fix import of react-vtkjs-viewport to cornerstone-tools path. * Increase maximum load time of MPR test now we are throttling requests. * fix: 🐛 Fail gracefully on an MPR load error * Respond to reviewer comments. * chore(release): publish [skip ci] - @ohif/extension-vtk@1.7.1 - @ohif/viewer@4.5.2 * [IDC-1994] Sort series list by SeriesNumber, and sort by same SeriesNumber by date/time. (#2010) * Sort based on SeriesNumber and SeriesDate/SeriesTime. * Harden, and perform final sort in algorithm if last N entries have the same SeriesNumber. * Switch to insertion rather than sorting as sorting is too slow. Reimplement low priority sorting into new insertion method. * Fix local file viewing. * chore(release): publish [skip ci] - @ohif/extension-dicom-html@1.2.5 - @ohif/extension-dicom-microscopy@0.51.1 - @ohif/extension-dicom-pdf@1.0.4 - @ohif/extension-dicom-rt@0.4.1 - @ohif/extension-dicom-segmentation@0.4.1 - @ohif/extension-vtk@1.7.2 - @ohif/core@2.10.1 - @ohif/viewer@4.5.3 * [IDC-2017] Harden segmentation import to support more SEGs (#2024) * fix: 🐛 Upgrade dcmjs version to support more SEGs * chore(release): publish [skip ci] - @ohif/extension-cornerstone@2.9.3 - @ohif/extension-dicom-html@1.2.6 - @ohif/extension-dicom-rt@0.4.2 - @ohif/extension-dicom-segmentation@0.4.2 - @ohif/extension-vtk@1.7.3 - @ohif/core@2.10.2 - @ohif/viewer@4.5.4 * [IDC-1939] Debug Dialog part 1 (#2011) * WIP debug dialog * Rename the p10 downloader extension to debugger extension, add button to toolbar. Deactivate it by default. * Fix unit tests * chore(release): publish [skip ci] - @ohif/extension-cornerstone@2.9.4 - @ohif/extension-debugging@0.1.3 - @ohif/extension-dicom-html@1.2.7 - @ohif/extension-dicom-microscopy@0.51.2 - @ohif/extension-dicom-pdf@1.0.5 - @ohif/extension-dicom-rt@0.4.3 - @ohif/extension-dicom-segmentation@0.4.3 - @ohif/extension-lesion-tracker@0.2.1 - @ohif/extension-vtk@1.7.4 - @ohif/core@2.10.3 - @ohif/viewer@4.5.5 * IDC-1532 multiple series search google (#2026) * Multiple series search for google cloud adapter. * Revert IDC config. * fix: 🐛 Series filtering on multiple series for google * Revert changes to default config. * Address reviewers comments. * Fixed spelling mistakes * chore(release): publish [skip ci] - @ohif/extension-vtk@1.7.5 - @ohif/core@2.10.4 - @ohif/viewer@4.5.6 * Split query parameter calls. (#2035) * chore(release): publish [skip ci] - @ohif/viewer@4.5.7 * [IDC-1672] Highlight SEG segment/ RT structure when click to jump. (#2034) * Highlight for RTSTRUCT. * SEG temp crosshairs. * Disable RT highlighting for now. * Remove TODO * chore(release): publish [skip ci] - @ohif/extension-debugging@0.1.4 - @ohif/extension-dicom-rt@0.4.4 - @ohif/extension-dicom-segmentation@0.4.4 - @ohif/viewer@4.5.8 * [IDC-1129] - DICOM Tag Viewer extension (#2022) * WIP render top level tags. * Add drop down to select series. * Fix errors with type 2 sequences. * WIP swap instance. * Fix formatting and make fullscreen. * Remove debuggers. * Finish formatting. * Fix error with double SeriesNumber deconstruction. * Address reviewer comments. * chore(release): publish [skip ci] - @ohif/extension-dicom-html@1.2.8 - @ohif/extension-dicom-microscopy@0.51.3 - @ohif/extension-dicom-pdf@1.0.6 - @ohif/extension-dicom-rt@0.4.5 - @ohif/extension-dicom-segmentation@0.4.5 - @ohif/extension-dicom-tag-browser@0.0.2 - @ohif/extension-vtk@1.7.6 - @ohif/core@2.10.5 - @ohif/ui@1.5.4 - @ohif/viewer@4.5.9 * [IDC-2006] - optional mailTo for debugging extension. (#2027) * WIP debug dialog * Rename the p10 downloader extension to debugger extension, add button to toolbar. Deactivate it by default. * Fix unit tests * WIP * WIP * Finish mailTo * chore(release): publish [skip ci] - @ohif/extension-debugging@0.1.5 - @ohif/extension-vtk@1.7.7 - @ohif/ui@1.5.5 - @ohif/viewer@4.5.10 * [IDC-1905] Hover tooltips for Segmentation + RTSTRUCT extension (#2044) * WIP debug dialog * Rename the p10 downloader extension to debugger extension, add button to toolbar. Deactivate it by default. * Fix unit tests * WIP * WIP * Finish mailTo * tooltop Co-authored-by: Erik Ziegler Co-authored-by: ohif-bot Co-authored-by: Alex Broaddus Co-authored-by: Danny Brown Co-authored-by: ladeirarodolfo <39910206+ladeirarodolfo@users.noreply.github.com> Co-authored-by: Rodolfo Ladeira --- extensions/cornerstone/CHANGELOG.md | 468 +++++------------ extensions/cornerstone/package.json | 4 +- extensions/cornerstone/src/index.js | 2 + .../.webpack/webpack.dev.js | 0 .../.webpack/webpack.prod.js | 0 .../CHANGELOG.md | 24 + .../LICENSE | 0 .../README.md | 0 .../package.json | 7 +- extensions/debugging/src/DebugReportModal.css | 9 + extensions/debugging/src/DebugReportModal.js | 245 +++++++++ .../src/commandsModule.js | 30 +- .../src/downloadAndZip.js | 0 .../src/index.js | 18 +- extensions/debugging/src/state.js | 3 + extensions/debugging/src/toolbarModule.js | 20 + .../src/utils.js | 0 extensions/dicom-html/CHANGELOG.md | 24 + extensions/dicom-html/package.json | 4 +- .../src/OHIFDicomHtmlSopClassHandler.js | 8 +- extensions/dicom-html/src/index.js | 2 + extensions/dicom-microscopy/CHANGELOG.md | 16 + extensions/dicom-microscopy/package.json | 2 +- .../src/DicomMicroscopySopClassHandler.js | 8 +- extensions/dicom-microscopy/src/index.js | 2 + extensions/dicom-pdf/CHANGELOG.md | 79 +-- extensions/dicom-pdf/package.json | 2 +- .../src/OHIFDicomPDFSopClassHandler.js | 6 +- extensions/dicom-pdf/src/index.js | 2 + extensions/dicom-rt/CHANGELOG.md | 123 ++--- extensions/dicom-rt/package.json | 7 +- .../src/OHIFDicomRTStructSopClassHandler.js | 1 + .../src/components/RTPanel/RTPanel.js | 24 +- .../StructureSetItem/StructureSetItem.js | 14 +- extensions/dicom-rt/src/index.js | 3 +- .../dicom-rt/src/tools/RTStructDisplayTool.js | 58 ++- .../src/tools/modules/rtStructModule.js | 3 +- .../src/utils/drawCanvasCrosshairs.js | 56 ++ extensions/dicom-segmentation/CHANGELOG.md | 126 ++--- extensions/dicom-segmentation/package.json | 7 +- .../src/components/SegmentItem/SegmentItem.js | 30 +- .../SegmentationPanel/SegmentationPanel.js | 7 + .../src/getOHIFDicomSegSopClassHandler.js | 3 +- .../src/getSourceDisplaySet.js | 67 ++- extensions/dicom-segmentation/src/index.js | 3 +- extensions/dicom-segmentation/src/init.js | 3 + .../src/tools/DICOMSegTempCrosshairsTool.js | 127 +++++ .../src/tools/TOOL_NAMES.js | 5 + .../src/utils/drawCanvasCrosshairs.js | 56 ++ .../dicom-tag-browser/.webpack/webpack.dev.js | 8 + .../.webpack/webpack.prod.js | 38 ++ extensions/dicom-tag-browser/CHANGELOG.md | 8 + extensions/dicom-tag-browser/LICENSE | 21 + extensions/dicom-tag-browser/README.md | 1 + extensions/dicom-tag-browser/package.json | 40 ++ .../src/components/DicomBrowserSelect.js | 58 +++ .../src/components/DicomBrowserSelectItem.css | 25 + .../src/components/DicomBrowserSelectItem.js | 27 + .../src/components/DicomTagBrowser.css | 27 + .../src/components/DicomTagBrowser.js | 228 +++++++++ .../src/getCommandsModule.js | 52 ++ extensions/dicom-tag-browser/src/index.js | 26 + .../dicom-tag-browser/src/toolbarModule.js | 20 + extensions/lesion-tracker/CHANGELOG.md | 8 + extensions/lesion-tracker/package.json | 2 +- extensions/lesion-tracker/src/index.js | 4 +- extensions/vtk/CHANGELOG.md | 40 ++ extensions/vtk/package.json | 8 +- extensions/vtk/src/index.js | 2 + platform/core/CHANGELOG.md | 478 ++++++------------ platform/core/package.json | 4 +- .../core/src/extensions/ExtensionManager.js | 7 +- .../src/extensions/ExtensionManager.test.js | 4 +- .../core/src/services/UIModalService/index.js | 2 + .../src/studies/retrieveStudiesMetadata.js | 12 +- .../core/src/studies/retrieveStudyMetadata.js | 80 ++- platform/ui/CHANGELOG.md | 16 + platform/ui/package.json | 2 +- .../ui/src/components/ohifModal/OHIFModal.js | 7 +- .../src/components/ohifModal/OHIFModal.styl | 8 + .../ui/src/contextProviders/ModalProvider.js | 3 + platform/ui/src/elements/Icon/getIcon.js | 2 + .../elements/Icon/icons/envelope-square.svg | 10 + .../Nginx-Dcm4che/docker-compose-dcm4che.yml | 9 +- platform/viewer/CHANGELOG.md | 56 ++ platform/viewer/package.json | 26 +- platform/viewer/public/config/idc.js | 5 +- .../GenericViewerCommands/index.js | 3 + .../appExtensions/MeasurementsPanel/index.js | 3 + .../ViewerLocalFileData.js | 2 - .../ViewerRetrieveStudyData.js | 8 + platform/viewer/src/index.js | 10 +- yarn.lock | 26 +- 93 files changed, 2147 insertions(+), 987 deletions(-) rename extensions/{dicom-p10-downloader => debugging}/.webpack/webpack.dev.js (100%) rename extensions/{dicom-p10-downloader => debugging}/.webpack/webpack.prod.js (100%) rename extensions/{dicom-p10-downloader => debugging}/CHANGELOG.md (70%) rename extensions/{dicom-p10-downloader => debugging}/LICENSE (100%) rename extensions/{dicom-p10-downloader => debugging}/README.md (100%) rename extensions/{dicom-p10-downloader => debugging}/package.json (86%) create mode 100644 extensions/debugging/src/DebugReportModal.css create mode 100644 extensions/debugging/src/DebugReportModal.js rename extensions/{dicom-p10-downloader => debugging}/src/commandsModule.js (82%) rename extensions/{dicom-p10-downloader => debugging}/src/downloadAndZip.js (100%) rename extensions/{dicom-p10-downloader => debugging}/src/index.js (55%) create mode 100644 extensions/debugging/src/state.js create mode 100644 extensions/debugging/src/toolbarModule.js rename extensions/{dicom-p10-downloader => debugging}/src/utils.js (100%) create mode 100644 extensions/dicom-rt/src/utils/drawCanvasCrosshairs.js create mode 100644 extensions/dicom-segmentation/src/tools/DICOMSegTempCrosshairsTool.js create mode 100644 extensions/dicom-segmentation/src/tools/TOOL_NAMES.js create mode 100644 extensions/dicom-segmentation/src/utils/drawCanvasCrosshairs.js create mode 100644 extensions/dicom-tag-browser/.webpack/webpack.dev.js create mode 100644 extensions/dicom-tag-browser/.webpack/webpack.prod.js create mode 100644 extensions/dicom-tag-browser/CHANGELOG.md create mode 100644 extensions/dicom-tag-browser/LICENSE create mode 100644 extensions/dicom-tag-browser/README.md create mode 100644 extensions/dicom-tag-browser/package.json create mode 100644 extensions/dicom-tag-browser/src/components/DicomBrowserSelect.js create mode 100644 extensions/dicom-tag-browser/src/components/DicomBrowserSelectItem.css create mode 100644 extensions/dicom-tag-browser/src/components/DicomBrowserSelectItem.js create mode 100644 extensions/dicom-tag-browser/src/components/DicomTagBrowser.css create mode 100644 extensions/dicom-tag-browser/src/components/DicomTagBrowser.js create mode 100644 extensions/dicom-tag-browser/src/getCommandsModule.js create mode 100644 extensions/dicom-tag-browser/src/index.js create mode 100644 extensions/dicom-tag-browser/src/toolbarModule.js create mode 100644 platform/ui/src/elements/Icon/icons/envelope-square.svg diff --git a/extensions/cornerstone/CHANGELOG.md b/extensions/cornerstone/CHANGELOG.md index 049b2ff9ac1..b09bdc648ef 100644 --- a/extensions/cornerstone/CHANGELOG.md +++ b/extensions/cornerstone/CHANGELOG.md @@ -1,628 +1,436 @@ # Change Log -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [2.9.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.9.1...@ohif/extension-cornerstone@2.9.2) (2020-08-20) +All notable changes to this project will be documented in this file. See +[Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.9.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.9.3...@ohif/extension-cornerstone@2.9.4) (2020-09-03) -### Bug Fixes +**Note:** Version bump only for package @ohif/extension-cornerstone -* Updated react-cornerstone-viewport to version 4.0.2 ([#2001](https://github.com/OHIF/Viewers/issues/2001)) ([59ab68b](https://github.com/OHIF/Viewers/commit/59ab68b4edbfec010170c4429c300a53f688bf94)) +## [2.9.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.9.2...@ohif/extension-cornerstone@2.9.3) (2020-09-02) +**Note:** Version bump only for package @ohif/extension-cornerstone +## [2.9.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.9.1...@ohif/extension-cornerstone@2.9.2) (2020-08-20) +### Bug Fixes +- Updated react-cornerstone-viewport to version 4.0.2 + ([#2001](https://github.com/OHIF/Viewers/issues/2001)) + ([59ab68b](https://github.com/OHIF/Viewers/commit/59ab68b4edbfec010170c4429c300a53f688bf94)) ## [2.9.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.9.0...@ohif/extension-cornerstone@2.9.1) (2020-08-20) - ### Performance Improvements -* **stackPrefetch:** Added stackPrefetch config with 20 max concurrent requests ([#2000](https://github.com/OHIF/Viewers/issues/2000)) ([3b02a06](https://github.com/OHIF/Viewers/commit/3b02a06f5e250660edde4862ce44147db3dc3ab9)) - - - - +- **stackPrefetch:** Added stackPrefetch config with 20 max concurrent requests + ([#2000](https://github.com/OHIF/Viewers/issues/2000)) + ([3b02a06](https://github.com/OHIF/Viewers/commit/3b02a06f5e250660edde4862ce44147db3dc3ab9)) # [2.9.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.8.5...@ohif/extension-cornerstone@2.9.0) (2020-08-18) - ### Features -* 🎸 Update react-vtkjs-viewport usage to use requestPool ([#1984](https://github.com/OHIF/Viewers/issues/1984)) ([bb5f30c](https://github.com/OHIF/Viewers/commit/bb5f30ce2a0192d2e021beaaadfff22fd38e17b9)) - - - - +- 🎸 Update react-vtkjs-viewport usage to use requestPool + ([#1984](https://github.com/OHIF/Viewers/issues/1984)) + ([bb5f30c](https://github.com/OHIF/Viewers/commit/bb5f30ce2a0192d2e021beaaadfff22fd38e17b9)) ## [2.8.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.8.4...@ohif/extension-cornerstone@2.8.5) (2020-08-05) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## [2.8.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.8.3...@ohif/extension-cornerstone@2.8.4) (2020-07-13) - ### Bug Fixes -* 🐛 - Put guards in all places that a cornerstone re-render ([#1899](https://github.com/OHIF/Viewers/issues/1899)) ([451f7ea](https://github.com/OHIF/Viewers/commit/451f7eab9258e7a193eb362e0926b13aedc4b3c9)) - - - - +- 🐛 - Put guards in all places that a cornerstone re-render + ([#1899](https://github.com/OHIF/Viewers/issues/1899)) + ([451f7ea](https://github.com/OHIF/Viewers/commit/451f7eab9258e7a193eb362e0926b13aedc4b3c9)) ## [2.8.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.8.2...@ohif/extension-cornerstone@2.8.3) (2020-07-13) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## [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) - - - - +- 🐛 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) - - - - +- 🐛 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) - ### Features -* 🎸 1729 - error boundary wrapper ([#1764](https://github.com/OHIF/Viewers/issues/1764)) ([c02b232](https://github.com/OHIF/Viewers/commit/c02b232b0cc24f38af5d5e3831d987d048e60ada)) - - - - +- 🎸 1729 - error boundary wrapper + ([#1764](https://github.com/OHIF/Viewers/issues/1764)) + ([c02b232](https://github.com/OHIF/Viewers/commit/c02b232b0cc24f38af5d5e3831d987d048e60ada)) ## [2.7.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.7.2...@ohif/extension-cornerstone@2.7.3) (2020-05-12) - ### Bug Fixes -* 🐛 Fix seg color load ([#1724](https://github.com/OHIF/Viewers/issues/1724)) ([c4f84b1](https://github.com/OHIF/Viewers/commit/c4f84b1174d04ba84d37ed89b6d7ab541be28181)) - - - - +- 🐛 Fix seg color load ([#1724](https://github.com/OHIF/Viewers/issues/1724)) + ([c4f84b1](https://github.com/OHIF/Viewers/commit/c4f84b1174d04ba84d37ed89b6d7ab541be28181)) ## [2.7.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.7.1...@ohif/extension-cornerstone@2.7.2) (2020-05-04) - ### Bug Fixes -* 🐛 Proper error handling for derived display sets ([#1708](https://github.com/OHIF/Viewers/issues/1708)) ([5b20d8f](https://github.com/OHIF/Viewers/commit/5b20d8f323e4b3ef9988f2f2ab672d697b6da409)) - - - - +- 🐛 Proper error handling for derived display sets + ([#1708](https://github.com/OHIF/Viewers/issues/1708)) + ([5b20d8f](https://github.com/OHIF/Viewers/commit/5b20d8f323e4b3ef9988f2f2ab672d697b6da409)) ## [2.7.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.7.0...@ohif/extension-cornerstone@2.7.1) (2020-05-04) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - # [2.7.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.6.1...@ohif/extension-cornerstone@2.7.0) (2020-04-24) - ### Features -* 🎸 Seg jump to slice + show/hide ([835f64d](https://github.com/OHIF/Viewers/commit/835f64d47a9994f6a25aaf3941a4974e215e7e7f)) - - - - +- 🎸 Seg jump to slice + show/hide + ([835f64d](https://github.com/OHIF/Viewers/commit/835f64d47a9994f6a25aaf3941a4974e215e7e7f)) ## [2.6.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.6.0...@ohif/extension-cornerstone@2.6.1) (2020-04-23) - ### Bug Fixes -* 🐛 Multiframe fix ([#1661](https://github.com/OHIF/Viewers/issues/1661)) ([7120561](https://github.com/OHIF/Viewers/commit/71205618ecb8b592247c5acb32284bfe7e18fce5)) - - - - +- 🐛 Multiframe fix ([#1661](https://github.com/OHIF/Viewers/issues/1661)) + ([7120561](https://github.com/OHIF/Viewers/commit/71205618ecb8b592247c5acb32284bfe7e18fce5)) # [2.6.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.5.2...@ohif/extension-cornerstone@2.6.0) (2020-04-23) - ### Features -* configuration to hook into XHR Error handling ([e96205d](https://github.com/OHIF/Viewers/commit/e96205de35e5bec14dc8a9a8509db3dd4e6ecdb6)) - - - - +- configuration to hook into XHR Error handling + ([e96205d](https://github.com/OHIF/Viewers/commit/e96205de35e5bec14dc8a9a8509db3dd4e6ecdb6)) ## [2.5.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.5.1...@ohif/extension-cornerstone@2.5.2) (2020-04-09) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## [2.5.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.5.0...@ohif/extension-cornerstone@2.5.1) (2020-04-02) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - # [2.5.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.4.3...@ohif/extension-cornerstone@2.5.0) (2020-03-13) - ### Features -* Segmentations Settings UI - Phase 1 [#1391](https://github.com/OHIF/Viewers/issues/1391) ([#1392](https://github.com/OHIF/Viewers/issues/1392)) ([e8842cf](https://github.com/OHIF/Viewers/commit/e8842cf8aebde98db7fc123e4867c8288552331f)), closes [#1423](https://github.com/OHIF/Viewers/issues/1423) - - - - +- Segmentations Settings UI - Phase 1 + [#1391](https://github.com/OHIF/Viewers/issues/1391) + ([#1392](https://github.com/OHIF/Viewers/issues/1392)) + ([e8842cf](https://github.com/OHIF/Viewers/commit/e8842cf8aebde98db7fc123e4867c8288552331f)), + closes [#1423](https://github.com/OHIF/Viewers/issues/1423) ## [2.4.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.4.2...@ohif/extension-cornerstone@2.4.3) (2020-03-09) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## [2.4.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.4.1...@ohif/extension-cornerstone@2.4.2) (2020-03-09) - ### Bug Fixes -* Remove Eraser and ROI Window ([6c950a9](https://github.com/OHIF/Viewers/commit/6c950a9669f7fbf3c46e48679fa26ee514824156)) - - - - +- Remove Eraser and ROI Window + ([6c950a9](https://github.com/OHIF/Viewers/commit/6c950a9669f7fbf3c46e48679fa26ee514824156)) ## [2.4.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.4.0...@ohif/extension-cornerstone@2.4.1) (2020-03-03) - ### Bug Fixes -* bump react-cornerstone-viewport version to address critical issue ([#1473](https://github.com/OHIF/Viewers/issues/1473)) ([ee80e02](https://github.com/OHIF/Viewers/commit/ee80e026610442e94caf5e4e3e4d193220cd0ece)) - - - - +- bump react-cornerstone-viewport version to address critical issue + ([#1473](https://github.com/OHIF/Viewers/issues/1473)) + ([ee80e02](https://github.com/OHIF/Viewers/commit/ee80e026610442e94caf5e4e3e4d193220cd0ece)) # [2.4.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.3.1...@ohif/extension-cornerstone@2.4.0) (2020-02-20) - ### Features -* [#1342](https://github.com/OHIF/Viewers/issues/1342) - Window level tab ([#1429](https://github.com/OHIF/Viewers/issues/1429)) ([ebc01a8](https://github.com/OHIF/Viewers/commit/ebc01a8ca238d5a3437b44d81f75aa8a5e8d0574)) - - - - +- [#1342](https://github.com/OHIF/Viewers/issues/1342) - Window level tab + ([#1429](https://github.com/OHIF/Viewers/issues/1429)) + ([ebc01a8](https://github.com/OHIF/Viewers/commit/ebc01a8ca238d5a3437b44d81f75aa8a5e8d0574)) ## [2.3.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.3.0...@ohif/extension-cornerstone@2.3.1) (2020-02-14) - ### Bug Fixes -* Creating 2 commands to activate zoom tool and also to move between displaySets ([#1446](https://github.com/OHIF/Viewers/issues/1446)) ([06a4af0](https://github.com/OHIF/Viewers/commit/06a4af06faaecf6fa06ccd90cdfa879ee8d53053)) - - - - +- Creating 2 commands to activate zoom tool and also to move between displaySets + ([#1446](https://github.com/OHIF/Viewers/issues/1446)) + ([06a4af0](https://github.com/OHIF/Viewers/commit/06a4af06faaecf6fa06ccd90cdfa879ee8d53053)) # [2.3.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.2.2...@ohif/extension-cornerstone@2.3.0) (2020-02-10) - ### Features -* 🎸 MeasurementService ([#1314](https://github.com/OHIF/Viewers/issues/1314)) ([0c37a40](https://github.com/OHIF/Viewers/commit/0c37a406d963569af8c3be24c697dafd42712dfc)) - - - - +- 🎸 MeasurementService ([#1314](https://github.com/OHIF/Viewers/issues/1314)) + ([0c37a40](https://github.com/OHIF/Viewers/commit/0c37a406d963569af8c3be24c697dafd42712dfc)) ## [2.2.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.2.1...@ohif/extension-cornerstone@2.2.2) (2020-01-28) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## [2.2.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.2.0...@ohif/extension-cornerstone@2.2.1) (2019-12-20) - ### Bug Fixes -* 🐛 1241: Make Plugin switch part of ToolbarModule ([#1322](https://github.com/OHIF/Viewers/issues/1322)) ([6540e36](https://github.com/OHIF/Viewers/commit/6540e36818944ac2eccc696186366ae495b33a04)), closes [#1241](https://github.com/OHIF/Viewers/issues/1241) - - - - +- 🐛 1241: Make Plugin switch part of ToolbarModule + ([#1322](https://github.com/OHIF/Viewers/issues/1322)) + ([6540e36](https://github.com/OHIF/Viewers/commit/6540e36818944ac2eccc696186366ae495b33a04)), + closes [#1241](https://github.com/OHIF/Viewers/issues/1241) # [2.2.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.1.1...@ohif/extension-cornerstone@2.2.0) (2019-12-20) - ### Features -* 🎸 Configuration so viewer tools can nix handles ([#1304](https://github.com/OHIF/Viewers/issues/1304)) ([63594d3](https://github.com/OHIF/Viewers/commit/63594d36b0bdba59f0901095aed70b75fb05172d)), closes [#1223](https://github.com/OHIF/Viewers/issues/1223) - - - - +- 🎸 Configuration so viewer tools can nix handles + ([#1304](https://github.com/OHIF/Viewers/issues/1304)) + ([63594d3](https://github.com/OHIF/Viewers/commit/63594d36b0bdba59f0901095aed70b75fb05172d)), + closes [#1223](https://github.com/OHIF/Viewers/issues/1223) ## [2.1.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.1.0...@ohif/extension-cornerstone@2.1.1) (2019-12-16) - ### Bug Fixes -* 🐛 add WwwcRegionTool to cornerstone tools initialization ([#1302](https://github.com/OHIF/Viewers/issues/1302)) ([d5bf728](https://github.com/OHIF/Viewers/commit/d5bf72851a32dff9fd3fc09332ea5250bc7e6114)) - - - - +- 🐛 add WwwcRegionTool to cornerstone tools initialization + ([#1302](https://github.com/OHIF/Viewers/issues/1302)) + ([d5bf728](https://github.com/OHIF/Viewers/commit/d5bf72851a32dff9fd3fc09332ea5250bc7e6114)) # [2.1.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.0.2...@ohif/extension-cornerstone@2.1.0) (2019-12-11) - ### Features -* 🎸 DICOM SR STOW on MeasurementAPI ([#954](https://github.com/OHIF/Viewers/issues/954)) ([ebe1af8](https://github.com/OHIF/Viewers/commit/ebe1af8d4f75d2483eba869655906d7829bd9666)), closes [#758](https://github.com/OHIF/Viewers/issues/758) - - - - +- 🎸 DICOM SR STOW on MeasurementAPI + ([#954](https://github.com/OHIF/Viewers/issues/954)) + ([ebe1af8](https://github.com/OHIF/Viewers/commit/ebe1af8d4f75d2483eba869655906d7829bd9666)), + closes [#758](https://github.com/OHIF/Viewers/issues/758) ## [2.0.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.0.1...@ohif/extension-cornerstone@2.0.2) (2019-12-11) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## [2.0.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.0.0...@ohif/extension-cornerstone@2.0.1) (2019-12-09) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - # [2.0.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.7.2...@ohif/extension-cornerstone@2.0.0) (2019-12-09) - -* feat!: Ability to configure cornerstone tools via extension configuration (#1229) ([55a5806](https://github.com/OHIF/Viewers/commit/55a580659ecb74ca6433461d8f9a05c2a2b69533)), closes [#1229](https://github.com/OHIF/Viewers/issues/1229) - +- feat!: Ability to configure cornerstone tools via extension configuration + (#1229) + ([55a5806](https://github.com/OHIF/Viewers/commit/55a580659ecb74ca6433461d8f9a05c2a2b69533)), + closes [#1229](https://github.com/OHIF/Viewers/issues/1229) ### BREAKING CHANGES -* modifies the exposed react components props. The contract for providing configuration for the app has changed. Please reference updated documentation for guidance. - - - - +- modifies the exposed react components props. The contract for + providing configuration for the app has changed. Please reference updated + documentation for guidance. ## [1.7.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.7.1...@ohif/extension-cornerstone@1.7.2) (2019-12-02) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## [1.7.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.7.0...@ohif/extension-cornerstone@1.7.1) (2019-12-02) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - # [1.7.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.6.0...@ohif/extension-cornerstone@1.7.0) (2019-11-25) - ### Features -* Add new annotate tool using new dialog service ([#1211](https://github.com/OHIF/Viewers/issues/1211)) ([8fd3af1](https://github.com/OHIF/Viewers/commit/8fd3af1e137e793f1b482760a22591c64a072047)) - - - - +- Add new annotate tool using new dialog service + ([#1211](https://github.com/OHIF/Viewers/issues/1211)) + ([8fd3af1](https://github.com/OHIF/Viewers/commit/8fd3af1e137e793f1b482760a22591c64a072047)) # [1.6.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.5.1...@ohif/extension-cornerstone@1.6.0) (2019-11-19) - ### Features -* New dialog service ([#1202](https://github.com/OHIF/Viewers/issues/1202)) ([f65639c](https://github.com/OHIF/Viewers/commit/f65639c2b0dab01decd20cab2cef4263cb4fab37)) - - - - +- New dialog service ([#1202](https://github.com/OHIF/Viewers/issues/1202)) + ([f65639c](https://github.com/OHIF/Viewers/commit/f65639c2b0dab01decd20cab2cef4263cb4fab37)) ## [1.5.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.5.0...@ohif/extension-cornerstone@1.5.1) (2019-11-15) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - # [1.5.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.4.1...@ohif/extension-cornerstone@1.5.0) (2019-11-13) - ### Features -* expose UiNotifications service ([#1172](https://github.com/OHIF/Viewers/issues/1172)) ([5c04e34](https://github.com/OHIF/Viewers/commit/5c04e34c8fb2394ab7acd9eb4f2ab12afeb2f255)) - - - - +- expose UiNotifications service + ([#1172](https://github.com/OHIF/Viewers/issues/1172)) + ([5c04e34](https://github.com/OHIF/Viewers/commit/5c04e34c8fb2394ab7acd9eb4f2ab12afeb2f255)) ## [1.4.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.4.0...@ohif/extension-cornerstone@1.4.1) (2019-11-08) - ### Bug Fixes -* Add a fallback metadata provider which pulls metadata from WADO-… ([#1158](https://github.com/OHIF/Viewers/issues/1158)) ([31b1adf](https://github.com/OHIF/Viewers/commit/31b1adfa5993d6c8e3e9c8b03fa9856f2621b037)) - - - - +- Add a fallback metadata provider which pulls metadata from WADO-… + ([#1158](https://github.com/OHIF/Viewers/issues/1158)) + ([31b1adf](https://github.com/OHIF/Viewers/commit/31b1adfa5993d6c8e3e9c8b03fa9856f2621b037)) # [1.4.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.3.1...@ohif/extension-cornerstone@1.4.0) (2019-10-26) - ### Features -* Snapshot Download Tool ([#840](https://github.com/OHIF/Viewers/issues/840)) ([450e098](https://github.com/OHIF/Viewers/commit/450e0981a5ba054fcfcb85eeaeb18371af9088f8)) - - - - +- Snapshot Download Tool ([#840](https://github.com/OHIF/Viewers/issues/840)) + ([450e098](https://github.com/OHIF/Viewers/commit/450e0981a5ba054fcfcb85eeaeb18371af9088f8)) ## [1.3.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.3.0...@ohif/extension-cornerstone@1.3.1) (2019-10-09) - ### Bug Fixes -* 🐛 set tools bidirectional, eraser and annotate command ([#1020](https://github.com/OHIF/Viewers/issues/1020)) ([a28984e](https://github.com/OHIF/Viewers/commit/a28984e)) - - - - +- 🐛 set tools bidirectional, eraser and annotate command + ([#1020](https://github.com/OHIF/Viewers/issues/1020)) + ([a28984e](https://github.com/OHIF/Viewers/commit/a28984e)) # [1.3.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.2.5...@ohif/extension-cornerstone@1.3.0) (2019-10-09) - ### Features -* Multiple fixes and implementation changes to react-cornerstone-viewport ([1cc94f3](https://github.com/OHIF/Viewers/commit/1cc94f3)) - - - - +- Multiple fixes and implementation changes to react-cornerstone-viewport + ([1cc94f3](https://github.com/OHIF/Viewers/commit/1cc94f3)) ## [1.2.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.2.4...@ohif/extension-cornerstone@1.2.5) (2019-09-27) - ### Bug Fixes -* version bump issue ([#963](https://github.com/OHIF/Viewers/issues/963)) ([e607ed2](https://github.com/OHIF/Viewers/commit/e607ed2)), closes [#962](https://github.com/OHIF/Viewers/issues/962) - - - - +- version bump issue ([#963](https://github.com/OHIF/Viewers/issues/963)) + ([e607ed2](https://github.com/OHIF/Viewers/commit/e607ed2)), closes + [#962](https://github.com/OHIF/Viewers/issues/962) # [2.0.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.2.2...@ohif/extension-cornerstone@2.0.0) (2019-09-27) - ### Bug Fixes -* 🐛 Add DicomLoaderService & FileLoaderService to fix SR, PDF, and SEG support in local file and WADO-RS-only use cases ([#862](https://github.com/OHIF/Viewers/issues/862)) ([e7e1a8a](https://github.com/OHIF/Viewers/commit/e7e1a8a)), closes [#838](https://github.com/OHIF/Viewers/issues/838) -* version bump issue ([#962](https://github.com/OHIF/Viewers/issues/962)) ([c80ea17](https://github.com/OHIF/Viewers/commit/c80ea17)) - +- 🐛 Add DicomLoaderService & FileLoaderService to fix SR, PDF, and SEG support + in local file and WADO-RS-only use cases + ([#862](https://github.com/OHIF/Viewers/issues/862)) + ([e7e1a8a](https://github.com/OHIF/Viewers/commit/e7e1a8a)), closes + [#838](https://github.com/OHIF/Viewers/issues/838) +- version bump issue ([#962](https://github.com/OHIF/Viewers/issues/962)) + ([c80ea17](https://github.com/OHIF/Viewers/commit/c80ea17)) ### BREAKING CHANGES -* DICOM Seg - - - - +- DICOM Seg # [2.0.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.2.2...@ohif/extension-cornerstone@2.0.0) (2019-09-27) - ### Bug Fixes -* 🐛 Add DicomLoaderService & FileLoaderService to fix SR, PDF, and SEG support in local file and WADO-RS-only use cases ([#862](https://github.com/OHIF/Viewers/issues/862)) ([e7e1a8a](https://github.com/OHIF/Viewers/commit/e7e1a8a)), closes [#838](https://github.com/OHIF/Viewers/issues/838) - +- 🐛 Add DicomLoaderService & FileLoaderService to fix SR, PDF, and SEG support + in local file and WADO-RS-only use cases + ([#862](https://github.com/OHIF/Viewers/issues/862)) + ([e7e1a8a](https://github.com/OHIF/Viewers/commit/e7e1a8a)), closes + [#838](https://github.com/OHIF/Viewers/issues/838) ### BREAKING CHANGES -* DICOM Seg - - - - +- DICOM Seg ## [1.2.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.2.1...@ohif/extension-cornerstone@1.2.2) (2019-09-26) - ### Bug Fixes -* Add some code splitting for PWA build ([#937](https://github.com/OHIF/Viewers/issues/937)) ([8938035](https://github.com/OHIF/Viewers/commit/8938035)) - - - - +- Add some code splitting for PWA build + ([#937](https://github.com/OHIF/Viewers/issues/937)) + ([8938035](https://github.com/OHIF/Viewers/commit/8938035)) ## [1.2.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.2.0...@ohif/extension-cornerstone@1.2.1) (2019-09-17) - ### Bug Fixes -* bump cornerstone-tools version in peerDeps ([4afc88c](https://github.com/OHIF/Viewers/commit/4afc88c)) - - - - +- bump cornerstone-tools version in peerDeps + ([4afc88c](https://github.com/OHIF/Viewers/commit/4afc88c)) # [1.2.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.1.1...@ohif/extension-cornerstone@1.2.0) (2019-09-12) - ### Features -* **Annotate:** Add annotate tool back to toolbar ([26be967](https://github.com/OHIF/Viewers/commit/26be967)) - - - - +- **Annotate:** Add annotate tool back to toolbar + ([26be967](https://github.com/OHIF/Viewers/commit/26be967)) ## [1.1.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.1.0...@ohif/extension-cornerstone@1.1.1) (2019-09-12) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - # [1.1.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.0.1...@ohif/extension-cornerstone@1.1.0) (2019-09-12) - ### Features -* **BidirectionalTool:** Add BidrectionalTool to "more" menu ([#911](https://github.com/OHIF/Viewers/issues/911)) ([e40cbae](https://github.com/OHIF/Viewers/commit/e40cbae)) -* **EraserTool:** add eraserTool to @ohif/extension-cornerstone ([#912](https://github.com/OHIF/Viewers/issues/912)) ([698d274](https://github.com/OHIF/Viewers/commit/698d274)) - - - - +- **BidirectionalTool:** Add BidrectionalTool to "more" menu + ([#911](https://github.com/OHIF/Viewers/issues/911)) + ([e40cbae](https://github.com/OHIF/Viewers/commit/e40cbae)) +- **EraserTool:** add eraserTool to @ohif/extension-cornerstone + ([#912](https://github.com/OHIF/Viewers/issues/912)) + ([698d274](https://github.com/OHIF/Viewers/commit/698d274)) ## [1.0.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@1.0.0...@ohif/extension-cornerstone@1.0.1) (2019-09-10) - ### Bug Fixes -* simplify runtime-extension usage ([ac5dbda](https://github.com/OHIF/Viewers/commit/ac5dbda)) - - - - +- simplify runtime-extension usage + ([ac5dbda](https://github.com/OHIF/Viewers/commit/ac5dbda)) # [1.0.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.50.5...@ohif/extension-cornerstone@1.0.0) (2019-09-09) - ### Features -* 🎸 Upgraded to cornerstoneTools 4.0 ([86adb51](https://github.com/OHIF/Viewers/commit/86adb51)) - +- 🎸 Upgraded to cornerstoneTools 4.0 + ([86adb51](https://github.com/OHIF/Viewers/commit/86adb51)) ### BREAKING CHANGES -* n - - - - +- n ## [0.50.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.50.4...@ohif/extension-cornerstone@0.50.5) (2019-09-06) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## [0.50.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.50.3...@ohif/extension-cornerstone@0.50.4) (2019-09-04) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## [0.50.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.50.2...@ohif/extension-cornerstone@0.50.3) (2019-09-04) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.50.1...@ohif/extension-cornerstone@0.50.2) (2019-09-04) - ### Bug Fixes -* measurementsAPI issue caused by production build ([#842](https://github.com/OHIF/Viewers/issues/842)) ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439)) - - - - +- measurementsAPI issue caused by production build + ([#842](https://github.com/OHIF/Viewers/issues/842)) + ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439)) ## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.50.0-alpha.10...@ohif/extension-cornerstone@0.50.1) (2019-08-14) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - # [0.50.0-alpha.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.0.39-alpha.9...@ohif/extension-cornerstone@0.50.0-alpha.10) (2019-08-14) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## [0.0.39-alpha.9](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@0.0.39-alpha.8...@ohif/extension-cornerstone@0.0.39-alpha.9) (2019-08-14) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - ## 0.0.39-alpha.8 (2019-08-14) **Note:** Version bump only for package @ohif/extension-cornerstone - - - - # Change Log All notable changes to this project will be documented in this file. See diff --git a/extensions/cornerstone/package.json b/extensions/cornerstone/package.json index aa7980a3d27..e79a249bf3f 100644 --- a/extensions/cornerstone/package.json +++ b/extensions/cornerstone/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-cornerstone", - "version": "2.9.2", + "version": "2.9.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.16.0", + "dcmjs": "0.16.3", "dicom-parser": "^1.8.3", "hammerjs": "^2.0.8", "prop-types": "^15.6.2", diff --git a/extensions/cornerstone/src/index.js b/extensions/cornerstone/src/index.js index 4319483327d..43f8a97b271 100644 --- a/extensions/cornerstone/src/index.js +++ b/extensions/cornerstone/src/index.js @@ -3,6 +3,7 @@ import init from './init.js'; import commandsModule from './commandsModule.js'; import toolbarModule from './toolbarModule.js'; import CornerstoneViewportDownloadForm from './CornerstoneViewportDownloadForm'; +import { version } from '../package.json'; const Component = React.lazy(() => { return import('./OHIFCornerstoneViewport'); @@ -24,6 +25,7 @@ export default { * Only required property. Should be a unique value across all extensions. */ id: 'cornerstone', + version, /** * diff --git a/extensions/dicom-p10-downloader/.webpack/webpack.dev.js b/extensions/debugging/.webpack/webpack.dev.js similarity index 100% rename from extensions/dicom-p10-downloader/.webpack/webpack.dev.js rename to extensions/debugging/.webpack/webpack.dev.js diff --git a/extensions/dicom-p10-downloader/.webpack/webpack.prod.js b/extensions/debugging/.webpack/webpack.prod.js similarity index 100% rename from extensions/dicom-p10-downloader/.webpack/webpack.prod.js rename to extensions/debugging/.webpack/webpack.prod.js diff --git a/extensions/dicom-p10-downloader/CHANGELOG.md b/extensions/debugging/CHANGELOG.md similarity index 70% rename from extensions/dicom-p10-downloader/CHANGELOG.md rename to extensions/debugging/CHANGELOG.md index 192a8bc8417..bde79b4d8d4 100644 --- a/extensions/dicom-p10-downloader/CHANGELOG.md +++ b/extensions/debugging/CHANGELOG.md @@ -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.1.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-debugging@0.1.4...@ohif/extension-debugging@0.1.5) (2020-09-17) + +**Note:** Version bump only for package @ohif/extension-debugging + + + + + +## [0.1.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-debugging@0.1.3...@ohif/extension-debugging@0.1.4) (2020-09-10) + +**Note:** Version bump only for package @ohif/extension-debugging + + + + + +## 0.1.3 (2020-09-03) + +**Note:** Version bump only for package @ohif/extension-debugging + + + + + ## [0.1.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-p10-downloader@0.1.1...@ohif/extension-dicom-p10-downloader@0.1.2) (2020-06-18) **Note:** Version bump only for package @ohif/extension-dicom-p10-downloader diff --git a/extensions/dicom-p10-downloader/LICENSE b/extensions/debugging/LICENSE similarity index 100% rename from extensions/dicom-p10-downloader/LICENSE rename to extensions/debugging/LICENSE diff --git a/extensions/dicom-p10-downloader/README.md b/extensions/debugging/README.md similarity index 100% rename from extensions/dicom-p10-downloader/README.md rename to extensions/debugging/README.md diff --git a/extensions/dicom-p10-downloader/package.json b/extensions/debugging/package.json similarity index 86% rename from extensions/dicom-p10-downloader/package.json rename to extensions/debugging/package.json index 74b3714291d..3bd678ab575 100644 --- a/extensions/dicom-p10-downloader/package.json +++ b/extensions/debugging/package.json @@ -1,7 +1,7 @@ { - "name": "@ohif/extension-dicom-p10-downloader", - "version": "0.1.2", - "description": "OHIF extension for downloading DICOM P10 files", + "name": "@ohif/extension-debugging", + "version": "0.1.5", + "description": "OHIF extension for debugging.", "author": "OHIF", "license": "MIT", "repository": "OHIF/Viewers", @@ -33,6 +33,7 @@ }, "dependencies": { "@babel/runtime": "^7.5.5", + "detect-browser": "5.1.1", "dicomweb-client": "^0.6.0", "file-saver": "^2.0.2", "jszip": "^3.2.2" diff --git a/extensions/debugging/src/DebugReportModal.css b/extensions/debugging/src/DebugReportModal.css new file mode 100644 index 00000000000..ffc3b85575d --- /dev/null +++ b/extensions/debugging/src/DebugReportModal.css @@ -0,0 +1,9 @@ +.debugReportModalHeader { + padding: 10px 0 10px; + color: var(--active-color); +} + +.debug-report-modal-container { + display: flex; + flex-direction: column; +} diff --git a/extensions/debugging/src/DebugReportModal.js b/extensions/debugging/src/DebugReportModal.js new file mode 100644 index 00000000000..b00988b4feb --- /dev/null +++ b/extensions/debugging/src/DebugReportModal.js @@ -0,0 +1,245 @@ +import React from 'react'; +import { detect } from 'detect-browser'; +import './DebugReportModal.css'; +import { ToolbarButton } from '@ohif/ui'; + +const DubugReportModal = ({ + viewports, + studies, + servers, + extensionManager, + mailTo, +}) => { + const mailToFunction = () => { + const StudyInstanceUID = Object.keys(studies.studyData)[0]; + + const subject = encodeURI(`Issue with Study: ${StudyInstanceUID}`); + + let body = `Enter the description of your problem here: \n\n\n`; + + body += `============= SESSION INFO =============\n\n`; + + // App version + + body += '== App ==\n'; + body += `version\t${window.version}\n\n`; + + // Extensions Versions + + body += '== Extensions Versions ==\n'; + + const { registeredExtensionVesions } = extensionManager; + + Object.keys(registeredExtensionVesions).forEach(extensionId => { + const version = registeredExtensionVesions[extensionId]; + + body += `${extensionId}\t${version}\n`; + }); + + body += '\n'; + + // Browser Info + + const browser = detect(); + + const { name, os, type, version } = browser; + + body += '== Browser Info ==\n'; + body += `name\t ${name}\n`; + body += `os\t ${os}\n`; + body += `type\t ${type}\n`; + body += `version\t ${version}\n\n`; + + // Study URL + body += '== URL ==\n'; + body += `URL\t ${window.location.href}\n\n`; + + // Layout + + const { numRows, numColumns, viewportSpecificData } = viewports; + + body += '== Viewport Layout ==\n'; + body += `Rows\t${numRows}\n`; + body += `Columns\t${numColumns}\n\n`; + + body += '== Viewports ==\n'; + + Object.keys(viewportSpecificData).forEach(viewportIndex => { + const vsd = viewportSpecificData[viewportIndex]; + + const [row, column] = _viewportIndexToViewportPosition( + viewportIndex, + numColumns + ); + + body += `[${row},${column}]\t${vsd.SeriesInstanceUID}\n`; + }); + + // TODO Text dump of rest of stuff. + + body = encodeURI(body); + + window.location.href = `mailto:${mailTo}?subject=${subject}&body=${body}`; + }; + + return ( +
+ {mailTo ? ( +
+ +
+ ) : null} +
+ + {getAppVersion()} + {getExtensionVersions(extensionManager)} + {getBrowserInfo()} + {getCurrentStudyUrl()} + {getLayout(viewports)} +
+
+
+ ); +}; + +const getAppVersion = () => { + return ( + + + App + + + Version + {window.version} + + + ); +}; + +const getCurrentStudyUrl = () => { + return ( + + + URL + + + URL + {window.location.href} + + + ); +}; + +const getExtensionVersions = extensionManager => { + const { registeredExtensionVesions } = extensionManager; + + const lineItems = Object.keys(registeredExtensionVesions).map(extensionId => { + const version = registeredExtensionVesions[extensionId]; + + return ( + + {extensionId} + {version} + + ); + }); + + return ( + + Extensions + {lineItems} + + ); +}; + +const getLayout = viewports => { + const { numRows, numColumns } = viewports; + + return ( + + + Viewports + + + Layout + + + Rows + {numRows} + + + Columns + {numColumns} + + + SeriesInstanceUIDs + + {getSeriesInstanceUIDsPerRow(viewports)} + + ); +}; + +const getBrowserInfo = () => { + const browser = detect(); + + const { name, os, type, version } = browser; + + return ( + + + Platform + + + name + {name} + + + os + {os} + + + type + {type} + + + version + {version} + + + ); +}; + +const getSeriesInstanceUIDsPerRow = viewports => { + const { viewportSpecificData, numColumns } = viewports; + + // NOTE viewportSpecificData is actually an object with numerical keys. + return Object.keys(viewportSpecificData).map(viewportIndex => { + const vsd = viewportSpecificData[viewportIndex]; + + const [row, column] = _viewportIndexToViewportPosition( + viewportIndex, + numColumns + ); + + return ( + + {`[${row},${column}]`} + {vsd.SeriesInstanceUID} + + ); + }); +}; + +const _viewportIndexToViewportPosition = (viewportIndex, numColumns) => { + const row = Math.floor(viewportIndex / numColumns); + const column = viewportIndex % numColumns; + + return [row, column]; +}; + +export default DubugReportModal; diff --git a/extensions/dicom-p10-downloader/src/commandsModule.js b/extensions/debugging/src/commandsModule.js similarity index 82% rename from extensions/dicom-p10-downloader/src/commandsModule.js rename to extensions/debugging/src/commandsModule.js index ce39ea8b167..3b77af7923b 100644 --- a/extensions/dicom-p10-downloader/src/commandsModule.js +++ b/extensions/debugging/src/commandsModule.js @@ -8,12 +8,16 @@ import { getSOPInstanceReferencesFromViewports, } from './utils'; import _downloadAndZip, { downloadInstances } from './downloadAndZip'; +import DebugReportModal from './DebugReportModal'; +import React from 'react'; + +import state from './state'; const { utils: { Queue }, } = OHIF; -export function getCommands(context) { +export function getCommands(context, servicesManager, extensionManager) { const queue = new Queue(1); const actions = { /** @@ -87,9 +91,33 @@ export function getCommands(context) { serverConfig ); }, + openDebugInfoModal({ viewports, studies, servers }) { + const { UIModalService } = servicesManager.services; + + const WrappedDebugReportModal = function() { + return ( + + ); + }; + + UIModalService.show({ + content: WrappedDebugReportModal, + title: `Debugging Information`, + }); + }, }; const definitions = { + openDebugInfoModal: { + commandFn: actions.openDebugInfoModal, + storeContexts: ['viewports', 'servers', 'studies'], + }, downloadAndZip: { commandFn: queue.bindSafe(actions.downloadAndZip, error), storeContexts: ['servers'], diff --git a/extensions/dicom-p10-downloader/src/downloadAndZip.js b/extensions/debugging/src/downloadAndZip.js similarity index 100% rename from extensions/dicom-p10-downloader/src/downloadAndZip.js rename to extensions/debugging/src/downloadAndZip.js diff --git a/extensions/dicom-p10-downloader/src/index.js b/extensions/debugging/src/index.js similarity index 55% rename from extensions/dicom-p10-downloader/src/index.js rename to extensions/debugging/src/index.js index 95fe623c4e5..568fc7c5428 100644 --- a/extensions/dicom-p10-downloader/src/index.js +++ b/extensions/debugging/src/index.js @@ -1,5 +1,8 @@ import { getDicomWebClientFromConfig } from './utils'; import { getCommands } from './commandsModule'; +import { version } from '../package.json'; +import toolbarModule from './toolbarModule'; +import state from './state'; /** * Constants @@ -21,23 +24,32 @@ export default { * Only required property. Should be a unique value across all extensions. */ id: 'dicom-p10-downloader', + version, /** * LIFECYCLE HOOKS */ - preRegistration({ appConfig }) { + preRegistration({ appConfig, configuration }) { const dicomWebClient = getDicomWebClientFromConfig(appConfig); if (dicomWebClient) { sharedContext.dicomWebClient = dicomWebClient; } + + if (configuration && configuration.mailTo) { + state.mailTo = configuration.mailTo; + } }, /** * MODULE GETTERS */ - getCommandsModule() { - return getCommands(sharedContext); + getCommandsModule({ servicesManager, extensionManager }) { + return getCommands(sharedContext, servicesManager, extensionManager); + }, + + getToolbarModule() { + return toolbarModule; }, }; diff --git a/extensions/debugging/src/state.js b/extensions/debugging/src/state.js new file mode 100644 index 00000000000..51ab1364250 --- /dev/null +++ b/extensions/debugging/src/state.js @@ -0,0 +1,3 @@ +const state = { mailTo: undefined }; + +export default state; diff --git a/extensions/debugging/src/toolbarModule.js b/extensions/debugging/src/toolbarModule.js new file mode 100644 index 00000000000..bafb7a4a2da --- /dev/null +++ b/extensions/debugging/src/toolbarModule.js @@ -0,0 +1,20 @@ +const TOOLBAR_BUTTON_TYPES = { + COMMAND: 'command', +}; + +const definitions = [ + { + id: 'Debug Info', + label: 'Debug Info', + icon: 'cog', + // + type: TOOLBAR_BUTTON_TYPES.COMMAND, + commandName: 'openDebugInfoModal', + context: 'VIEWER', + }, +]; + +export default { + definitions, + defaultContext: 'VIEWER', +}; diff --git a/extensions/dicom-p10-downloader/src/utils.js b/extensions/debugging/src/utils.js similarity index 100% rename from extensions/dicom-p10-downloader/src/utils.js rename to extensions/debugging/src/utils.js diff --git a/extensions/dicom-html/CHANGELOG.md b/extensions/dicom-html/CHANGELOG.md index 4940f0d6e7a..b596e46ab31 100644 --- a/extensions/dicom-html/CHANGELOG.md +++ b/extensions/dicom-html/CHANGELOG.md @@ -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.2.8](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.2.7...@ohif/extension-dicom-html@1.2.8) (2020-09-10) + +**Note:** Version bump only for package @ohif/extension-dicom-html + + + + + +## [1.2.7](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.2.6...@ohif/extension-dicom-html@1.2.7) (2020-09-03) + +**Note:** Version bump only for package @ohif/extension-dicom-html + + + + + +## [1.2.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.2.5...@ohif/extension-dicom-html@1.2.6) (2020-09-02) + +**Note:** Version bump only for package @ohif/extension-dicom-html + + + + + ## [1.2.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.2.4...@ohif/extension-dicom-html@1.2.5) (2020-08-28) **Note:** Version bump only for package @ohif/extension-dicom-html diff --git a/extensions/dicom-html/package.json b/extensions/dicom-html/package.json index b48f436a8a9..e226ac94c36 100644 --- a/extensions/dicom-html/package.json +++ b/extensions/dicom-html/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-dicom-html", - "version": "1.2.5", + "version": "1.2.8", "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.16.0", + "dcmjs": "0.16.3", "prop-types": "^15.6.2", "react": "^16.8.6", "react-dom": "^16.8.6" diff --git a/extensions/dicom-html/src/OHIFDicomHtmlSopClassHandler.js b/extensions/dicom-html/src/OHIFDicomHtmlSopClassHandler.js index f94ea055c40..c1bc4fc3a6e 100644 --- a/extensions/dicom-html/src/OHIFDicomHtmlSopClassHandler.js +++ b/extensions/dicom-html/src/OHIFDicomHtmlSopClassHandler.js @@ -22,11 +22,13 @@ const OHIFDicomHtmlSopClassHandler = { getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) { const instance = series.getFirstInstance(); + const metadata = instance.getData().metadata; const { + SeriesDescription, + SeriesNumber, SeriesDate, SeriesTime, - SeriesNumber, - } = instance._instance.metadata; + } = metadata; return { plugin: 'html', @@ -37,6 +39,8 @@ const OHIFDicomHtmlSopClassHandler = { SOPInstanceUID: instance.getSOPInstanceUID(), SeriesInstanceUID: series.getSeriesInstanceUID(), StudyInstanceUID: study.getStudyInstanceUID(), + SeriesDescription, + metadata, SeriesDate, SeriesTime, SeriesNumber, diff --git a/extensions/dicom-html/src/index.js b/extensions/dicom-html/src/index.js index ce7f58d56c5..128660d3a32 100644 --- a/extensions/dicom-html/src/index.js +++ b/extensions/dicom-html/src/index.js @@ -1,5 +1,6 @@ import React from 'react'; import OHIFDicomHtmlSopClassHandler from './OHIFDicomHtmlSopClassHandler.js'; +import { version } from '../package.json'; const Component = React.lazy(() => { return import('./OHIFDicomHtmlViewport'); @@ -18,6 +19,7 @@ export default { * Only required property. Should be a unique value across all extensions. */ id: 'html', + version, getViewportModule() { return OHIFDicomHtmlViewport; diff --git a/extensions/dicom-microscopy/CHANGELOG.md b/extensions/dicom-microscopy/CHANGELOG.md index 6e5ae12b936..250d60e358e 100644 --- a/extensions/dicom-microscopy/CHANGELOG.md +++ b/extensions/dicom-microscopy/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.51.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.51.2...@ohif/extension-dicom-microscopy@0.51.3) (2020-09-10) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +## [0.51.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.51.1...@ohif/extension-dicom-microscopy@0.51.2) (2020-09-03) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + ## [0.51.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-microscopy@0.51.0...@ohif/extension-dicom-microscopy@0.51.1) (2020-08-28) **Note:** Version bump only for package @ohif/extension-dicom-microscopy diff --git a/extensions/dicom-microscopy/package.json b/extensions/dicom-microscopy/package.json index d8896ad1c01..bcc44ca033b 100644 --- a/extensions/dicom-microscopy/package.json +++ b/extensions/dicom-microscopy/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-dicom-microscopy", - "version": "0.51.1", + "version": "0.51.3", "description": "OHIF extension for Dicom Microscopy", "author": "OHIF", "license": "MIT", diff --git a/extensions/dicom-microscopy/src/DicomMicroscopySopClassHandler.js b/extensions/dicom-microscopy/src/DicomMicroscopySopClassHandler.js index 909e39bf2d1..a876b612277 100644 --- a/extensions/dicom-microscopy/src/DicomMicroscopySopClassHandler.js +++ b/extensions/dicom-microscopy/src/DicomMicroscopySopClassHandler.js @@ -12,11 +12,13 @@ const DicomMicroscopySopClassHandler = { getDisplaySetFromSeries(series, study, dicomWebClient) { const instance = series.getFirstInstance(); + const metadata = instance.getData().metadata; const { + SeriesDescription, + SeriesNumber, ContentDate, ContentTime, - SeriesNumber, - } = instance._instance.metadata; + } = metadata; // Note: We are passing the dicomweb client into each viewport! @@ -28,9 +30,11 @@ const DicomMicroscopySopClassHandler = { SOPInstanceUID: instance.getSOPInstanceUID(), SeriesInstanceUID: series.getSeriesInstanceUID(), StudyInstanceUID: study.getStudyInstanceUID(), + SeriesDescription, SeriesDate: ContentDate, // Map ContentDate/Time to SeriesTime for series list sorting. SeriesTime: ContentTime, SeriesNumber, + metadata, }; }, }; diff --git a/extensions/dicom-microscopy/src/index.js b/extensions/dicom-microscopy/src/index.js index cc3e6d9ff0c..514f2ed1210 100644 --- a/extensions/dicom-microscopy/src/index.js +++ b/extensions/dicom-microscopy/src/index.js @@ -1,5 +1,6 @@ import React from 'react'; import DicomMicroscopySopClassHandler from './DicomMicroscopySopClassHandler.js'; +import { version } from '../package.json'; const Component = React.lazy(() => { return import('./DicomMicroscopyViewport'); @@ -18,6 +19,7 @@ export default { * Only required property. Should be a unique value across all extensions. */ id: 'microscopy', + version, getViewportModule() { return DicomMicroscopyViewport; diff --git a/extensions/dicom-pdf/CHANGELOG.md b/extensions/dicom-pdf/CHANGELOG.md index 2b4688487dc..2a4bfbd1a73 100644 --- a/extensions/dicom-pdf/CHANGELOG.md +++ b/extensions/dicom-pdf/CHANGELOG.md @@ -1,121 +1,86 @@ # Change Log -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +All notable changes to this project will be documented in this file. See +[Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [1.0.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@1.0.3...@ohif/extension-dicom-pdf@1.0.4) (2020-08-28) +## [1.0.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@1.0.5...@ohif/extension-dicom-pdf@1.0.6) (2020-09-10) **Note:** Version bump only for package @ohif/extension-dicom-pdf +## [1.0.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@1.0.4...@ohif/extension-dicom-pdf@1.0.5) (2020-09-03) +**Note:** Version bump only for package @ohif/extension-dicom-pdf +## [1.0.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@1.0.3...@ohif/extension-dicom-pdf@1.0.4) (2020-08-28) +**Note:** Version bump only for package @ohif/extension-dicom-pdf ## [1.0.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@1.0.2...@ohif/extension-dicom-pdf@1.0.3) (2020-04-02) **Note:** Version bump only for package @ohif/extension-dicom-pdf - - - - ## [1.0.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@1.0.1...@ohif/extension-dicom-pdf@1.0.2) (2020-03-09) **Note:** Version bump only for package @ohif/extension-dicom-pdf - - - - ## [1.0.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@1.0.0...@ohif/extension-dicom-pdf@1.0.1) (2019-12-16) - ### Bug Fixes -* 🐛 Update ohif pdf extension to optionally use pdfjs ([#1162](https://github.com/OHIF/Viewers/issues/1162)) ([31e542d](https://github.com/OHIF/Viewers/commit/31e542dfd973c3e982ede6d02d79bfe65175e792)), closes [#1049](https://github.com/OHIF/Viewers/issues/1049) - - - - +- 🐛 Update ohif pdf extension to optionally use pdfjs + ([#1162](https://github.com/OHIF/Viewers/issues/1162)) + ([31e542d](https://github.com/OHIF/Viewers/commit/31e542dfd973c3e982ede6d02d79bfe65175e792)), + closes [#1049](https://github.com/OHIF/Viewers/issues/1049) # [1.0.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.50.4...@ohif/extension-dicom-pdf@1.0.0) (2019-09-27) - ### Bug Fixes -* 🐛 Add DicomLoaderService & FileLoaderService to fix SR, PDF, and SEG support in local file and WADO-RS-only use cases ([#862](https://github.com/OHIF/Viewers/issues/862)) ([e7e1a8a](https://github.com/OHIF/Viewers/commit/e7e1a8a)), closes [#838](https://github.com/OHIF/Viewers/issues/838) - +- 🐛 Add DicomLoaderService & FileLoaderService to fix SR, PDF, and SEG support + in local file and WADO-RS-only use cases + ([#862](https://github.com/OHIF/Viewers/issues/862)) + ([e7e1a8a](https://github.com/OHIF/Viewers/commit/e7e1a8a)), closes + [#838](https://github.com/OHIF/Viewers/issues/838) ### BREAKING CHANGES -* DICOM Seg - - - - +- DICOM Seg ## [0.50.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.50.3...@ohif/extension-dicom-pdf@0.50.4) (2019-09-10) - ### Bug Fixes -* simplify runtime-extension usage ([ac5dbda](https://github.com/OHIF/Viewers/commit/ac5dbda)) - - - - +- simplify runtime-extension usage + ([ac5dbda](https://github.com/OHIF/Viewers/commit/ac5dbda)) ## [0.50.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.50.2...@ohif/extension-dicom-pdf@0.50.3) (2019-09-04) **Note:** Version bump only for package @ohif/extension-dicom-pdf - - - - ## [0.50.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.50.1...@ohif/extension-dicom-pdf@0.50.2) (2019-09-04) - ### Bug Fixes -* measurementsAPI issue caused by production build ([#842](https://github.com/OHIF/Viewers/issues/842)) ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439)) - - - - +- measurementsAPI issue caused by production build + ([#842](https://github.com/OHIF/Viewers/issues/842)) + ([49d3439](https://github.com/OHIF/Viewers/commit/49d3439)) ## [0.50.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.50.0-alpha.10...@ohif/extension-dicom-pdf@0.50.1) (2019-08-14) **Note:** Version bump only for package @ohif/extension-dicom-pdf - - - - # [0.50.0-alpha.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.0.8-alpha.9...@ohif/extension-dicom-pdf@0.50.0-alpha.10) (2019-08-14) **Note:** Version bump only for package @ohif/extension-dicom-pdf - - - - ## [0.0.8-alpha.9](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-pdf@0.0.8-alpha.8...@ohif/extension-dicom-pdf@0.0.8-alpha.9) (2019-08-14) **Note:** Version bump only for package @ohif/extension-dicom-pdf - - - - ## 0.0.8-alpha.8 (2019-08-14) **Note:** Version bump only for package @ohif/extension-dicom-pdf - - - - # Change Log All notable changes to this project will be documented in this file. See diff --git a/extensions/dicom-pdf/package.json b/extensions/dicom-pdf/package.json index 8404d5147bc..be84fad0afe 100644 --- a/extensions/dicom-pdf/package.json +++ b/extensions/dicom-pdf/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-dicom-pdf", - "version": "1.0.4", + "version": "1.0.6", "description": "OHIF extension for Dicom PDF", "author": "OHIF", "license": "MIT", diff --git a/extensions/dicom-pdf/src/OHIFDicomPDFSopClassHandler.js b/extensions/dicom-pdf/src/OHIFDicomPDFSopClassHandler.js index 9550ed80f7a..452b843bdc0 100644 --- a/extensions/dicom-pdf/src/OHIFDicomPDFSopClassHandler.js +++ b/extensions/dicom-pdf/src/OHIFDicomPDFSopClassHandler.js @@ -12,11 +12,13 @@ const OHIFDicomPDFSopClassHandler = { getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) { const instance = series.getFirstInstance(); + const metadata = instance.getData().metadata; const { ContentDate, ContentTime, + SeriesDescription, SeriesNumber, - } = instance._instance.metadata; + } = metadata; return { plugin: 'pdf', @@ -27,9 +29,11 @@ const OHIFDicomPDFSopClassHandler = { SOPInstanceUID: instance.getSOPInstanceUID(), SeriesInstanceUID: series.getSeriesInstanceUID(), StudyInstanceUID: study.getStudyInstanceUID(), + SeriesDescription, SeriesDate: ContentDate, // Map ContentDate/Time to SeriesTime for series list sorting. SeriesTime: ContentTime, SeriesNumber, + metadata, authorizationHeaders: authorizationHeaders, }; }, diff --git a/extensions/dicom-pdf/src/index.js b/extensions/dicom-pdf/src/index.js index 705caeb4be9..b09af49bb8c 100644 --- a/extensions/dicom-pdf/src/index.js +++ b/extensions/dicom-pdf/src/index.js @@ -1,5 +1,6 @@ import React from 'react'; import OHIFDicomPDFSopClassHandler from './OHIFDicomPDFSopClassHandler.js'; +import { version } from '../package.json'; const Component = React.lazy(() => { return import('./ConnectedOHIFDicomPDFViewer'); @@ -18,6 +19,7 @@ export default { * Only required property. Should be a unique value across all extensions. */ id: 'pdf', + version, getViewportModule() { return ConnectedOHIFDicomPDFViewer; }, diff --git a/extensions/dicom-rt/CHANGELOG.md b/extensions/dicom-rt/CHANGELOG.md index a50ddee093f..93dbf073cbc 100644 --- a/extensions/dicom-rt/CHANGELOG.md +++ b/extensions/dicom-rt/CHANGELOG.md @@ -1,165 +1,126 @@ # Change Log -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +All notable changes to this project will be documented in this file. See +[Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [0.4.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.4.0...@ohif/extension-dicom-rt@0.4.1) (2020-08-28) +## [0.4.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.4.4...@ohif/extension-dicom-rt@0.4.5) (2020-09-10) **Note:** Version bump only for package @ohif/extension-dicom-rt +## [0.4.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.4.3...@ohif/extension-dicom-rt@0.4.4) (2020-09-10) +**Note:** Version bump only for package @ohif/extension-dicom-rt +## [0.4.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.4.2...@ohif/extension-dicom-rt@0.4.3) (2020-09-03) +**Note:** Version bump only for package @ohif/extension-dicom-rt -# [0.4.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.3.0...@ohif/extension-dicom-rt@0.4.0) (2020-08-18) - +## [0.4.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.4.1...@ohif/extension-dicom-rt@0.4.2) (2020-09-02) -### Features +**Note:** Version bump only for package @ohif/extension-dicom-rt -* 🎸 Update react-vtkjs-viewport usage to use requestPool ([#1984](https://github.com/OHIF/Viewers/issues/1984)) ([bb5f30c](https://github.com/OHIF/Viewers/commit/bb5f30ce2a0192d2e021beaaadfff22fd38e17b9)) +## [0.4.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.4.0...@ohif/extension-dicom-rt@0.4.1) (2020-08-28) +**Note:** Version bump only for package @ohif/extension-dicom-rt +# [0.4.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.3.0...@ohif/extension-dicom-rt@0.4.0) (2020-08-18) +### Features +- 🎸 Update react-vtkjs-viewport usage to use requestPool + ([#1984](https://github.com/OHIF/Viewers/issues/1984)) + ([bb5f30c](https://github.com/OHIF/Viewers/commit/bb5f30ce2a0192d2e021beaaadfff22fd38e17b9)) # [0.3.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.2.7...@ohif/extension-dicom-rt@0.3.0) (2020-08-10) - ### Features -* 🎸 Add support for POINT and OPEN_PLANAR for RT ([0e87ab3](https://github.com/OHIF/Viewers/commit/0e87ab37c29fcf9af74bbcefca854c6e6b8707bc)) - - - - +- 🎸 Add support for POINT and OPEN_PLANAR for RT + ([0e87ab3](https://github.com/OHIF/Viewers/commit/0e87ab37c29fcf9af74bbcefca854c6e6b8707bc)) ## [0.2.7](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.2.6...@ohif/extension-dicom-rt@0.2.7) (2020-08-10) **Note:** Version bump only for package @ohif/extension-dicom-rt - - - - ## [0.2.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.2.5...@ohif/extension-dicom-rt@0.2.6) (2020-08-05) **Note:** Version bump only for package @ohif/extension-dicom-rt - - - - ## [0.2.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.2.4...@ohif/extension-dicom-rt@0.2.5) (2020-07-13) - ### Bug Fixes -* 🐛 - Put guards in all places that a cornerstone re-render ([#1899](https://github.com/OHIF/Viewers/issues/1899)) ([451f7ea](https://github.com/OHIF/Viewers/commit/451f7eab9258e7a193eb362e0926b13aedc4b3c9)) - - - - +- 🐛 - Put guards in all places that a cornerstone re-render + ([#1899](https://github.com/OHIF/Viewers/issues/1899)) + ([451f7ea](https://github.com/OHIF/Viewers/commit/451f7eab9258e7a193eb362e0926b13aedc4b3c9)) ## [0.2.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.2.3...@ohif/extension-dicom-rt@0.2.4) (2020-07-13) **Note:** Version bump only for package @ohif/extension-dicom-rt - - - - ## [0.2.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.2.2...@ohif/extension-dicom-rt@0.2.3) (2020-07-13) **Note:** Version bump only for package @ohif/extension-dicom-rt - - - - ## [0.2.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.2.1...@ohif/extension-dicom-rt@0.2.2) (2020-07-13) - ### Bug Fixes -* 🐛 Fix RT Panel hide/show and Fix looping load errors ([#1877](https://github.com/OHIF/Viewers/issues/1877)) ([e7cc735](https://github.com/OHIF/Viewers/commit/e7cc735c03d02eeb0d3af4ba02c15ed4f81bbec2)) - - - - +- 🐛 Fix RT Panel hide/show and Fix looping load errors + ([#1877](https://github.com/OHIF/Viewers/issues/1877)) + ([e7cc735](https://github.com/OHIF/Viewers/commit/e7cc735c03d02eeb0d3af4ba02c15ed4f81bbec2)) ## [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) - - - - +- 🐛 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) - ### Features -* 🎸 1729 - error boundary wrapper ([#1764](https://github.com/OHIF/Viewers/issues/1764)) ([c02b232](https://github.com/OHIF/Viewers/commit/c02b232b0cc24f38af5d5e3831d987d048e60ada)) - - - - +- 🎸 1729 - error boundary wrapper + ([#1764](https://github.com/OHIF/Viewers/issues/1764)) + ([c02b232](https://github.com/OHIF/Viewers/commit/c02b232b0cc24f38af5d5e3831d987d048e60ada)) ## [0.1.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.1.3...@ohif/extension-dicom-rt@0.1.4) (2020-05-14) - ### Bug Fixes -* 🐛 Load default display set when no time metadata ([#1684](https://github.com/OHIF/Viewers/issues/1684)) ([f7b8b6a](https://github.com/OHIF/Viewers/commit/f7b8b6a41c4626084ef56b0fdf7363e914b143c4)), closes [#1683](https://github.com/OHIF/Viewers/issues/1683) - - - - +- 🐛 Load default display set when no time metadata + ([#1684](https://github.com/OHIF/Viewers/issues/1684)) + ([f7b8b6a](https://github.com/OHIF/Viewers/commit/f7b8b6a41c4626084ef56b0fdf7363e914b143c4)), + closes [#1683](https://github.com/OHIF/Viewers/issues/1683) ## [0.1.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.1.2...@ohif/extension-dicom-rt@0.1.3) (2020-05-12) - ### Bug Fixes -* 🐛 Fix seg color load ([#1724](https://github.com/OHIF/Viewers/issues/1724)) ([c4f84b1](https://github.com/OHIF/Viewers/commit/c4f84b1174d04ba84d37ed89b6d7ab541be28181)) - - - - +- 🐛 Fix seg color load ([#1724](https://github.com/OHIF/Viewers/issues/1724)) + ([c4f84b1](https://github.com/OHIF/Viewers/commit/c4f84b1174d04ba84d37ed89b6d7ab541be28181)) ## [0.1.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.1.1...@ohif/extension-dicom-rt@0.1.2) (2020-05-04) - ### Bug Fixes -* 🐛 Proper error handling for derived display sets ([#1708](https://github.com/OHIF/Viewers/issues/1708)) ([5b20d8f](https://github.com/OHIF/Viewers/commit/5b20d8f323e4b3ef9988f2f2ab672d697b6da409)) - - - - +- 🐛 Proper error handling for derived display sets + ([#1708](https://github.com/OHIF/Viewers/issues/1708)) + ([5b20d8f](https://github.com/OHIF/Viewers/commit/5b20d8f323e4b3ef9988f2f2ab672d697b6da409)) ## [0.1.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.1.0...@ohif/extension-dicom-rt@0.1.1) (2020-04-28) **Note:** Version bump only for package @ohif/extension-dicom-rt - - - - # [0.1.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.0.2...@ohif/extension-dicom-rt@0.1.0) (2020-04-24) - ### Features -* 🎸 Seg jump to slice + show/hide ([835f64d](https://github.com/OHIF/Viewers/commit/835f64d47a9994f6a25aaf3941a4974e215e7e7f)) - - - - +- 🎸 Seg jump to slice + show/hide + ([835f64d](https://github.com/OHIF/Viewers/commit/835f64d47a9994f6a25aaf3941a4974e215e7e7f)) ## 0.0.2 (2020-04-09) diff --git a/extensions/dicom-rt/package.json b/extensions/dicom-rt/package.json index e57a683af67..723734becc1 100644 --- a/extensions/dicom-rt/package.json +++ b/extensions/dicom-rt/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-dicom-rt", - "version": "0.4.1", + "version": "0.4.5", "description": "OHIF extension for rendering DICOM RTSTRUCTs on top of cornerstone images.", "author": "OHIF", "license": "MIT", @@ -31,10 +31,11 @@ "@ohif/core": "^0.50.0", "cornerstone-core": "^2.2.8", "cornerstone-tools": "^4.20.1", - "dcmjs": "0.16.0", + "dcmjs": "0.16.3", "prop-types": "^15.6.2", "react": "^16.8.6", - "react-dom": "^16.8.6" + "react-dom": "^16.8.6", + "react-tooltip": "4.2.10" }, "dependencies": { "@babel/runtime": "^7.5.5", diff --git a/extensions/dicom-rt/src/OHIFDicomRTStructSopClassHandler.js b/extensions/dicom-rt/src/OHIFDicomRTStructSopClassHandler.js index 0aae17761ab..4f624cfa682 100644 --- a/extensions/dicom-rt/src/OHIFDicomRTStructSopClassHandler.js +++ b/extensions/dicom-rt/src/OHIFDicomRTStructSopClassHandler.js @@ -56,6 +56,7 @@ const OHIFDicomRTStructSopClassHandler = { SeriesTime, SeriesNumber, SeriesDescription, + metadata, }; if (!metadata.ReferencedSeriesSequence) { diff --git a/extensions/dicom-rt/src/components/RTPanel/RTPanel.js b/extensions/dicom-rt/src/components/RTPanel/RTPanel.js index 4e1e46c7198..856c60d56f4 100644 --- a/extensions/dicom-rt/src/components/RTPanel/RTPanel.js +++ b/extensions/dicom-rt/src/components/RTPanel/RTPanel.js @@ -12,6 +12,9 @@ import StructureSetItem from '../StructureSetItem/StructureSetItem'; import RTPanelSettings from '../RTSettings/RTSettings'; import PanelSection from '../PanelSection/PanelSection'; import LoadingIndicator from '../LoadingIndicator/LoadingIndicator'; +import TOOL_NAMES from '../../utils/toolNames'; + +const { RTSTRUCT_DISPLAY_TOOL } = TOOL_NAMES; const { studyMetadataManager } = utils; @@ -144,13 +147,16 @@ const RTPanel = ({ if (isCornerstone()) { const enabledElements = cornerstone.getEnabledElements(); const element = enabledElements[activeIndex].element; - const toolState = cornerstoneTools.getToolState(element, 'stack'); + const stackToolState = cornerstoneTools.getToolState( + element, + 'stack' + ); - if (!toolState) { + if (!stackToolState) { return; } - const imageIds = toolState.data[0].imageIds; + const imageIds = stackToolState.data[0].imageIds; const module = cornerstoneTools.getModule('rtstruct'); const imageId = module.getters.imageIdOfCenterFrameOfROIContour( @@ -159,6 +165,18 @@ const RTPanel = ({ imageIds ); + const toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.saveToolState(); + const imageIdSpecificToolState = toolState[imageId]; + + const rtstructData = + imageIdSpecificToolState[RTSTRUCT_DISPLAY_TOOL]; + + const specificData = rtstructData.data.find( + rtData => rtData.ROINumber === ROINumber + ); + + specificData.highlight = true; + const frameIndex = imageIds.indexOf(imageId); const SOPInstanceUID = cornerstone.metaData.get( 'SOPInstanceUID', diff --git a/extensions/dicom-rt/src/components/StructureSetItem/StructureSetItem.js b/extensions/dicom-rt/src/components/StructureSetItem/StructureSetItem.js index b1b3c1be90b..363360478ce 100644 --- a/extensions/dicom-rt/src/components/StructureSetItem/StructureSetItem.js +++ b/extensions/dicom-rt/src/components/StructureSetItem/StructureSetItem.js @@ -1,6 +1,7 @@ import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import { TableListItem, Icon, Tooltip, OverlayTrigger } from '@ohif/ui'; +import ReactTooltip from 'react-tooltip'; import './StructureSetItem.css'; @@ -68,7 +69,18 @@ const StructureSetItem = ({ >
- {label} + + {label} + + + {label} + {!isDisabled && ( { + crossHairCenter.x += point.x; + crossHairCenter.y += point.y; + }); + + crossHairCenter.x /= points.length; + crossHairCenter.y /= points.length; + + // TODO: Disabling hightlight for now, it'd be good to bring it back + // when we have a good way of doing this for SEG. + + // options.fillStyle = color = `rgba(${colorArray[0]},${colorArray[1]},${ + // colorArray[2] + // },${highlightOpacity})`; + + // Draw highlight lines. + + delete data.highlight; // Don't highlight on next render. + } + switch (data.type) { case 'CLOSED_PLANAR': - this._renderClosedPlanar(context, eventData.element, points, { - color, - lineWidth, - }); + this._renderClosedPlanar(context, eventData.element, points, options); break; case 'POINT': - this._renderPoint(context, eventData.element, points, { - color, - lineWidth, - }); + this._renderPoint(context, eventData.element, points, options); break; case 'OPEN_PLANAR': - this._renderOpenPlanar(context, eventData.element, points, { - color, - lineWidth, - }); + this._renderOpenPlanar(context, eventData.element, points, options); break; } } + + if (crossHairCenter) { + drawCanvasCrosshairs(eventData, crossHairCenter, { + color: toolColors.getActiveColor(), + lineWidth: 1, + }); + } } _renderClosedPlanar(context, element, points, options) { diff --git a/extensions/dicom-rt/src/tools/modules/rtStructModule.js b/extensions/dicom-rt/src/tools/modules/rtStructModule.js index 0cca6e662c4..7d0a4ddf751 100644 --- a/extensions/dicom-rt/src/tools/modules/rtStructModule.js +++ b/extensions/dicom-rt/src/tools/modules/rtStructModule.js @@ -13,7 +13,8 @@ function refreshViewport() { const configuration = { lineWidth: 3, - opacity: 1.0, + opacity: 0.75, + highlightOpacity: 0.5, }; const state = { diff --git a/extensions/dicom-rt/src/utils/drawCanvasCrosshairs.js b/extensions/dicom-rt/src/utils/drawCanvasCrosshairs.js new file mode 100644 index 00000000000..cb4645e2462 --- /dev/null +++ b/extensions/dicom-rt/src/utils/drawCanvasCrosshairs.js @@ -0,0 +1,56 @@ +import cornerstone from 'cornerstone-core'; +import cornerstoneTools from 'cornerstone-tools'; + +const { importInternal } = cornerstoneTools; +const draw = importInternal('drawing/draw'); +const drawLine = importInternal('drawing/drawLine'); +const getNewContext = importInternal('drawing/getNewContext'); + +export default function _drawCanvasCrosshairs(eventData, center, options) { + const context = getNewContext(eventData.canvasContext.canvas); + const { element } = eventData; + + const centerCanvas = cornerstone.pixelToCanvas(element, center); + + const { clientWidth: width, clientHeight: height } = element; + + const offset = 10; + + draw(context, context => { + drawLine( + context, + element, + { x: centerCanvas.x + offset, y: centerCanvas.y }, + { x: width, y: centerCanvas.y }, + options, + 'canvas' + ); + + drawLine( + context, + element, + { x: centerCanvas.x - offset, y: centerCanvas.y }, + { x: 0, y: centerCanvas.y }, + options, + 'canvas' + ); + + drawLine( + context, + element, + { x: centerCanvas.x, y: centerCanvas.y + offset }, + { x: centerCanvas.x, y: height }, + options, + 'canvas' + ); + + drawLine( + context, + element, + { x: centerCanvas.x, y: centerCanvas.y - offset }, + { x: centerCanvas.x, y: 0 }, + options, + 'canvas' + ); + }); +} diff --git a/extensions/dicom-segmentation/CHANGELOG.md b/extensions/dicom-segmentation/CHANGELOG.md index ee1b170b3c7..12cdfd94a9d 100644 --- a/extensions/dicom-segmentation/CHANGELOG.md +++ b/extensions/dicom-segmentation/CHANGELOG.md @@ -1,166 +1,130 @@ # Change Log -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +All notable changes to this project will be documented in this file. See +[Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [0.4.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.4.0...@ohif/extension-dicom-segmentation@0.4.1) (2020-08-28) +## [0.4.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.4.4...@ohif/extension-dicom-segmentation@0.4.5) (2020-09-10) **Note:** Version bump only for package @ohif/extension-dicom-segmentation +## [0.4.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.4.3...@ohif/extension-dicom-segmentation@0.4.4) (2020-09-10) +**Note:** Version bump only for package @ohif/extension-dicom-segmentation +## [0.4.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.4.2...@ohif/extension-dicom-segmentation@0.4.3) (2020-09-03) +**Note:** Version bump only for package @ohif/extension-dicom-segmentation -# [0.4.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.3.4...@ohif/extension-dicom-segmentation@0.4.0) (2020-08-18) - +## [0.4.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.4.1...@ohif/extension-dicom-segmentation@0.4.2) (2020-09-02) -### Features +**Note:** Version bump only for package @ohif/extension-dicom-segmentation -* 🎸 Update react-vtkjs-viewport usage to use requestPool ([#1984](https://github.com/OHIF/Viewers/issues/1984)) ([bb5f30c](https://github.com/OHIF/Viewers/commit/bb5f30ce2a0192d2e021beaaadfff22fd38e17b9)) +## [0.4.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.4.0...@ohif/extension-dicom-segmentation@0.4.1) (2020-08-28) +**Note:** Version bump only for package @ohif/extension-dicom-segmentation +# [0.4.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.3.4...@ohif/extension-dicom-segmentation@0.4.0) (2020-08-18) +### Features +- 🎸 Update react-vtkjs-viewport usage to use requestPool + ([#1984](https://github.com/OHIF/Viewers/issues/1984)) + ([bb5f30c](https://github.com/OHIF/Viewers/commit/bb5f30ce2a0192d2e021beaaadfff22fd38e17b9)) ## [0.3.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.3.3...@ohif/extension-dicom-segmentation@0.3.4) (2020-08-10) **Note:** Version bump only for package @ohif/extension-dicom-segmentation - - - - ## [0.3.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.3.2...@ohif/extension-dicom-segmentation@0.3.3) (2020-07-13) **Note:** Version bump only for package @ohif/extension-dicom-segmentation - - - - ## [0.3.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.3.1...@ohif/extension-dicom-segmentation@0.3.2) (2020-07-13) - ### Bug Fixes -* 🐛 Fix RT Panel hide/show and Fix looping load errors ([#1877](https://github.com/OHIF/Viewers/issues/1877)) ([e7cc735](https://github.com/OHIF/Viewers/commit/e7cc735c03d02eeb0d3af4ba02c15ed4f81bbec2)) - - - - +- 🐛 Fix RT Panel hide/show and Fix looping load errors + ([#1877](https://github.com/OHIF/Viewers/issues/1877)) + ([e7cc735](https://github.com/OHIF/Viewers/commit/e7cc735c03d02eeb0d3af4ba02c15ed4f81bbec2)) ## [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) - - - - +- 🐛 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) - ### Features -* 🎸 1729 - error boundary wrapper ([#1764](https://github.com/OHIF/Viewers/issues/1764)) ([c02b232](https://github.com/OHIF/Viewers/commit/c02b232b0cc24f38af5d5e3831d987d048e60ada)) - - - - +- 🎸 1729 - error boundary wrapper + ([#1764](https://github.com/OHIF/Viewers/issues/1764)) + ([c02b232](https://github.com/OHIF/Viewers/commit/c02b232b0cc24f38af5d5e3831d987d048e60ada)) ## [0.2.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.2.5...@ohif/extension-dicom-segmentation@0.2.6) (2020-05-12) - ### Bug Fixes -* 🐛 Fix seg color load ([#1724](https://github.com/OHIF/Viewers/issues/1724)) ([c4f84b1](https://github.com/OHIF/Viewers/commit/c4f84b1174d04ba84d37ed89b6d7ab541be28181)) - - - - +- 🐛 Fix seg color load ([#1724](https://github.com/OHIF/Viewers/issues/1724)) + ([c4f84b1](https://github.com/OHIF/Viewers/commit/c4f84b1174d04ba84d37ed89b6d7ab541be28181)) ## [0.2.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.2.4...@ohif/extension-dicom-segmentation@0.2.5) (2020-05-06) **Note:** Version bump only for package @ohif/extension-dicom-segmentation - - - - ## [0.2.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.2.3...@ohif/extension-dicom-segmentation@0.2.4) (2020-05-04) **Note:** Version bump only for package @ohif/extension-dicom-segmentation - - - - ## [0.2.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.2.2...@ohif/extension-dicom-segmentation@0.2.3) (2020-05-04) - ### Bug Fixes -* 🐛 Proper error handling for derived display sets ([#1708](https://github.com/OHIF/Viewers/issues/1708)) ([5b20d8f](https://github.com/OHIF/Viewers/commit/5b20d8f323e4b3ef9988f2f2ab672d697b6da409)) - - - - +- 🐛 Proper error handling for derived display sets + ([#1708](https://github.com/OHIF/Viewers/issues/1708)) + ([5b20d8f](https://github.com/OHIF/Viewers/commit/5b20d8f323e4b3ef9988f2f2ab672d697b6da409)) ## [0.2.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.2.1...@ohif/extension-dicom-segmentation@0.2.2) (2020-04-28) **Note:** Version bump only for package @ohif/extension-dicom-segmentation - - - - ## [0.2.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.2.0...@ohif/extension-dicom-segmentation@0.2.1) (2020-04-27) - ### Bug Fixes -* 🐛 Dropdown not updating when selecting segment ([#1675](https://github.com/OHIF/Viewers/issues/1675)) ([20e366f](https://github.com/OHIF/Viewers/commit/20e366ffbd76781f48dc99c9f59e24b255b5e5df)), closes [#1669](https://github.com/OHIF/Viewers/issues/1669) - - - - +- 🐛 Dropdown not updating when selecting segment + ([#1675](https://github.com/OHIF/Viewers/issues/1675)) + ([20e366f](https://github.com/OHIF/Viewers/commit/20e366ffbd76781f48dc99c9f59e24b255b5e5df)), + closes [#1669](https://github.com/OHIF/Viewers/issues/1669) # [0.2.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.1.2...@ohif/extension-dicom-segmentation@0.2.0) (2020-04-24) - ### Features -* 🎸 Seg jump to slice + show/hide ([835f64d](https://github.com/OHIF/Viewers/commit/835f64d47a9994f6a25aaf3941a4974e215e7e7f)) - - - - +- 🎸 Seg jump to slice + show/hide + ([835f64d](https://github.com/OHIF/Viewers/commit/835f64d47a9994f6a25aaf3941a4974e215e7e7f)) ## [0.1.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.1.1...@ohif/extension-dicom-segmentation@0.1.2) (2020-04-09) **Note:** Version bump only for package @ohif/extension-dicom-segmentation - - - - ## [0.1.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.1.0...@ohif/extension-dicom-segmentation@0.1.1) (2020-04-01) - ### Bug Fixes -* segmentation not loading ([#1566](https://github.com/OHIF/Viewers/issues/1566)) ([4a7ce1c](https://github.com/OHIF/Viewers/commit/4a7ce1c09324d74c61048393e3a2427757e4001a)) - - - - +- segmentation not loading + ([#1566](https://github.com/OHIF/Viewers/issues/1566)) + ([4a7ce1c](https://github.com/OHIF/Viewers/commit/4a7ce1c09324d74c61048393e3a2427757e4001a)) # 0.1.0 (2020-03-13) - ### Features -* Segmentations Settings UI - Phase 1 [#1391](https://github.com/OHIF/Viewers/issues/1391) ([#1392](https://github.com/OHIF/Viewers/issues/1392)) ([e8842cf](https://github.com/OHIF/Viewers/commit/e8842cf8aebde98db7fc123e4867c8288552331f)), closes [#1423](https://github.com/OHIF/Viewers/issues/1423) +- Segmentations Settings UI - Phase 1 + [#1391](https://github.com/OHIF/Viewers/issues/1391) + ([#1392](https://github.com/OHIF/Viewers/issues/1392)) + ([e8842cf](https://github.com/OHIF/Viewers/commit/e8842cf8aebde98db7fc123e4867c8288552331f)), + closes [#1423](https://github.com/OHIF/Viewers/issues/1423) diff --git a/extensions/dicom-segmentation/package.json b/extensions/dicom-segmentation/package.json index 4847aae1eb6..c0cde8beafc 100644 --- a/extensions/dicom-segmentation/package.json +++ b/extensions/dicom-segmentation/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-dicom-segmentation", - "version": "0.4.1", + "version": "0.4.5", "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.16.0", + "dcmjs": "0.16.3", "prop-types": "^15.6.2", "react": "^16.8.6", "react-dom": "^16.8.6" @@ -39,6 +39,7 @@ "dependencies": { "@babel/runtime": "^7.5.5", "gl-matrix": "^3.3.0", - "react-select": "^3.0.8" + "react-select": "^3.0.8", + "react-tooltip": "4.2.10" } } diff --git a/extensions/dicom-segmentation/src/components/SegmentItem/SegmentItem.js b/extensions/dicom-segmentation/src/components/SegmentItem/SegmentItem.js index 9d405e8e95e..84c7860a5b3 100644 --- a/extensions/dicom-segmentation/src/components/SegmentItem/SegmentItem.js +++ b/extensions/dicom-segmentation/src/components/SegmentItem/SegmentItem.js @@ -1,6 +1,7 @@ import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import { TableListItem, Icon } from '@ohif/ui'; +import ReactTooltip from 'react-tooltip'; import './SegmentItem.css'; @@ -17,7 +18,15 @@ ColoredCircle.propTypes = { color: PropTypes.array.isRequired, }; -const SegmentItem = ({ index, label, onClick, itemClass, color, visible = true, onVisibilityChange }) => { +const SegmentItem = ({ + index, + label, + onClick, + itemClass, + color, + visible = true, + onVisibilityChange, +}) => { const [isVisible, setIsVisible] = useState(visible); useEffect(() => { @@ -37,7 +46,18 @@ const SegmentItem = ({ index, label, onClick, itemClass, color, visible = true, >
- {label} + + {label} + + + {label} + - Relabel + Relabel
)} @@ -90,7 +110,7 @@ SegmentItem.propTypes = { SegmentItem.defaultProps = { itemClass: '', - onClick: () => { } + onClick: () => {}, }; export default SegmentItem; diff --git a/extensions/dicom-segmentation/src/components/SegmentationPanel/SegmentationPanel.js b/extensions/dicom-segmentation/src/components/SegmentationPanel/SegmentationPanel.js index 79936efee2d..7fb9d6bc9fc 100644 --- a/extensions/dicom-segmentation/src/components/SegmentationPanel/SegmentationPanel.js +++ b/extensions/dicom-segmentation/src/components/SegmentationPanel/SegmentationPanel.js @@ -5,6 +5,7 @@ import cornerstone from 'cornerstone-core'; import moment from 'moment'; import { utils, log } from '@ohif/core'; import { ScrollableArea, TableList, Icon } from '@ohif/ui'; +import DICOMSegTempCrosshairsTool from '../../tools/DICOMSegTempCrosshairsTool'; import setActiveLabelmap from '../../utils/setActiveLabelMap'; import refreshViewports from '../../utils/refreshViewports'; @@ -334,6 +335,12 @@ const SegmentationPanel = ({ imageId ); + DICOMSegTempCrosshairsTool.addCrosshair( + element, + imageId, + segmentNumber + ); + onSegmentItemClick({ StudyInstanceUID, SOPInstanceUID, diff --git a/extensions/dicom-segmentation/src/getOHIFDicomSegSopClassHandler.js b/extensions/dicom-segmentation/src/getOHIFDicomSegSopClassHandler.js index 83f84ed425e..2a3c5ad306b 100644 --- a/extensions/dicom-segmentation/src/getOHIFDicomSegSopClassHandler.js +++ b/extensions/dicom-segmentation/src/getOHIFDicomSegSopClassHandler.js @@ -28,12 +28,12 @@ export default function getSopClassHandlerModule({ servicesManager }) { const { SeriesDate, SeriesTime, - SeriesNumber, SeriesDescription, FrameOfReferenceUID, SOPInstanceUID, SeriesInstanceUID, StudyInstanceUID, + SeriesNumber, } = metadata; const segDisplaySet = { @@ -55,6 +55,7 @@ export default function getSopClassHandlerModule({ servicesManager }) { SeriesTime, SeriesNumber, SeriesDescription, + metadata, }; segDisplaySet.getSourceDisplaySet = function(studies) { diff --git a/extensions/dicom-segmentation/src/getSourceDisplaySet.js b/extensions/dicom-segmentation/src/getSourceDisplaySet.js index f7b62bd096a..f42351fcef2 100644 --- a/extensions/dicom-segmentation/src/getSourceDisplaySet.js +++ b/extensions/dicom-segmentation/src/getSourceDisplaySet.js @@ -1,4 +1,7 @@ import setActiveLabelmap from './utils/setActiveLabelMap'; +import { classes } from '@ohif/core'; + +const { ImageSet } = classes; export default function getSourceDisplaySet(studies, segDisplaySet) { const referencedDisplaySet = _getReferencedDisplaySet(segDisplaySet, studies); @@ -19,15 +22,43 @@ const _getReferencedDisplaySet = (segDisplaySet, studies) => { ds => ds.displaySetInstanceUID !== segDisplaySet.displaySetInstanceUID ); - const ReferencedSeriesSequence = Array.isArray( - segDisplaySet.metadata.ReferencedSeriesSequence - ) - ? segDisplaySet.metadata.ReferencedSeriesSequence - : [segDisplaySet.metadata.ReferencedSeriesSequence]; + const { metadata } = segDisplaySet; - const referencedSeriesInstanceUIDs = ReferencedSeriesSequence.map( - ReferencedSeries => ReferencedSeries.SeriesInstanceUID - ); + let referencedSeriesInstanceUIDs; + + if (metadata.ReferencedSeriesSequence) { + const ReferencedSeriesSequence = _toArray( + metadata.ReferencedSeriesSequence + ); + + referencedSeriesInstanceUIDs = ReferencedSeriesSequence.map( + ReferencedSeries => ReferencedSeries.SeriesInstanceUID + ); + } else { + const { PerFrameFunctionalGroupsSequence } = metadata; + + let SourceImageSequence; + + if (metadata.SourceImageSequence) { + SourceImageSequence = metadata.SourceImageSequence; + } else { + const firstFunctionalGroups = _toArray( + PerFrameFunctionalGroupsSequence + )[0]; + const { DerivationImageSequence } = firstFunctionalGroups; + + SourceImageSequence = DerivationImageSequence; + } + + const firstSourceImage = _toArray(SourceImageSequence)[0]; + + const { ReferencedSOPInstanceUID } = firstSourceImage; + + referencedSeriesInstanceUIDs = _findReferencedSeriesInstanceUIDsFromSOPInstanceUID( + otherDisplaySets, + ReferencedSOPInstanceUID + ); + } const referencedDisplaySet = otherDisplaySets.find(ds => referencedSeriesInstanceUIDs.includes(ds.SeriesInstanceUID) @@ -35,3 +66,23 @@ const _getReferencedDisplaySet = (segDisplaySet, studies) => { return referencedDisplaySet; }; + +const _findReferencedSeriesInstanceUIDsFromSOPInstanceUID = ( + displaySets, + SOPInstanceUID +) => { + const imageSets = displaySets.filter(ds => ds instanceof ImageSet); + + for (let i = 0; i < imageSets.length; i++) { + const { images } = imageSets[i]; + for (let j = 0; j < images.length; j++) { + if (images[j].SOPInstanceUID === SOPInstanceUID) { + return [images[j].getData().metadata.SeriesInstanceUID]; + } + } + } +}; + +function _toArray(arrayOrObject) { + return Array.isArray(arrayOrObject) ? arrayOrObject : [arrayOrObject]; +} diff --git a/extensions/dicom-segmentation/src/index.js b/extensions/dicom-segmentation/src/index.js index d8f49de43f1..d6c1714905d 100644 --- a/extensions/dicom-segmentation/src/index.js +++ b/extensions/dicom-segmentation/src/index.js @@ -1,15 +1,16 @@ import React from 'react'; - import init from './init.js'; import toolbarModule from './toolbarModule.js'; import getSopClassHandlerModule from './getOHIFDicomSegSopClassHandler.js'; import SegmentationPanel from './components/SegmentationPanel/SegmentationPanel.js'; +import { version } from '../package.json'; export default { /** * Only required property. Should be a unique value across all extensions. */ id: 'com.ohif.dicom-segmentation', + version, /** * diff --git a/extensions/dicom-segmentation/src/init.js b/extensions/dicom-segmentation/src/init.js index 504b1e92d83..e114dcd1249 100644 --- a/extensions/dicom-segmentation/src/init.js +++ b/extensions/dicom-segmentation/src/init.js @@ -1,4 +1,5 @@ import csTools from 'cornerstone-tools'; +import DICOMSegTempCrosshairsTool from './tools/DICOMSegTempCrosshairsTool'; /** * @@ -17,4 +18,6 @@ export default function init({ servicesManager, configuration = {} }) { alwaysEraseOnClick: true, }, }); + + csTools.addTool(DICOMSegTempCrosshairsTool); } diff --git a/extensions/dicom-segmentation/src/tools/DICOMSegTempCrosshairsTool.js b/extensions/dicom-segmentation/src/tools/DICOMSegTempCrosshairsTool.js new file mode 100644 index 00000000000..8bafbbc7b2a --- /dev/null +++ b/extensions/dicom-segmentation/src/tools/DICOMSegTempCrosshairsTool.js @@ -0,0 +1,127 @@ +import cornerstoneTools, { + importInternal, + getToolState, + toolColors, + getModule, + globalImageIdSpecificToolStateManager, +} from 'cornerstone-tools'; +import cornerstone from 'cornerstone-core'; +import drawCanvasCrosshairs from '../utils/drawCanvasCrosshairs'; +import TOOL_NAMES from './TOOL_NAMES'; + +const { DICOM_SEG_TEMP_CROSSHAIRS_TOOL } = TOOL_NAMES; +const { getters } = getModule('segmentation'); + +// Cornerstone 3rd party dev kit imports +const BaseTool = importInternal('base/BaseTool'); + +/** + * @class RTStructDisplayTool - Renders RTSTRUCT data in a read only manner (i.e. as an overlay). + * @extends cornerstoneTools.BaseTool + */ +export default class DICOMSegTempCrosshairsTool extends BaseTool { + constructor(props = {}) { + const defaultProps = { + mixins: ['enabledOrDisabledBinaryTool'], + name: DICOM_SEG_TEMP_CROSSHAIRS_TOOL, + }; + + const initialProps = Object.assign(defaultProps, props); + + super(initialProps); + + this._rtStructModule = cornerstoneTools.getModule('rtstruct'); + } + + renderToolData(evt) { + const eventData = evt.detail; + const { element } = eventData; + const toolState = getToolState(evt.currentTarget, this.name); + + if (!toolState) { + return; + } + + // We have tool data for this element - iterate over each one and draw it + + for (let i = 0; i < toolState.data.length; i++) { + const data = toolState.data[i]; + const crossHairCenter = data.center; + + drawCanvasCrosshairs(eventData, crossHairCenter, { + color: toolColors.getActiveColor(), + lineWidth: 1, + }); + + // Remove the crosshairs, we only render them for one redraw. + toolState.data.pop(); + } + } +} + +DICOMSegTempCrosshairsTool.addCrosshair = (element, imageId, segmentNumber) => { + const labelmap3D = getters.labelmap3D(element); + const stackToolState = cornerstoneTools.getToolState(element, 'stack'); + const enabledElement = cornerstone.getEnabledElement(element); + + const { rows, columns } = enabledElement.image; + + if (!stackToolState) { + return; + } + + const imageIds = stackToolState.data[0].imageIds; + const imageIdIndex = imageIds.findIndex(imgId => imgId === imageId); + + const labelmap2D = labelmap3D.labelmaps2D[imageIdIndex]; + const { pixelData } = labelmap2D; + + let xCenter = 0; + let yCenter = 0; + + let count = 0; + + for (let y = 0; y < rows; y++) { + for (let x = 0; x < columns; x++) { + if (pixelData[y * columns + x] === segmentNumber) { + count++; + xCenter += x + 0.5; + yCenter += y + 0.5; + } + } + } + + xCenter /= count; + yCenter /= count; + + const globalToolState = globalImageIdSpecificToolStateManager.saveToolState(); + + if (!globalToolState[imageId]) { + globalToolState[imageId] = {}; + } + + const imageIdSpecificToolState = globalToolState[imageId]; + + if (!imageIdSpecificToolState[DICOM_SEG_TEMP_CROSSHAIRS_TOOL]) { + imageIdSpecificToolState[DICOM_SEG_TEMP_CROSSHAIRS_TOOL] = { data: [] }; + } else if (!imageIdSpecificToolState[DICOM_SEG_TEMP_CROSSHAIRS_TOOL].data) { + imageIdSpecificToolState[DICOM_SEG_TEMP_CROSSHAIRS_TOOL].data = []; + } + + const toolSpecificData = + imageIdSpecificToolState[DICOM_SEG_TEMP_CROSSHAIRS_TOOL].data; + + toolSpecificData.push({ center: { x: xCenter, y: yCenter }, segmentNumber }); + + // Enable the tool if not enabled for the element. + + const tool = cornerstoneTools.getToolForElement( + element, + DICOM_SEG_TEMP_CROSSHAIRS_TOOL + ); + + if (tool.mode !== 'enabled') { + // If not already active or passive, set passive so contours render. + cornerstoneTools.setToolEnabled(DICOM_SEG_TEMP_CROSSHAIRS_TOOL); + } +}; diff --git a/extensions/dicom-segmentation/src/tools/TOOL_NAMES.js b/extensions/dicom-segmentation/src/tools/TOOL_NAMES.js new file mode 100644 index 00000000000..57fc2dff566 --- /dev/null +++ b/extensions/dicom-segmentation/src/tools/TOOL_NAMES.js @@ -0,0 +1,5 @@ +const TOOL_NAMES = { + DICOM_SEG_TEMP_CROSSHAIRS_TOOL: 'DICOMSegTempCrosshairsTool', +}; + +export default TOOL_NAMES; diff --git a/extensions/dicom-segmentation/src/utils/drawCanvasCrosshairs.js b/extensions/dicom-segmentation/src/utils/drawCanvasCrosshairs.js new file mode 100644 index 00000000000..cb4645e2462 --- /dev/null +++ b/extensions/dicom-segmentation/src/utils/drawCanvasCrosshairs.js @@ -0,0 +1,56 @@ +import cornerstone from 'cornerstone-core'; +import cornerstoneTools from 'cornerstone-tools'; + +const { importInternal } = cornerstoneTools; +const draw = importInternal('drawing/draw'); +const drawLine = importInternal('drawing/drawLine'); +const getNewContext = importInternal('drawing/getNewContext'); + +export default function _drawCanvasCrosshairs(eventData, center, options) { + const context = getNewContext(eventData.canvasContext.canvas); + const { element } = eventData; + + const centerCanvas = cornerstone.pixelToCanvas(element, center); + + const { clientWidth: width, clientHeight: height } = element; + + const offset = 10; + + draw(context, context => { + drawLine( + context, + element, + { x: centerCanvas.x + offset, y: centerCanvas.y }, + { x: width, y: centerCanvas.y }, + options, + 'canvas' + ); + + drawLine( + context, + element, + { x: centerCanvas.x - offset, y: centerCanvas.y }, + { x: 0, y: centerCanvas.y }, + options, + 'canvas' + ); + + drawLine( + context, + element, + { x: centerCanvas.x, y: centerCanvas.y + offset }, + { x: centerCanvas.x, y: height }, + options, + 'canvas' + ); + + drawLine( + context, + element, + { x: centerCanvas.x, y: centerCanvas.y - offset }, + { x: centerCanvas.x, y: 0 }, + options, + 'canvas' + ); + }); +} diff --git a/extensions/dicom-tag-browser/.webpack/webpack.dev.js b/extensions/dicom-tag-browser/.webpack/webpack.dev.js new file mode 100644 index 00000000000..1ae30844802 --- /dev/null +++ b/extensions/dicom-tag-browser/.webpack/webpack.dev.js @@ -0,0 +1,8 @@ +const path = require('path'); +const webpackCommon = require('./../../../.webpack/webpack.commonjs.js'); +const SRC_DIR = path.join(__dirname, '../src'); +const DIST_DIR = path.join(__dirname, '../dist'); + +module.exports = (env, argv) => { + return webpackCommon(env, argv, { SRC_DIR, DIST_DIR }); +}; diff --git a/extensions/dicom-tag-browser/.webpack/webpack.prod.js b/extensions/dicom-tag-browser/.webpack/webpack.prod.js new file mode 100644 index 00000000000..31dff1ae7b9 --- /dev/null +++ b/extensions/dicom-tag-browser/.webpack/webpack.prod.js @@ -0,0 +1,38 @@ +const merge = require('webpack-merge'); +const path = require('path'); +const webpackCommon = require('./../../../.webpack/webpack.commonjs.js'); +const pkg = require('./../package.json'); + +const ROOT_DIR = path.join(__dirname, './..'); +const SRC_DIR = path.join(__dirname, '../src'); +const DIST_DIR = path.join(__dirname, '../dist'); + +module.exports = (env, argv) => { + const commonConfig = webpackCommon(env, argv, { SRC_DIR, DIST_DIR }); + + return merge(commonConfig, { + devtool: 'source-map', + stats: { + colors: true, + hash: true, + timings: true, + assets: true, + chunks: false, + chunkModules: false, + modules: false, + children: false, + warnings: true, + }, + optimization: { + minimize: true, + sideEffects: true, + }, + output: { + path: ROOT_DIR, + library: 'OHIFExtDicomP10Downloader', + libraryTarget: 'umd', + libraryExport: 'default', + filename: pkg.main, + }, + }); +}; diff --git a/extensions/dicom-tag-browser/CHANGELOG.md b/extensions/dicom-tag-browser/CHANGELOG.md new file mode 100644 index 00000000000..0e8396c9a38 --- /dev/null +++ b/extensions/dicom-tag-browser/CHANGELOG.md @@ -0,0 +1,8 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## 0.0.2 (2020-09-10) + +**Note:** Version bump only for package @ohif/extension-dicom-tag-browser diff --git a/extensions/dicom-tag-browser/LICENSE b/extensions/dicom-tag-browser/LICENSE new file mode 100644 index 00000000000..19e20dd35ca --- /dev/null +++ b/extensions/dicom-tag-browser/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Open Health Imaging Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/extensions/dicom-tag-browser/README.md b/extensions/dicom-tag-browser/README.md new file mode 100644 index 00000000000..f666b3ef902 --- /dev/null +++ b/extensions/dicom-tag-browser/README.md @@ -0,0 +1 @@ +# @ohif/extension-dicom-tag-browser diff --git a/extensions/dicom-tag-browser/package.json b/extensions/dicom-tag-browser/package.json new file mode 100644 index 00000000000..1613b6589a6 --- /dev/null +++ b/extensions/dicom-tag-browser/package.json @@ -0,0 +1,40 @@ +{ + "name": "@ohif/extension-dicom-tag-browser", + "version": "0.0.2", + "description": "OHIF extension for checking DICOM headers.", + "author": "OHIF", + "license": "MIT", + "repository": "OHIF/Viewers", + "main": "dist/index.umd.js", + "module": "src/index.js", + "publishConfig": { + "access": "public" + }, + "engines": { + "node": ">=10", + "npm": ">=6", + "yarn": ">=1.16.0" + }, + "files": [ + "dist", + "README.md" + ], + "scripts": { + "dev": "cross-env NODE_ENV=development webpack --config .webpack/webpack.dev.js --watch --debug --output-pathinfo", + "build": "cross-env NODE_ENV=production webpack --config .webpack/webpack.prod.js", + "build:package": "yarn run build", + "prepublishOnly": "yarn run build", + "start": "yarn run dev" + }, + "peerDependencies": { + "@ohif/core": "^2.6.0", + "dcmjs": "0.16.0", + "react": "^16.8.6" + }, + "dependencies": { + "@babel/runtime": "^7.5.5", + "dicomweb-client": "^0.6.0", + "moment": "2.24.0", + "react-select": "^3.0.8" + } +} diff --git a/extensions/dicom-tag-browser/src/components/DicomBrowserSelect.js b/extensions/dicom-tag-browser/src/components/DicomBrowserSelect.js new file mode 100644 index 00000000000..f8d62f87808 --- /dev/null +++ b/extensions/dicom-tag-browser/src/components/DicomBrowserSelect.js @@ -0,0 +1,58 @@ +import React from 'react'; +import Select from 'react-select'; + +const DicomBrowserSelect = ({ value, formatOptionLabel, options }) => ( +