Compare commits

..
Author SHA1 Message Date
ohif-bot 479e280fdf chore(version): Update package versions [skip ci] 2025-04-04 16:07:02 +00:00
ohif-bot d4f81cd2b7 chore(version): version.json [skip ci] 2025-04-04 16:06:55 +00:00
nithin-trenserandDevu Jayalekshmi 54fded554e feat: Automate tracking prompts for a less disruptive annotation workflow (#4822)
Co-authored-by: Devu Jayalekshmi <devu.jayalekshmi@trenser.com>
2025-04-04 12:02:13 -04:00
ohif-bot c0391cea1b chore(version): Update package versions [skip ci] 2025-04-03 15:45:43 +00:00
ohif-bot a9e69eb36f chore(version): version.json [skip ci] 2025-04-03 15:45:36 +00:00
dependabot[bot] a52be6460b chore(deps): bump @babel/runtime-corejs2 from 7.25.7 to 7.26.10 (#4843)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-03 11:33:33 -04:00
dependabot[bot] 587b6423cb chore(deps): bump @babel/helpers from 7.26.0 to 7.26.10 in /platform/docs (#4861)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-03 11:33:19 -04:00
dependabot[bot] f52a32d6c5 chore(deps): bump @babel/runtime from 7.24.7 to 7.26.10 (#4860)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-03 11:33:09 -04:00
dependabot[bot] 8142c55b6a chore(deps): bump @babel/runtime-corejs3 from 7.26.0 to 7.26.10 in /platform/docs (#4859)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-03 11:32:54 -04:00
dependabot[bot] 14afb42e2c chore(deps): bump axios from 0.27.2 to 1.8.4 (#4905)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-03 11:32:45 -04:00
dependabot[bot] 4e8e4f1491 chore(deps): bump tar-fs from 2.1.1 to 2.1.2 (#4901)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-03 11:32:39 -04:00
dependabot[bot] 814a2c914b chore(deps): bump image-size from 1.2.0 to 1.2.1 in /platform/docs (#4912)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-03 11:32:31 -04:00
ohif-bot f4fb42adb2 chore(version): Update package versions [skip ci] 2025-04-02 22:23:12 +00:00
ohif-bot 0fee0236c2 chore(version): version.json [skip ci] 2025-04-02 22:23:05 +00:00
Alireza e7fe879318 chore: update dependabot (#4916) 2025-04-02 18:17:05 -04:00
ohif-bot a619634678 chore(version): Update package versions [skip ci] 2025-04-02 22:15:26 +00:00
ohif-bot 651a7dc574 chore(version): version.json [skip ci] 2025-04-02 22:15:20 +00:00
Alireza 8432d5f633 fix(seg): Enhance segmentation tools and UI, refactor code, and update dependencies (#4915) 2025-04-02 18:10:47 -04:00
133 changed files with 3268 additions and 1391 deletions

No files matched your search

+12
View File
@@ -1,7 +1,19 @@
version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: 'bun'
directory: '/'
schedule:
interval: 'daily'
labels: ['dependencies']
commit-message:
prefix: 'chore'
include: 'scope'
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
labels: ['dependencies']
commit-message:
prefix: 'chore'
include: 'scope'
+38
View File
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
### Features
* Automate tracking prompts for a less disruptive annotation workflow ([#4822](https://github.com/OHIF/Viewers/issues/4822)) ([54fded5](https://github.com/OHIF/Viewers/commit/54fded554e934f2f75e00d456ebad7692d561225))
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package ohif-monorepo-root
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package ohif-monorepo-root
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
-1
View File
@@ -1,5 +1,4 @@
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<div align="center">
<h1>OHIF Medical Imaging Viewer</h1>
<p><strong>The OHIF Viewer</strong> is a zero-footprint medical image viewer
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @externals/devDependencies
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @externals/devDependencies
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @externals/devDependencies
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @externals/devDependencies
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @externals/devDependencies
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@externals/devDependencies",
"description": "External dev dependencies - put dev build dependencies here",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"license": "MIT",
"private": true,
"engines": {
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @externals/dicom-microscopy-viewer
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @externals/dicom-microscopy-viewer
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @externals/dicom-microscopy-viewer
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @externals/dicom-microscopy-viewer
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @externals/dicom-microscopy-viewer
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@externals/dicom-microscopy-viewer",
"description": "External reference to dicom-microscopy-viewer",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"license": "MIT",
"dependencies": {
"dicom-microscopy-viewer": "^0.46.1"
+147 -147
View File
@@ -33,7 +33,7 @@
},
"addOns/externals/devDependencies": {
"name": "@externals/devDependencies",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@kitware/vtk.js": "32.12.0",
@@ -121,22 +121,22 @@
},
"addOns/externals/dicom-microscopy-viewer": {
"name": "@externals/dicom-microscopy-viewer",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"dicom-microscopy-viewer": "^0.46.1",
},
},
"extensions/cornerstone": {
"name": "@ohif/extension-cornerstone",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^3.8.2",
"@cornerstonejs/ai": "^3.8.2",
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/labelmap-interpolation": "^3.8.2",
"@cornerstonejs/polymorphic-segmentation": "^3.8.2",
"@cornerstonejs/tools": "^3.8.2",
"@cornerstonejs/adapters": "^3.8.4",
"@cornerstonejs/ai": "^3.8.4",
"@cornerstonejs/core": "^3.8.4",
"@cornerstonejs/labelmap-interpolation": "^3.8.4",
"@cornerstonejs/polymorphic-segmentation": "^3.8.4",
"@cornerstonejs/tools": "^3.8.4",
"@itk-wasm/morphological-contour-interpolation": "1.1.0",
"@kitware/vtk.js": "32.12.0",
"html2canvas": "^1.4.1",
@@ -153,9 +153,9 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.4",
"@cornerstonejs/codec-openjph": "^2.4.5",
"@cornerstonejs/dicom-image-loader": "^3.8.2",
"@ohif/core": "3.10.0-beta.143",
"@ohif/ui": "3.10.0-beta.143",
"@cornerstonejs/dicom-image-loader": "^3.8.4",
"@ohif/core": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"dcmjs": "*",
"dicom-parser": "^1.8.21",
"hammerjs": "^2.0.8",
@@ -167,19 +167,19 @@
},
"extensions/cornerstone-dicom-pmap": {
"name": "@ohif/extension-cornerstone-dicom-pmap",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^3.8.2",
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/adapters": "^3.8.4",
"@cornerstonejs/core": "^3.8.4",
"@kitware/vtk.js": "32.12.0",
"react-color": "^2.19.3",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-cornerstone": "3.10.0-beta.143",
"@ohif/extension-default": "3.10.0-beta.143",
"@ohif/i18n": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"prop-types": "^15.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
@@ -190,16 +190,16 @@
},
"extensions/cornerstone-dicom-rt": {
"name": "@ohif/extension-cornerstone-dicom-rt",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"react-color": "^2.19.3",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-cornerstone": "3.10.0-beta.143",
"@ohif/extension-default": "3.10.0-beta.143",
"@ohif/i18n": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"prop-types": "^15.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
@@ -210,19 +210,19 @@
},
"extensions/cornerstone-dicom-seg": {
"name": "@ohif/extension-cornerstone-dicom-seg",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^3.8.2",
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/adapters": "^3.8.4",
"@cornerstonejs/core": "^3.8.4",
"@kitware/vtk.js": "32.12.0",
"react-color": "^2.19.3",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-cornerstone": "3.10.0-beta.143",
"@ohif/extension-default": "3.10.0-beta.143",
"@ohif/i18n": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"prop-types": "^15.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
@@ -233,19 +233,19 @@
},
"extensions/cornerstone-dicom-sr": {
"name": "@ohif/extension-cornerstone-dicom-sr",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^3.8.2",
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/tools": "^3.8.2",
"@cornerstonejs/adapters": "^3.8.4",
"@cornerstonejs/core": "^3.8.4",
"@cornerstonejs/tools": "^3.8.4",
"classnames": "^2.3.2",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-cornerstone": "3.10.0-beta.143",
"@ohif/extension-measurement-tracking": "3.10.0-beta.143",
"@ohif/ui": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-measurement-tracking": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"dcmjs": "*",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
@@ -255,19 +255,19 @@
},
"extensions/cornerstone-dynamic-volume": {
"name": "@ohif/extension-cornerstone-dynamic-volume",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/tools": "^3.8.2",
"@cornerstonejs/core": "^3.8.4",
"@cornerstonejs/tools": "^3.8.4",
"classnames": "^2.3.2",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-cornerstone": "3.10.0-beta.143",
"@ohif/extension-default": "3.10.0-beta.143",
"@ohif/i18n": "3.10.0-beta.143",
"@ohif/ui": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"dcmjs": "*",
"dicom-parser": "^1.8.21",
"hammerjs": "^2.0.8",
@@ -277,7 +277,7 @@
},
"extensions/default": {
"name": "@ohif/extension-default",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/calculate-suv": "^1.1.0",
@@ -285,8 +285,8 @@
"lodash.uniqby": "^4.7.0",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/i18n": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"dcmjs": "*",
"dicomweb-client": "^0.10.4",
"prop-types": "^15.6.2",
@@ -300,7 +300,7 @@
},
"extensions/dicom-microscopy": {
"name": "@ohif/extension-dicom-microscopy",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/codec-charls": "^1.2.3",
@@ -311,10 +311,10 @@
"mathjs": "^12.4.2",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-default": "3.10.0-beta.143",
"@ohif/i18n": "3.10.0-beta.143",
"@ohif/ui": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"prop-types": "^15.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
@@ -325,14 +325,14 @@
},
"extensions/dicom-pdf": {
"name": "@ohif/extension-dicom-pdf",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"classnames": "^2.3.2",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/ui": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"dcmjs": "*",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
@@ -342,14 +342,14 @@
},
"extensions/dicom-video": {
"name": "@ohif/extension-dicom-video",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"classnames": "^2.3.2",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/ui": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"dcmjs": "*",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
@@ -359,20 +359,20 @@
},
"extensions/measurement-tracking": {
"name": "@ohif/extension-measurement-tracking",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@ohif/ui": "3.10.0-beta.143",
"@ohif/ui": "3.10.0-beta.144",
"@xstate/react": "^3.2.2",
"xstate": "^4.10.0",
},
"peerDependencies": {
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/tools": "^3.8.2",
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.143",
"@ohif/extension-default": "3.10.0-beta.143",
"@ohif/ui": "3.10.0-beta.143",
"@cornerstonejs/core": "^3.8.4",
"@cornerstonejs/tools": "^3.8.4",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"classnames": "^2.3.2",
"dcmjs": "*",
"lodash.debounce": "^4.0.8",
@@ -385,14 +385,14 @@
},
"extensions/test-extension": {
"name": "@ohif/extension-test",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"classnames": "^2.3.2",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/ui": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"dcmjs": "0.38.0",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
@@ -402,7 +402,7 @@
},
"extensions/tmtv": {
"name": "@ohif/extension-tmtv",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"classnames": "^2.3.2",
@@ -419,7 +419,7 @@
},
"modes/basic-dev-mode": {
"name": "@ohif/mode-basic-dev-mode",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"i18next": "^17.0.3",
@@ -429,17 +429,17 @@
"webpack-merge": "^5.7.3",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-cornerstone": "3.10.0-beta.143",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.143",
"@ohif/extension-default": "3.10.0-beta.143",
"@ohif/extension-dicom-pdf": "3.10.0-beta.143",
"@ohif/extension-dicom-video": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/extension-dicom-pdf": "3.10.0-beta.144",
"@ohif/extension-dicom-video": "3.10.0-beta.144",
},
},
"modes/basic-test-mode": {
"name": "@ohif/mode-test",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"i18next": "^17.0.3",
@@ -449,19 +449,19 @@
"webpack-merge": "^5.7.3",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-cornerstone": "3.10.0-beta.143",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.143",
"@ohif/extension-default": "3.10.0-beta.143",
"@ohif/extension-dicom-pdf": "3.10.0-beta.143",
"@ohif/extension-dicom-video": "3.10.0-beta.143",
"@ohif/extension-measurement-tracking": "3.10.0-beta.143",
"@ohif/extension-test": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/extension-dicom-pdf": "3.10.0-beta.144",
"@ohif/extension-dicom-video": "3.10.0-beta.144",
"@ohif/extension-measurement-tracking": "3.10.0-beta.144",
"@ohif/extension-test": "3.10.0-beta.144",
},
},
"modes/longitudinal": {
"name": "@ohif/mode-longitudinal",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"i18next": "^17.0.3",
@@ -471,32 +471,32 @@
"webpack-merge": "^5.7.3",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-cornerstone": "3.10.0-beta.143",
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.143",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.143",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.143",
"@ohif/extension-default": "3.10.0-beta.143",
"@ohif/extension-dicom-pdf": "3.10.0-beta.143",
"@ohif/extension-dicom-video": "3.10.0-beta.143",
"@ohif/extension-measurement-tracking": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/extension-dicom-pdf": "3.10.0-beta.144",
"@ohif/extension-dicom-video": "3.10.0-beta.144",
"@ohif/extension-measurement-tracking": "3.10.0-beta.144",
},
},
"modes/microscopy": {
"name": "@ohif/mode-microscopy",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"i18next": "^17.0.3",
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-dicom-microscopy": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-dicom-microscopy": "3.10.0-beta.144",
},
},
"modes/preclinical-4d": {
"name": "@ohif/mode-preclinical-4d",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
},
@@ -515,7 +515,7 @@
},
"modes/segmentation": {
"name": "@ohif/mode-segmentation",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"i18next": "^17.0.3",
@@ -559,7 +559,7 @@
},
"modes/tmtv": {
"name": "@ohif/mode-tmtv",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"i18next": "^17.0.3",
@@ -580,32 +580,32 @@
},
"platform/app": {
"name": "@ohif/app",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/codec-charls": "^1.2.3",
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.4",
"@cornerstonejs/codec-openjph": "^2.4.5",
"@cornerstonejs/dicom-image-loader": "^3.8.2",
"@cornerstonejs/dicom-image-loader": "^3.8.4",
"@emotion/serialize": "^1.1.3",
"@ohif/core": "3.10.0-beta.143",
"@ohif/extension-cornerstone": "3.10.0-beta.143",
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.143",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.143",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.143",
"@ohif/extension-default": "3.10.0-beta.143",
"@ohif/extension-dicom-microscopy": "3.10.0-beta.143",
"@ohif/extension-dicom-pdf": "3.10.0-beta.143",
"@ohif/extension-dicom-video": "3.10.0-beta.143",
"@ohif/extension-test": "3.10.0-beta.143",
"@ohif/i18n": "3.10.0-beta.143",
"@ohif/mode-basic-dev-mode": "3.10.0-beta.143",
"@ohif/mode-longitudinal": "3.10.0-beta.143",
"@ohif/mode-microscopy": "3.10.0-beta.143",
"@ohif/mode-test": "3.10.0-beta.143",
"@ohif/ui": "3.10.0-beta.143",
"@ohif/ui-next": "3.10.0-beta.143",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/extension-dicom-microscopy": "3.10.0-beta.144",
"@ohif/extension-dicom-pdf": "3.10.0-beta.144",
"@ohif/extension-dicom-video": "3.10.0-beta.144",
"@ohif/extension-test": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"@ohif/mode-basic-dev-mode": "3.10.0-beta.144",
"@ohif/mode-longitudinal": "3.10.0-beta.144",
"@ohif/mode-microscopy": "3.10.0-beta.144",
"@ohif/mode-test": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"@ohif/ui-next": "3.10.0-beta.144",
"@svgr/webpack": "^8.1.0",
"@types/react": "^18.3.3",
"classnames": "^2.3.2",
@@ -646,7 +646,7 @@
},
"platform/cli": {
"name": "@ohif/cli",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"bin": {
"ohif-cli": "src/index.js",
},
@@ -670,7 +670,7 @@
},
"platform/core": {
"name": "@ohif/core",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"dcmjs": "*",
@@ -695,15 +695,15 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.4",
"@cornerstonejs/codec-openjph": "^2.4.5",
"@cornerstonejs/dicom-image-loader": "^3.8.2",
"@ohif/ui": "3.10.0-beta.143",
"@cornerstonejs/dicom-image-loader": "^3.8.4",
"@ohif/ui": "3.10.0-beta.144",
"cornerstone-math": "0.1.9",
"dicom-parser": "^1.8.21",
},
},
"platform/i18n": {
"name": "@ohif/i18n",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@babel/runtime": "^7.20.13",
"i18next-locize-backend": "^2.0.0",
@@ -728,7 +728,7 @@
},
"platform/ui": {
"name": "@ohif/ui",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@testing-library/react": "^13.1.0",
"browser-detect": "^0.2.28",
@@ -788,7 +788,7 @@
},
"platform/ui-next": {
"name": "@ohif/ui-next",
"version": "3.10.0-beta.143",
"version": "3.10.0-beta.144",
"dependencies": {
"@radix-ui/react-accordion": "^1.2.0",
"@radix-ui/react-checkbox": "^1.1.1",
@@ -831,16 +831,16 @@
},
},
"overrides": {
"commander": "8.3.0",
"path-to-regexp": "0.1.12",
"nth-check": "^2.1.1",
"trim-newlines": "^5.0.0",
"glob-parent": "^6.0.2",
"trim": "^1.0.0",
"package-json": "^8.1.0",
"sharp": "^0.32.6",
"rollup": "2.79.2",
"body-parser": "1.20.3",
"commander": "8.3.0",
"glob-parent": "^6.0.2",
"nth-check": "^2.1.1",
"package-json": "^8.1.0",
"path-to-regexp": "0.1.12",
"rollup": "2.79.2",
"sharp": "^0.32.6",
"trim": "^1.0.0",
"trim-newlines": "^5.0.0",
},
"packages": {
"@adobe/css-tools": ["@adobe/css-tools@4.4.2", "", {}, "sha512-baYZExFpsdkBNuvGKTKWCwKH57HRZLVtycZS05WTQNVOiXVSeAki3nU35zlRbToeMW8aHlJfyS+1C4BOv27q0A=="],
@@ -1099,9 +1099,9 @@
"@colors/colors": ["@colors/colors@1.5.0", "", {}, "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ=="],
"@cornerstonejs/adapters": ["@cornerstonejs/adapters@3.8.2", "", { "dependencies": { "@babel/runtime-corejs2": "^7.17.8", "buffer": "^6.0.3", "dcmjs": "^0.29.8", "gl-matrix": "^3.4.3", "ndarray": "^1.0.19" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.2", "@cornerstonejs/tools": "^3.8.2" } }, "sha512-6bxIa1BBvWD/X06MbB4QBOScTYmA1eTdLwg9jL+dHw5od8/CQhR22pfa0ZWsa8lkfFAMAdC1cU8BbiPNadG/0Q=="],
"@cornerstonejs/adapters": ["@cornerstonejs/adapters@3.8.4", "", { "dependencies": { "@babel/runtime-corejs2": "^7.17.8", "buffer": "^6.0.3", "dcmjs": "^0.29.8", "gl-matrix": "^3.4.3", "ndarray": "^1.0.19" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.4", "@cornerstonejs/tools": "^3.8.4" } }, "sha512-TFTvNZQBW54rEcyjDfyHZYYvIPHVGZoUCtjW3isHfpoXkjHz2cliwC55e0kcNJ0zbyI6H41c4VsYH8h2MTYOdA=="],
"@cornerstonejs/ai": ["@cornerstonejs/ai@3.8.2", "", { "dependencies": { "@babel/runtime-corejs2": "^7.17.8", "buffer": "^6.0.3", "dcmjs": "^0.29.8", "gl-matrix": "^3.4.3", "lodash.clonedeep": "^4.5.0", "ndarray": "^1.0.19", "onnxruntime-common": "1.17.1", "onnxruntime-web": "1.17.1" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.2", "@cornerstonejs/tools": "^3.8.2" } }, "sha512-B9Mr3BPWOQT+GKhG79v9xsuEfgh8a/YCK/qaseFfUGahxD/7QEcu49MuzIdigbA1rbRA3OELL0ZjXxVx3ON27A=="],
"@cornerstonejs/ai": ["@cornerstonejs/ai@3.8.4", "", { "dependencies": { "@babel/runtime-corejs2": "^7.17.8", "buffer": "^6.0.3", "dcmjs": "^0.29.8", "gl-matrix": "^3.4.3", "lodash.clonedeep": "^4.5.0", "ndarray": "^1.0.19", "onnxruntime-common": "1.17.1", "onnxruntime-web": "1.17.1" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.4", "@cornerstonejs/tools": "^3.8.4" } }, "sha512-scc2srdL1BqNTSFEro4y7UlNBsPtBVSF31eT4SC1psxZQcr/iyaCKuOQg/hglk1yobFkdIKvjRAvvqvYmGduQw=="],
"@cornerstonejs/calculate-suv": ["@cornerstonejs/calculate-suv@1.1.0", "", {}, "sha512-Q9XraiDJif9aMFArD2iEuDO/HXbcRVCqB7KfaHgDrdTTjgDFovS91Psbdim7crypRSvE6dh/+HKeFNHdvNkA6w=="],
@@ -1113,15 +1113,15 @@
"@cornerstonejs/codec-openjph": ["@cornerstonejs/codec-openjph@2.4.7", "", {}, "sha512-qvP4q4JDib7mi9r7LqKOwqz7YZ8gjtDX4ZCezeYf8+eb7MBXCz5uXAMeVF3yz9Axw4XiIMdB/pqXkm8tqCl13w=="],
"@cornerstonejs/core": ["@cornerstonejs/core@3.8.2", "", { "dependencies": { "@kitware/vtk.js": "32.12.1", "comlink": "^4.4.1", "gl-matrix": "^3.4.3", "loglevel": "^1.9.2" } }, "sha512-zhtCXXXZMGooVYCmsfL7sC/o7wSFxXAfFm4rOp92t5m8n8UFbtmcLAB167/EEp/csHiRuv0PR/dOgd6y9tLb0A=="],
"@cornerstonejs/core": ["@cornerstonejs/core@3.8.4", "", { "dependencies": { "@kitware/vtk.js": "32.12.1", "comlink": "^4.4.1", "gl-matrix": "^3.4.3", "loglevel": "^1.9.2" } }, "sha512-8spQvERZRn4I/0EhzTNZ5ruPBrVn5F4msb/q0ttBtiVEa9JaVwoWh3yEcO4q5NpK7t1BhpfSPMKwU98Dy02ugQ=="],
"@cornerstonejs/dicom-image-loader": ["@cornerstonejs/dicom-image-loader@3.8.2", "", { "dependencies": { "@cornerstonejs/codec-charls": "^1.2.3", "@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2", "@cornerstonejs/codec-openjpeg": "^1.2.2", "@cornerstonejs/codec-openjph": "^2.4.5", "comlink": "^4.4.1", "dicom-parser": "^1.8.9", "jpeg-lossless-decoder-js": "^2.1.0", "pako": "^2.0.4", "uuid": "^9.0.0" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.2" } }, "sha512-K0z5N+X6GpuRTfZhyuqpLIl+Y4JePyybQof/ZZ4aqwEIUm9NjXAYEUiYZEQQGtLItkPw+Vl7TbWA0FeI5GAC3Q=="],
"@cornerstonejs/dicom-image-loader": ["@cornerstonejs/dicom-image-loader@3.8.4", "", { "dependencies": { "@cornerstonejs/codec-charls": "^1.2.3", "@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2", "@cornerstonejs/codec-openjpeg": "^1.2.2", "@cornerstonejs/codec-openjph": "^2.4.5", "comlink": "^4.4.1", "dicom-parser": "^1.8.9", "jpeg-lossless-decoder-js": "^2.1.0", "pako": "^2.0.4", "uuid": "^9.0.0" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.4" } }, "sha512-N2D4U8JDhen+dCY1HrLOoK8W3CD2AAf/Cd+GiJMEGjtrihIuQ+Ha+hZTVQzaDMc7v2Ruvx2DpJ7i9HUJXoyWHw=="],
"@cornerstonejs/labelmap-interpolation": ["@cornerstonejs/labelmap-interpolation@3.8.2", "", { "dependencies": { "@itk-wasm/morphological-contour-interpolation": "1.1.0", "itk-wasm": "1.0.0-b.165" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.2", "@cornerstonejs/tools": "^3.8.2", "@kitware/vtk.js": "32.12.1" } }, "sha512-nvMHY4X6crsTL8EXKsKxXfVP/T04cCxCU90tsg7ceDi5mZ9qh6qnE0r8XOTclx/SsQ/YrwEaOIaflrfLKft19g=="],
"@cornerstonejs/labelmap-interpolation": ["@cornerstonejs/labelmap-interpolation@3.8.4", "", { "dependencies": { "@itk-wasm/morphological-contour-interpolation": "1.1.0", "itk-wasm": "1.0.0-b.165" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.4", "@cornerstonejs/tools": "^3.8.4", "@kitware/vtk.js": "32.12.1" } }, "sha512-KKDTeVJg1s0trplkaHglBm0foQ3XL9BhsTfatFCTzgIOCT0wolrKbr+xAKIeZuBQifiFazDWpYaeBHRbkWEEMA=="],
"@cornerstonejs/polymorphic-segmentation": ["@cornerstonejs/polymorphic-segmentation@3.8.2", "", { "dependencies": { "@icr/polyseg-wasm": "0.4.0" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.2", "@cornerstonejs/tools": "^3.8.2", "@kitware/vtk.js": "32.12.1" } }, "sha512-svlT/loFoB6t0r9dt31bMOkin82LftTF1J8ZWjJTOrbky2HxSyM4lnMbjQZbdhZDkhdQq0imQEOVIYNyhUAWBg=="],
"@cornerstonejs/polymorphic-segmentation": ["@cornerstonejs/polymorphic-segmentation@3.8.4", "", { "dependencies": { "@icr/polyseg-wasm": "0.4.0" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.4", "@cornerstonejs/tools": "^3.8.4", "@kitware/vtk.js": "32.12.1" } }, "sha512-+3o280NOniUkG9GcWTeTi6x3qy8Rm7WpYFycWpxXIufJzVudJi0zAR+EIWDq/uvTQ3DH1SrBDe4wzYNqD+yirw=="],
"@cornerstonejs/tools": ["@cornerstonejs/tools@3.8.2", "", { "dependencies": { "@types/offscreencanvas": "2019.7.3", "comlink": "^4.4.1", "lodash.get": "^4.4.2" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.2", "@kitware/vtk.js": "32.12.1", "@types/d3-array": "^3.0.4", "@types/d3-interpolate": "^3.0.1", "d3-array": "^3.2.3", "d3-interpolate": "^3.0.1", "gl-matrix": "^3.4.3" } }, "sha512-da8pJGv7b+sjAGIomH5CyM8+xHOvjhLipY4i/gp7Z6f5Wr5b/gYWc/l0CTD9G0aVFkyP06scGaBjwv0Ei1mqMQ=="],
"@cornerstonejs/tools": ["@cornerstonejs/tools@3.8.4", "", { "dependencies": { "@types/offscreencanvas": "2019.7.3", "comlink": "^4.4.1", "lodash.get": "^4.4.2" }, "peerDependencies": { "@cornerstonejs/core": "^3.8.4", "@kitware/vtk.js": "32.12.1", "@types/d3-array": "^3.0.4", "@types/d3-interpolate": "^3.0.1", "d3-array": "^3.2.3", "d3-interpolate": "^3.0.1", "gl-matrix": "^3.4.3" } }, "sha512-yr8RLtnxGh9BsPOFpX+zwT++UGJDqWMo7noWGzxkuISDriLr+HGZI8gL910Mw62obaF8r9qpeOSvSOzEHN3nSw=="],
"@csstools/postcss-cascade-layers": ["@csstools/postcss-cascade-layers@1.1.1", "", { "dependencies": { "@csstools/selector-specificity": "^2.0.2", "postcss-selector-parser": "^6.0.10" }, "peerDependencies": { "postcss": "^8.2" } }, "sha512-+KdYrpKC5TgomQr2DlZF4lDEpHcoxnj5IGddYYfBWJAKfj1JtuHUIqMa+E1pJJ+z3kvDViWMqyqPlG4Ja7amQA=="],
+1 -1
View File
@@ -1 +1 @@
c75a3f3af58c4cd29c349338e4065269d8d9f387
54fded554e934f2f75e00d456ebad7692d561225
@@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-pmap
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-pmap
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-pmap
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-pmap",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "DICOM Parametric Map read workflow",
"author": "OHIF",
"license": "MIT",
@@ -33,10 +33,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/i18n": "3.10.0-beta.148",
"prop-types": "^15.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
@@ -46,8 +46,8 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^3.8.2",
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/adapters": "^3.8.4",
"@cornerstonejs/core": "^3.8.4",
"@kitware/vtk.js": "32.12.0",
"react-color": "^2.19.3"
}
@@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
### Features
* Automate tracking prompts for a less disruptive annotation workflow ([#4822](https://github.com/OHIF/Viewers/issues/4822)) ([54fded5](https://github.com/OHIF/Viewers/commit/54fded554e934f2f75e00d456ebad7692d561225))
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-rt",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "DICOM RT read workflow",
"author": "OHIF",
"license": "MIT",
@@ -33,10 +33,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/i18n": "3.10.0-beta.148",
"prop-types": "^15.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
@@ -13,13 +13,13 @@ function promptHydrateRT({
preHydrateCallbacks,
hydrateRTDisplaySet,
}: withAppTypes) {
const { uiViewportDialogService } = servicesManager.services;
const { uiViewportDialogService, customizationService } = servicesManager.services;
const extensionManager = servicesManager._extensionManager;
const appConfig = extensionManager._appConfig;
return new Promise(async function (resolve, reject) {
const promptResult = appConfig?.disableConfirmationPrompts
? RESPONSE.HYDRATE_SEG
: await _askHydrate(uiViewportDialogService, viewportId);
: await _askHydrate(uiViewportDialogService, customizationService, viewportId);
if (promptResult === RESPONSE.HYDRATE_SEG) {
preHydrateCallbacks?.forEach(callback => {
@@ -37,9 +37,13 @@ function promptHydrateRT({
});
}
function _askHydrate(uiViewportDialogService: AppTypes.UIViewportDialogService, viewportId) {
function _askHydrate(
uiViewportDialogService: AppTypes.UIViewportDialogService,
customizationService: AppTypes.CustomizationService,
viewportId
) {
return new Promise(function (resolve, reject) {
const message = 'Do you want to open this Segmentation?';
const message = customizationService.getCustomization('viewportNotification.hydrateRTMessage');
const actions = [
{
id: 'no-hydrate',
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
### Features
* Automate tracking prompts for a less disruptive annotation workflow ([#4822](https://github.com/OHIF/Viewers/issues/4822)) ([54fded5](https://github.com/OHIF/Viewers/commit/54fded554e934f2f75e00d456ebad7692d561225))
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-seg",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "DICOM SEG read workflow",
"author": "OHIF",
"license": "MIT",
@@ -33,10 +33,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/i18n": "3.10.0-beta.148",
"prop-types": "^15.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
@@ -46,8 +46,8 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^3.8.2",
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/adapters": "^3.8.4",
"@cornerstonejs/core": "^3.8.4",
"@kitware/vtk.js": "32.12.0",
"react-color": "^2.19.3"
}
@@ -1,22 +1,13 @@
import dcmjs from 'dcmjs';
import { Types } from '@ohif/core';
import { classes, Types } from '@ohif/core';
import { cache, metaData } from '@cornerstonejs/core';
import {
segmentation as cornerstoneToolsSegmentation,
Enums as cornerstoneToolsEnums,
utilities,
} from '@cornerstonejs/tools';
import { segmentation as cornerstoneToolsSegmentation } from '@cornerstonejs/tools';
import { adaptersRT, helpers, adaptersSEG } from '@cornerstonejs/adapters';
import { createReportDialogPrompt } from '@ohif/extension-default';
import { classes, DicomMetadataStore } from '@ohif/core';
import { DicomMetadataStore } from '@ohif/core';
import vtkImageMarchingSquares from '@kitware/vtk.js/Filters/General/ImageMarchingSquares';
import vtkDataArray from '@kitware/vtk.js/Common/Core/DataArray';
import vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData';
import PROMPT_RESPONSES from '../../default/src/utils/_shared/PROMPT_RESPONSES';
const { segmentation: segmentationUtils } = utilities;
const { datasetToBlob } = dcmjs.data;
const getTargetViewport = ({ viewportId, viewportGridService }) => {
@@ -46,14 +37,8 @@ const commandsModule = ({
servicesManager,
extensionManager,
}: Types.Extensions.ExtensionParams): Types.Extensions.CommandsModule => {
const {
segmentationService,
uiDialogService,
displaySetService,
viewportGridService,
toolGroupService,
customizationService,
} = servicesManager.services as AppTypes.Services;
const { segmentationService, displaySetService, viewportGridService, toolGroupService } =
servicesManager.services as AppTypes.Services;
const actions = {
/**
@@ -287,21 +272,24 @@ const commandsModule = ({
* converts dataset to downloadable blob.
*
*/
downloadRTSS: ({ segmentationId }) => {
downloadRTSS: async ({ segmentationId }) => {
const segmentations = segmentationService.getSegmentation(segmentationId);
const vtkUtils = {
vtkImageMarchingSquares,
vtkDataArray,
vtkImageData,
};
const RTSS = generateRTSSFromSegmentations(
// inject colors to the segmentIndex
const firstRepresentation =
segmentationService.getRepresentationsForSegmentation(segmentationId)[0];
Object.entries(segmentations.segments).forEach(([segmentIndex, segment]) => {
segment.color = segmentationService.getSegmentColor(
firstRepresentation.viewportId,
segmentationId,
segmentIndex
);
});
const RTSS = await generateRTSSFromSegmentations(
segmentations,
classes.MetadataProvider,
DicomMetadataStore,
cache,
cornerstoneToolsEnums,
vtkUtils
DicomMetadataStore
);
try {
@@ -314,56 +302,12 @@ const commandsModule = ({
console.warn(e);
}
},
setBrushSize: ({ value, toolNames }) => {
const brushSize = Number(value);
toolGroupService.getToolGroupIds()?.forEach(toolGroupId => {
if (toolNames?.length === 0) {
segmentationUtils.setBrushSizeForToolGroup(toolGroupId, brushSize);
} else {
toolNames?.forEach(toolName => {
segmentationUtils.setBrushSizeForToolGroup(toolGroupId, brushSize, toolName);
});
}
});
},
setThresholdRange: ({
value,
toolNames = [
'ThresholdCircularBrush',
'ThresholdSphereBrush',
'ThresholdCircularBrushDynamic',
'ThresholdSphereBrushDynamic',
],
}) => {
const toolGroupIds = toolGroupService.getToolGroupIds();
if (!toolGroupIds?.length) {
return;
}
for (const toolGroupId of toolGroupIds) {
const toolGroup = toolGroupService.getToolGroup(toolGroupId);
toolNames?.forEach(toolName => {
toolGroup.setToolConfiguration(toolName, {
threshold: {
range: value,
},
});
});
}
},
};
const definitions = {
/**
* Obsolete?
*/
loadSegmentationDisplaySetsForViewport: {
commandFn: actions.loadSegmentationDisplaySetsForViewport,
},
/**
* Obsolete?
*/
loadSegmentationsForViewport: {
commandFn: actions.loadSegmentationsForViewport,
},
@@ -380,12 +324,6 @@ const commandsModule = ({
downloadRTSS: {
commandFn: actions.downloadRTSS,
},
setBrushSize: {
commandFn: actions.setBrushSize,
},
setThresholdRange: {
commandFn: actions.setThresholdRange,
},
};
return {
@@ -13,14 +13,14 @@ function promptHydrateSEG({
preHydrateCallbacks,
hydrateCallback,
}: withAppTypes) {
const { uiViewportDialogService } = servicesManager.services;
const { uiViewportDialogService, customizationService } = servicesManager.services;
const extensionManager = servicesManager._extensionManager;
const appConfig = extensionManager._appConfig;
return new Promise(async function (resolve, reject) {
const promptResult = appConfig?.disableConfirmationPrompts
? RESPONSE.HYDRATE_SEG
: await _askHydrate(uiViewportDialogService, viewportId);
: await _askHydrate(uiViewportDialogService, customizationService, viewportId);
if (promptResult === RESPONSE.HYDRATE_SEG) {
preHydrateCallbacks?.forEach(callback => {
@@ -39,9 +39,13 @@ function promptHydrateSEG({
});
}
function _askHydrate(uiViewportDialogService, viewportId) {
function _askHydrate(
uiViewportDialogService: AppTypes.UIViewportDialogService,
customizationService: AppTypes.CustomizationService,
viewportId
) {
return new Promise(function (resolve, reject) {
const message = 'Do you want to open this Segmentation?';
const message = customizationService.getCustomization('viewportNotification.hydrateSEGMessage');
const actions = [
{
id: 'no-hydrate',
@@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-sr",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "OHIF extension for an SR Cornerstone Viewport",
"author": "OHIF",
"license": "MIT",
@@ -34,10 +34,10 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-measurement-tracking": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-measurement-tracking": "3.10.0-beta.148",
"@ohif/ui": "3.10.0-beta.148",
"dcmjs": "*",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
@@ -46,9 +46,9 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^3.8.2",
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/tools": "^3.8.2",
"@cornerstonejs/adapters": "^3.8.4",
"@cornerstonejs/core": "^3.8.4",
"@cornerstonejs/tools": "^3.8.4",
"classnames": "^2.3.2"
}
}
@@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/extension-cornerstone-dynamic-volume
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-cornerstone-dynamic-volume
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-cornerstone-dynamic-volume
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dynamic-volume",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "OHIF extension for 4D volumes data",
"author": "OHIF",
"license": "MIT",
@@ -29,11 +29,11 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/i18n": "3.10.0-beta.148",
"@ohif/ui": "3.10.0-beta.148",
"dcmjs": "*",
"dicom-parser": "^1.8.21",
"hammerjs": "^2.0.8",
@@ -42,8 +42,8 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/tools": "^3.8.2",
"@cornerstonejs/core": "^3.8.4",
"@cornerstonejs/tools": "^3.8.4",
"classnames": "^2.3.2"
}
}
+38
View File
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
### Features
* Automate tracking prompts for a less disruptive annotation workflow ([#4822](https://github.com/OHIF/Viewers/issues/4822)) ([54fded5](https://github.com/OHIF/Viewers/commit/54fded554e934f2f75e00d456ebad7692d561225))
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-cornerstone
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-cornerstone
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
+10 -10
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "OHIF extension for Cornerstone",
"author": "OHIF",
"license": "MIT",
@@ -38,9 +38,9 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.4",
"@cornerstonejs/codec-openjph": "^2.4.5",
"@cornerstonejs/dicom-image-loader": "^3.8.2",
"@ohif/core": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"@cornerstonejs/dicom-image-loader": "^3.8.4",
"@ohif/core": "3.10.0-beta.148",
"@ohif/ui": "3.10.0-beta.148",
"dcmjs": "*",
"dicom-parser": "^1.8.21",
"hammerjs": "^2.0.8",
@@ -51,12 +51,12 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^3.8.2",
"@cornerstonejs/ai": "^3.8.2",
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/labelmap-interpolation": "^3.8.2",
"@cornerstonejs/polymorphic-segmentation": "^3.8.2",
"@cornerstonejs/tools": "^3.8.2",
"@cornerstonejs/adapters": "^3.8.4",
"@cornerstonejs/ai": "^3.8.4",
"@cornerstonejs/core": "^3.8.4",
"@cornerstonejs/labelmap-interpolation": "^3.8.4",
"@cornerstonejs/polymorphic-segmentation": "^3.8.4",
"@cornerstonejs/tools": "^3.8.4",
"@itk-wasm/morphological-contour-interpolation": "1.1.0",
"@kitware/vtk.js": "32.12.0",
"html2canvas": "^1.4.1",
+83 -1
View File
@@ -10,7 +10,6 @@ import {
ToolGroupManager,
Enums,
utilities as cstUtils,
ReferenceLinesTool,
annotation,
Types as ToolTypes,
} from '@cornerstonejs/tools';
@@ -43,6 +42,8 @@ const toggleSyncFunctions = {
voi: toggleVOISliceSync,
};
const { segmentation: segmentationUtils } = cstUtils;
const getLabelmapTools = ({ toolGroupService }) => {
const labelmapTools = [];
const toolGroupIds = toolGroupService.getToolGroupIds();
@@ -155,6 +156,8 @@ function commandsModule({
}
);
measurement.annotationUID = annotation.annotationUID;
// Update segmentation stats
const updatedSegmentation = updateSegmentBidirectionalStats({
segmentationId: targetId,
@@ -172,6 +175,14 @@ function commandsModule({
});
}
});
// get the active segmentIndex bidirectional annotation and jump to it
const activeBidirectional = bidirectionalData.find(
measurement => measurement.segmentIndex === targetIndex
);
commandsManager.run('jumpToMeasurement', {
uid: activeBidirectional.annotationUID,
});
},
interpolateLabelmap: () => {
const { segmentationId, segmentIndex } = _getActiveSegmentationInfo();
@@ -1630,6 +1641,72 @@ function commandsModule({
segmentAI.initViewport(viewport);
}
},
setBrushSize: ({ value, toolNames }) => {
const brushSize = Number(value);
toolGroupService.getToolGroupIds()?.forEach(toolGroupId => {
if (toolNames?.length === 0) {
segmentationUtils.setBrushSizeForToolGroup(toolGroupId, brushSize);
} else {
toolNames?.forEach(toolName => {
segmentationUtils.setBrushSizeForToolGroup(toolGroupId, brushSize, toolName);
});
}
});
},
setThresholdRange: ({
value,
toolNames = [
'ThresholdCircularBrush',
'ThresholdSphereBrush',
'ThresholdCircularBrushDynamic',
'ThresholdSphereBrushDynamic',
],
}) => {
const toolGroupIds = toolGroupService.getToolGroupIds();
if (!toolGroupIds?.length) {
return;
}
for (const toolGroupId of toolGroupIds) {
const toolGroup = toolGroupService.getToolGroup(toolGroupId);
toolNames?.forEach(toolName => {
toolGroup.setToolConfiguration(toolName, {
threshold: {
range: value,
},
});
});
}
},
increaseBrushSize: () => {
const toolGroupIds = toolGroupService.getToolGroupIds();
if (!toolGroupIds?.length) {
return;
}
for (const toolGroupId of toolGroupIds) {
const brushSize = segmentationUtils.getBrushSizeForToolGroup(toolGroupId);
segmentationUtils.setBrushSizeForToolGroup(toolGroupId, brushSize + 3);
}
},
decreaseBrushSize: () => {
const toolGroupIds = toolGroupService.getToolGroupIds();
if (!toolGroupIds?.length) {
return;
}
for (const toolGroupId of toolGroupIds) {
const brushSize = segmentationUtils.getBrushSizeForToolGroup(toolGroupId);
segmentationUtils.setBrushSizeForToolGroup(toolGroupId, brushSize - 3);
}
},
addNewSegment: () => {
const { segmentationService } = servicesManager.services;
const { activeViewportId } = viewportGridService.getState();
const activeSegmentation = segmentationService.getActiveSegmentation(activeViewportId);
segmentationService.addSegment(activeSegmentation.segmentationId);
},
};
const definitions = {
@@ -1903,6 +1980,11 @@ function commandsModule({
toggleLabelmapAssist: actions.toggleLabelmapAssist,
interpolateScrollForMarkerLabelmap: actions.interpolateScrollForMarkerLabelmap,
clearMarkersForMarkerLabelmap: actions.clearMarkersForMarkerLabelmap,
setBrushSize: actions.setBrushSize,
setThresholdRange: actions.setThresholdRange,
increaseBrushSize: actions.increaseBrushSize,
decreaseBrushSize: actions.decreaseBrushSize,
addNewSegment: actions.addNewSegment,
};
return {
@@ -179,7 +179,10 @@ function Trigger(props) {
>
<div>
{React.cloneElement(children, childProps)}
<ChevronDownIcon key="chevronDown" className="text-primary h-4 w-4 shrink-0 transition-transform duration-200" />
<ChevronDownIcon
key="chevronDown"
className="text-primary h-4 w-4 shrink-0 transition-transform duration-200"
/>
</div>
</AccordionTrigger>
);
@@ -54,7 +54,7 @@ export const groupByNamedSets = (items, grouping) => {
};
export function MeasurementsOrAdditionalFindings(props): React.ReactNode {
const { items, children, grouping = {}, customHeader, group } = props;
const { items, children, grouping = {}, customHeader, group, actions } = props;
return (
<AccordionGroup
@@ -72,6 +72,7 @@ export function MeasurementsOrAdditionalFindings(props): React.ReactNode {
<MeasurementTableNested
customHeader={customHeader}
allItems={items}
actions={actions}
/>
</AccordionGroup.Accordion>
</AccordionGroup>
@@ -53,6 +53,10 @@ export function StudyMeasurementsActions({ items, StudyInstanceUID, measurementF
className="pl-0.5"
onClick={e => {
e.stopPropagation();
if (actions?.onDelete) {
actions.onDelete();
return;
}
commandsManager.runCommand('clearMeasurements', {
measurementFilter,
});
@@ -95,24 +95,53 @@ export const CustomDropdownMenuContent = () => {
<DropdownMenuSub>
<DropdownMenuSubTrigger className="pl-1">
<Icons.Export className="text-foreground" />
<span className="pl-2">{t('Export & Download')}</span>
<span className="pl-2">{t('Download & Export')}</span>
</DropdownMenuSubTrigger>
<DropdownMenuPortal>
<DropdownMenuSubContent>
<DropdownMenuItem onClick={() => actions.downloadCSVSegmentationReport(segmentationId)}>
{t('Download CSV Report')}
<DropdownMenuLabel className="flex items-center pl-0">
<Icons.Download className="h-5 w-5" />
<span className="pl-1">{t('Download')}</span>
</DropdownMenuLabel>
<DropdownMenuItem
onClick={e => {
e.preventDefault();
actions.downloadCSVSegmentationReport(segmentationId);
}}
>
{t('CSV Report')}
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => actions.storeSegmentation(segmentationId)}
onClick={e => {
e.preventDefault();
actions.onSegmentationDownload(segmentationId);
}}
disabled={!allowExport}
>
{t('Export DICOM SEG')}
{t('DICOM SEG')}
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => actions.onSegmentationDownload(segmentationId)}
onClick={e => {
e.preventDefault();
actions.onSegmentationDownloadRTSS(segmentationId);
}}
disabled={!allowExport}
>
{t('Download DICOM SEG')}
{t('DICOM RTSS')}
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuLabel className="flex items-center pl-0">
<Icons.Export className="h-5 w-5" />
<span className="pl-1 pt-1">{t('Export')}</span>
</DropdownMenuLabel>
<DropdownMenuItem
onClick={e => {
e.preventDefault();
actions.storeSegmentation(segmentationId);
}}
disabled={!allowExport}
>
{t('DICOM SEG')}
</DropdownMenuItem>
</DropdownMenuSubContent>
</DropdownMenuPortal>
+13 -38
View File
@@ -39,7 +39,10 @@ import { useLutPresentationStore } from './stores/useLutPresentationStore';
import { usePositionPresentationStore } from './stores/usePositionPresentationStore';
import { useSegmentationPresentationStore } from './stores/useSegmentationPresentationStore';
import { imageRetrieveMetadataProvider } from '@cornerstonejs/core/utilities';
import { updateSegmentationStats } from './utils/updateSegmentationStats';
import {
setupSegmentationDataModifiedHandler,
setupSegmentationModifiedHandler,
} from './utils/segmentationHandlers';
const { registerColormap } = csUtilities.colormap;
@@ -189,44 +192,16 @@ export default async function init({
});
});
segmentationService.subscribeDebounced(
segmentationService.EVENTS.SEGMENTATION_DATA_MODIFIED,
async ({ segmentationId }) => {
const segmentation = segmentationService.getSegmentation(segmentationId);
const readableText = customizationService.getCustomization('panelSegmentation.readableText');
const updatedSegmentation = await updateSegmentationStats({
segmentation,
segmentationId,
readableText,
});
// Setup segmentation event handlers
setupSegmentationDataModifiedHandler({
segmentationService,
customizationService,
commandsManager,
});
if (updatedSegmentation) {
segmentationService.addOrUpdateSegmentation({
segmentationId,
segments: updatedSegmentation.segments,
});
}
// Check for segments with bidirectional measurements and update them
if (segmentation) {
const segmentIndices = Object.keys(segmentation.segments)
.map(index => parseInt(index))
.filter(index => index > 0);
for (const segmentIndex of segmentIndices) {
const segment = segmentation.segments[segmentIndex];
if (segment?.cachedStats?.namedStats?.bidirectional) {
// Run the command to update the bidirectional measurement
commandsManager.runCommand('runSegmentBidirectional', {
segmentationId,
segmentIndex,
});
}
}
}
},
1000
);
setupSegmentationModifiedHandler({
segmentationService,
});
// When a custom image load is performed, update the relevant viewports
hangingProtocolService.subscribe(
@@ -7,7 +7,11 @@ import { toolNames } from './initCornerstoneTools';
import { onCompletedCalibrationLine } from './tools/CalibrationLineTool';
import measurementServiceMappingsFactory from './utils/measurementServiceMappings/measurementServiceMappingsFactory';
import getSOPInstanceAttributes from './utils/measurementServiceMappings/utils/getSOPInstanceAttributes';
import { triggerAnnotationRenderForViewportIds } from '@cornerstonejs/tools/utilities';
import {
setAnnotationLabel,
triggerAnnotationRenderForViewportIds,
} from '@cornerstonejs/tools/utilities';
import getActiveViewportEnabledElement from './utils/getActiveViewportEnabledElement';
const { CORNERSTONE_3D_TOOLS_SOURCE_NAME, CORNERSTONE_3D_TOOLS_SOURCE_VERSION } = CSExtensionEnums;
const { removeAnnotation } = annotation.state;
@@ -190,6 +194,7 @@ const connectToolsToMeasurementService = (servicesManager: AppTypes.ServicesMana
displaySetService,
cornerstoneViewportService,
customizationService,
viewportGridService,
} = servicesManager.services;
const csTools3DVer1MeasurementSource = initMeasurementService(
measurementService,
@@ -197,7 +202,11 @@ const connectToolsToMeasurementService = (servicesManager: AppTypes.ServicesMana
cornerstoneViewportService,
customizationService
);
connectMeasurementServiceToTools(measurementService, cornerstoneViewportService);
connectMeasurementServiceToTools(
measurementService,
cornerstoneViewportService,
viewportGridService
);
const { annotationToMeasurement, remove } = csTools3DVer1MeasurementSource;
//
@@ -323,7 +332,11 @@ const connectToolsToMeasurementService = (servicesManager: AppTypes.ServicesMana
return csTools3DVer1MeasurementSource;
};
const connectMeasurementServiceToTools = (measurementService, cornerstoneViewportService) => {
const connectMeasurementServiceToTools = (
measurementService,
cornerstoneViewportService,
viewportGridService
) => {
const { MEASUREMENT_REMOVED, MEASUREMENTS_CLEARED, MEASUREMENT_UPDATED, RAW_MEASUREMENT_ADDED } =
measurementService.EVENTS;
@@ -366,7 +379,8 @@ const connectMeasurementServiceToTools = (measurementService, cornerstoneViewpor
}
if (data.label !== label) {
data.label = label;
const element = getActiveViewportEnabledElement(viewportGridService)?.viewport.element;
setAnnotationLabel(sourceAnnotation, element, label);
}
if (metadata.toolName === 'ArrowAnnotate') {
@@ -602,10 +602,16 @@ class SegmentationService extends PubSubService {
const segments: { [segmentIndex: string]: cstTypes.Segment } = {};
let segmentsCachedStats = {};
// Create colorLUT array for RT structures
const colorLUT = [[0, 0, 0, 0]]; // First entry is transparent for index 0
// Process each segment similarly to the SEG function
for (const rtStructData of allRTStructData) {
const { data, id, color, segmentIndex, geometryId } = rtStructData;
// Add the color to the colorLUT array
colorLUT.push(color);
try {
const geometry = await geometryLoader.createAndCacheGeometry(geometryId, {
geometryData: {
@@ -647,6 +653,11 @@ class SegmentationService extends PubSubService {
}
}
// Create and register the colorLUT
const colorLUTIndex = getNextColorLUTIndex();
addColorLUT(colorLUT, colorLUTIndex);
this._segmentationIdToColorLUTIndexMap.set(segmentationId, colorLUTIndex);
// Assign processed segments to segmentation config
segmentation.config.segments = segments;
@@ -53,7 +53,6 @@ const segmentationRepresentationModifiedCallback = async (
const targetFrameOfReferenceUID = viewport.getFrameOfReferenceUID();
if (!targetFrameOfReferenceUID) {
console.debug('No frame of reference UID found for the target viewport');
return;
}
@@ -846,13 +846,17 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
if (addOverlayFn) {
addOverlayFn();
}
viewport.render();
volumesProperties.forEach(({ properties, volumeId }) => {
viewport.setProperties(properties, volumeId);
setTimeout(() => {
// seems like a hack but we need the actor to be ready first before
// we set the properties
viewport.setProperties(properties, volumeId);
viewport.render();
}, 0);
});
viewport.render();
this.setPresentations(viewport.id, presentations, viewportInfo);
if (!presentations.positionPresentation) {
@@ -865,8 +869,6 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
}
}
viewport.render();
this._broadcastEvent(this.EVENTS.VIEWPORT_VOLUMES_CHANGED, {
viewportInfo,
});
@@ -2,7 +2,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 'Grayscale',
name: 'Grayscale',
NanColor: [1, 0, 0],
RGBPoints: [0, 0, 0, 0, 1, 1, 1, 1],
description: 'Grayscale',
@@ -10,7 +9,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 'X Ray',
name: 'X Ray',
NanColor: [1, 0, 0],
RGBPoints: [0, 1, 1, 1, 1, 0, 0, 0],
description: 'X Ray',
@@ -18,7 +16,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 'hsv',
name: 'hsv',
RGBPoints: [
-1, 1, 0, 0, -0.666666, 1, 0, 1, -0.333333, 0, 0, 1, 0, 0, 1, 1, 0.33333, 0, 1, 0, 0.66666, 1,
1, 0, 1, 1, 0, 0,
@@ -28,7 +25,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 'hot_iron',
name: 'hot_iron',
RGBPoints: [
0.0, 0.0039215686, 0.0039215686, 0.0156862745, 0.00392156862745098, 0.0039215686,
0.0039215686, 0.0156862745, 0.00784313725490196, 0.0039215686, 0.0039215686, 0.031372549,
@@ -224,7 +220,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 'red_hot',
name: 'red_hot',
RGBPoints: [
0.0, 0.0, 0.0, 0.0, 0.00392156862745098, 0.0, 0.0, 0.0, 0.00784313725490196, 0.0, 0.0, 0.0,
0.011764705882352941, 0.0, 0.0, 0.0, 0.01568627450980392, 0.0039215686, 0.0039215686,
@@ -359,7 +354,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 's_pet',
name: 's_pet',
RGBPoints: [
0.0, 0.0156862745, 0.0039215686, 0.0156862745, 0.00392156862745098, 0.0156862745,
0.0039215686, 0.0156862745, 0.00784313725490196, 0.0274509804, 0.0039215686, 0.031372549,
@@ -553,7 +547,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 'perfusion',
name: 'perfusion',
RGBPoints: [
0.0, 0.0, 0.0, 0.0, 0.00392156862745098, 0.0078431373, 0.0235294118, 0.0235294118,
0.00784313725490196, 0.0078431373, 0.031372549, 0.0470588235, 0.011764705882352941,
@@ -733,7 +726,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 'rainbow_2',
name: 'rainbow_2',
RGBPoints: [
0.0, 0.0, 0.0, 0.0, 0.00392156862745098, 0.0156862745, 0.0, 0.0117647059, 0.00784313725490196,
0.0352941176, 0.0, 0.0274509804, 0.011764705882352941, 0.0509803922, 0.0, 0.0392156863,
@@ -872,7 +864,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 'suv',
name: 'suv',
RGBPoints: [
0.0, 1.0, 1.0, 1.0, 0.00392156862745098, 1.0, 1.0, 1.0, 0.00784313725490196, 1.0, 1.0, 1.0,
0.011764705882352941, 1.0, 1.0, 1.0, 0.01568627450980392, 1.0, 1.0, 1.0, 0.0196078431372549,
@@ -1019,7 +1010,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 'ge_256',
name: 'ge_256',
RGBPoints: [
0.0, 0.0039215686, 0.0078431373, 0.0078431373, 0.00392156862745098, 0.0039215686,
0.0078431373, 0.0078431373, 0.00784313725490196, 0.0039215686, 0.0078431373, 0.0117647059,
@@ -1211,7 +1201,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 'ge',
name: 'ge',
RGBPoints: [
0.0, 0.0078431373, 0.0078431373, 0.0078431373, 0.00392156862745098, 0.0078431373,
0.0078431373, 0.0078431373, 0.00784313725490196, 0.0078431373, 0.0078431373, 0.0078431373,
@@ -1404,7 +1393,6 @@ const colormaps = [
{
ColorSpace: 'RGB',
Name: 'siemens',
name: 'siemens',
RGBPoints: [
0.0, 0.0078431373, 0.0039215686, 0.1254901961, 0.00392156862745098, 0.0078431373,
0.0039215686, 0.1254901961, 0.00784313725490196, 0.0078431373, 0.0039215686, 0.1882352941,
@@ -1,9 +1,15 @@
import { handleSegmentChange } from './segmentUtils';
import { isReferenceViewable } from './isReferenceViewable';
import {
setupSegmentationDataModifiedHandler,
setupSegmentationModifiedHandler,
} from './segmentationHandlers';
const utils = {
handleSegmentChange,
isReferenceViewable,
setupSegmentationDataModifiedHandler,
setupSegmentationModifiedHandler,
};
export default utils;
@@ -84,7 +84,7 @@ const Bidirectional = {
function getMappedAnnotations(annotation, displaySetService) {
const { metadata, data } = annotation;
const { cachedStats } = data;
const { referencedImageId, referencedSeriesInstanceUID } = metadata;
const { referencedImageId } = metadata;
const targets = Object.keys(cachedStats);
if (!targets.length) {
@@ -93,6 +93,7 @@ function getMappedAnnotations(annotation, displaySetService) {
}
const annotations = [];
const addedModalities = new Set();
Object.keys(cachedStats).forEach(targetId => {
const targetStats = cachedStats[targetId];
@@ -108,6 +109,12 @@ function getMappedAnnotations(annotation, displaySetService) {
const { mean, stdDev, max, area, Modality, areaUnit, modalityUnit, perimeter, radiusUnit } =
targetStats;
if (Modality && addedModalities.has(Modality)) {
return;
}
addedModalities.add(Modality);
annotations.push({
SeriesInstanceUID,
SOPInstanceUID,
@@ -93,6 +93,8 @@ function getMappedAnnotations(annotation, displaySetService) {
}
const annotations = [];
const addedModalities = new Set();
Object.keys(cachedStats).forEach(targetId => {
const targetStats = cachedStats[targetId];
@@ -107,6 +109,16 @@ function getMappedAnnotations(annotation, displaySetService) {
const { SeriesNumber } = displaySet;
const { mean, stdDev, max, area, Modality, areaUnit, modalityUnit } = targetStats;
// Skip if we've already added this modality
if (Modality && addedModalities.has(Modality)) {
return;
}
// Add modality to the set if it exists
if (Modality) {
addedModalities.add(Modality);
}
annotations.push({
SeriesInstanceUID,
SOPInstanceUID,
@@ -92,6 +92,8 @@ function getMappedAnnotations(annotation, displaySetService) {
}
const annotations = [];
const addedModalities = new Set();
Object.keys(cachedStats).forEach(targetId => {
const targetStats = cachedStats[targetId];
@@ -106,6 +108,16 @@ function getMappedAnnotations(annotation, displaySetService) {
const { SeriesNumber } = displaySet;
const { mean, stdDev, max, area, Modality, modalityUnit, areaUnit } = targetStats;
// Skip if we've already added this modality
if (Modality && addedModalities.has(Modality)) {
return;
}
// Add modality to the set if it exists
if (Modality) {
addedModalities.add(Modality);
}
annotations.push({
SeriesInstanceUID,
SOPInstanceUID,
@@ -0,0 +1,93 @@
import * as cornerstoneTools from '@cornerstonejs/tools';
import { updateSegmentationStats } from './updateSegmentationStats';
/**
* Sets up the handler for segmentation data modification events
*/
export function setupSegmentationDataModifiedHandler({
segmentationService,
customizationService,
commandsManager,
}) {
segmentationService.subscribeDebounced(
segmentationService.EVENTS.SEGMENTATION_DATA_MODIFIED,
async ({ segmentationId }) => {
const segmentation = segmentationService.getSegmentation(segmentationId);
const readableText = customizationService.getCustomization('panelSegmentation.readableText');
// Check for segments with bidirectional measurements and update them
const segmentIndices = Object.keys(segmentation.segments)
.map(index => parseInt(index))
.filter(index => index > 0);
for (const segmentIndex of segmentIndices) {
const segment = segmentation.segments[segmentIndex];
if (segment?.cachedStats?.namedStats?.bidirectional) {
// Run the command to update the bidirectional measurement
commandsManager.runCommand('runSegmentBidirectional', {
segmentationId,
segmentIndex,
});
}
}
const updatedSegmentation = await updateSegmentationStats({
segmentation,
segmentationId,
readableText,
});
if (updatedSegmentation) {
segmentationService.addOrUpdateSegmentation({
segmentationId,
segments: updatedSegmentation.segments,
});
}
},
1000
);
}
/**
* Sets up the handler for segmentation modification events
*/
export function setupSegmentationModifiedHandler({ segmentationService }) {
segmentationService.subscribe(
segmentationService.EVENTS.SEGMENTATION_MODIFIED,
async ({ segmentationId }) => {
const segmentation = segmentationService.getSegmentation(segmentationId);
const annotationState = cornerstoneTools.annotation.state.getAllAnnotations();
const bidirectionalAnnotations = annotationState.filter(
annotation =>
annotation.metadata.toolName === cornerstoneTools.SegmentBidirectionalTool.toolName
);
let toRemoveUIDs = [];
if (!segmentation) {
toRemoveUIDs = bidirectionalAnnotations.map(
annotation => annotation.metadata.segmentationId === segmentationId
);
return;
} else {
const segmentIndices = Object.keys(segmentation.segments)
.map(index => parseInt(index))
.filter(index => index > 0);
// check if there is a bidirectional data that exists but the segment
// does not exists anymore we need to remove the bidirectional data
const bidirectionalAnnotationsToRemove = bidirectionalAnnotations.filter(
annotation =>
annotation.metadata.segmentationId === segmentationId &&
!segmentIndices.includes(annotation.metadata.segmentIndex)
);
toRemoveUIDs = bidirectionalAnnotationsToRemove.map(annotation => annotation.annotationUID);
}
toRemoveUIDs.forEach(uid => {
cornerstoneTools.annotation.state.removeAnnotation(uid);
});
}
);
}
+38
View File
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
### Features
* Automate tracking prompts for a less disruptive annotation workflow ([#4822](https://github.com/OHIF/Viewers/issues/4822)) ([54fded5](https://github.com/OHIF/Viewers/commit/54fded554e934f2f75e00d456ebad7692d561225))
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-default
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-default
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-default",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "Common/default features and functionality for basic image viewing",
"author": "OHIF Core Team",
"license": "MIT",
@@ -32,8 +32,8 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/i18n": "3.10.0-beta.148",
"dcmjs": "*",
"dicomweb-client": "^0.10.4",
"prop-types": "^15.6.2",
@@ -12,33 +12,49 @@ import { CallbackCustomization } from 'platform/core/src/types';
const { sortStudyInstances, formatDate, createStudyBrowserTabs } = utils;
const thumbnailNoImageModalities = [
'SR',
'SEG',
'SM',
'RTSTRUCT',
'RTPLAN',
'RTDOSE',
'DOC',
'OT',
'PMAP',
];
/**
*
* @param {*} param0
* Study Browser component that displays and manages studies and their display sets
*/
function PanelStudyBrowser({
getImageSrc,
getStudiesForPatientByMRN,
requestDisplaySetCreationForStudy,
dataSource,
customMapDisplaySets,
onClickUntrack,
onDoubleClickThumbnailHandlerCallBack,
}) {
const { servicesManager, commandsManager } = useSystem();
const { servicesManager, commandsManager, extensionManager } = useSystem();
const { displaySetService, customizationService } = servicesManager.services;
const navigate = useNavigate();
const studyMode = customizationService.getCustomization('studyBrowser.studyMode') || 'all';
const internalImageViewer = useImageViewer();
const StudyInstanceUIDs = internalImageViewer.StudyInstanceUIDs;
// Normally you nest the components so the tree isn't so deep, and the data
// doesn't have to have such an intense shape. This works well enough for now.
// Tabs --> Studies --> DisplaySets --> Thumbnails
const { StudyInstanceUIDs } = useImageViewer();
const [{ activeViewportId, viewports, isHangingProtocolLayout }] = useViewportGrid();
const [activeTabName, setActiveTabName] = useState('all');
const [activeTabName, setActiveTabName] = useState(studyMode);
const [expandedStudyInstanceUIDs, setExpandedStudyInstanceUIDs] = useState([
...StudyInstanceUIDs,
]);
const [hasLoadedViewports, setHasLoadedViewports] = useState(false);
const [studyDisplayList, setStudyDisplayList] = useState([]);
const [displaySets, setDisplaySets] = useState([]);
const [displaySetsLoadingState, setDisplaySetsLoadingState] = useState({});
const [thumbnailImageSrcMap, setThumbnailImageSrcMap] = useState({});
const [jumpToDisplaySet, setJumpToDisplaySet] = useState(null);
const [viewPresets, setViewPresets] = useState(
customizationService.getCustomization('studyBrowser.viewPresets')
@@ -65,6 +81,8 @@ function PanelStudyBrowser({
setViewPresets(newViewPresets);
};
const mapDisplaySetsWithState = customMapDisplaySets || _mapDisplaySets;
const onDoubleClickThumbnailHandler = useCallback(
async displaySetInstanceUID => {
const customHandler = customizationService.getCustomization(
@@ -76,6 +94,7 @@ function PanelStudyBrowser({
commandsManager,
servicesManager,
isHangingProtocolLayout,
appConfig: extensionManager._appConfig,
};
const handlers = customHandler?.callbacks.map(callback => callback(setupArgs));
@@ -83,6 +102,7 @@ function PanelStudyBrowser({
for (const handler of handlers) {
await handler(displaySetInstanceUID);
}
onDoubleClickThumbnailHandlerCallBack?.(displaySetInstanceUID);
},
[
activeViewportId,
@@ -121,7 +141,7 @@ function PanelStudyBrowser({
const actuallyMappedStudies = mappedStudies.map(qidoStudy => {
return {
studyInstanceUid: qidoStudy.StudyInstanceUID,
date: formatDate(qidoStudy.StudyDate),
date: formatDate(qidoStudy.StudyDate) || '',
description: qidoStudy.StudyDescription,
modalities: qidoStudy.ModalitiesInStudy,
numInstances: Number(qidoStudy.NumInstances),
@@ -142,7 +162,7 @@ function PanelStudyBrowser({
StudyInstanceUIDs.forEach(sid => fetchStudiesForPatient(sid));
}, [StudyInstanceUIDs, dataSource, getStudiesForPatientByMRN, navigate]);
// // ~~ Initial Thumbnails
// ~~ Initial Thumbnails
useEffect(() => {
if (!hasLoadedViewports) {
if (activeViewportId) {
@@ -150,19 +170,35 @@ function PanelStudyBrowser({
// so wait a bit of time to allow the viewports preferential loading
// which improves user experience of responsiveness significantly on slower
// systems.
window.setTimeout(() => setHasLoadedViewports(true), 250);
const delayMs = 250 + displaySetService.getActiveDisplaySets().length * 10;
window.setTimeout(() => setHasLoadedViewports(true), delayMs);
}
return;
}
const currentDisplaySets = displaySetService.activeDisplaySets;
let currentDisplaySets = displaySetService.activeDisplaySets;
// filter non based on the list of modalities that are supported by cornerstone
currentDisplaySets = currentDisplaySets.filter(
ds => !thumbnailNoImageModalities.includes(ds.Modality)
);
if (!currentDisplaySets.length) {
return;
}
currentDisplaySets.forEach(async dSet => {
const newImageSrcEntry = {};
const displaySet = displaySetService.getDisplaySetByUID(dSet.displaySetInstanceUID);
const imageIds = dataSource.getImageIdsForDisplaySet(displaySet);
const imageId = imageIds[Math.floor(imageIds.length / 2)];
const imageId = getImageIdForThumbnail(displaySet, imageIds);
// TODO: Is it okay that imageIds are not returned here for SR displaySets?
if (!imageId || displaySet?.unsupported) {
return;
}
// When the image arrives, render it and store the result in the thumbnailImgSrcMap
let { thumbnailSrc } = displaySet;
if (!thumbnailSrc && displaySet.getThumbnailSrc) {
thumbnailSrc = await displaySet.getThumbnailSrc();
@@ -172,39 +208,40 @@ function PanelStudyBrowser({
displaySet.thumbnailSrc = thumbnailSrc;
}
newImageSrcEntry[dSet.displaySetInstanceUID] = thumbnailSrc;
// TODO: Is it okay that imageIds are not returned here for SR displaySets?
if (!imageId || displaySet?.unsupported) {
return;
}
// When the image arrives, render it and store the result in the thumbnailImgSrcMap
try {
newImageSrcEntry[dSet.displaySetInstanceUID] = await getImageSrc(imageId);
} catch (e) {
// This can happen for thumbnails and generate huge log sets if logged.
return;
}
setThumbnailImageSrcMap(prevState => {
return { ...prevState, ...newImageSrcEntry };
});
});
}, [
StudyInstanceUIDs,
dataSource,
displaySetService,
getImageSrc,
hasLoadedViewports,
activeViewportId,
]);
}, [displaySetService, dataSource, getImageSrc, activeViewportId, hasLoadedViewports]);
// ~~ displaySets
useEffect(() => {
// TODO: Are we sure `activeDisplaySets` will always be accurate?
const currentDisplaySets = displaySetService.activeDisplaySets;
const mappedDisplaySets = _mapDisplaySets(currentDisplaySets, thumbnailImageSrcMap);
sortStudyInstances(mappedDisplaySets);
if (!currentDisplaySets.length) {
return;
}
const mappedDisplaySets = mapDisplaySetsWithState(
currentDisplaySets,
displaySetsLoadingState,
thumbnailImageSrcMap,
viewports
);
if (!customMapDisplaySets) {
sortStudyInstances(mappedDisplaySets);
}
setDisplaySets(mappedDisplaySets);
}, [StudyInstanceUIDs, thumbnailImageSrcMap, displaySetService]);
}, [
displaySetService.activeDisplaySets,
displaySetsLoadingState,
viewports,
thumbnailImageSrcMap,
customMapDisplaySets,
]);
// ~~ subscriptions --> displaySets
useEffect(() => {
@@ -212,30 +249,41 @@ function PanelStudyBrowser({
const SubscriptionDisplaySetsAdded = displaySetService.subscribe(
displaySetService.EVENTS.DISPLAY_SETS_ADDED,
data => {
// for some reason this breaks thumbnail loading
// if (!hasLoadedViewports) {
// return;
// }
const { displaySetsAdded } = data;
if (!hasLoadedViewports) {
return;
}
const { displaySetsAdded, options } = data;
displaySetsAdded.forEach(async dSet => {
const displaySetInstanceUID = dSet.displaySetInstanceUID;
const newImageSrcEntry = {};
const displaySet = displaySetService.getDisplaySetByUID(dSet.displaySetInstanceUID);
const displaySet = displaySetService.getDisplaySetByUID(displaySetInstanceUID);
if (displaySet?.unsupported) {
return;
}
if (options?.madeInClient) {
setJumpToDisplaySet(displaySetInstanceUID);
}
const imageIds = dataSource.getImageIdsForDisplaySet(displaySet);
const imageId = imageIds[Math.floor(imageIds.length / 2)];
const imageId = getImageIdForThumbnail(displaySet, imageIds);
// TODO: Is it okay that imageIds are not returned here for SR displaysets?
if (!imageId) {
return;
}
// When the image arrives, render it and store the result in the thumbnailImgSrcMap
newImageSrcEntry[dSet.displaySetInstanceUID] = await getImageSrc(
imageId,
dSet.initialViewport
);
let { thumbnailSrc } = displaySet;
if (!thumbnailSrc && displaySet.getThumbnailSrc) {
thumbnailSrc = await displaySet.getThumbnailSrc();
}
if (!thumbnailSrc) {
thumbnailSrc = await getImageSrc(imageId);
displaySet.thumbnailSrc = thumbnailSrc;
}
newImageSrcEntry[displaySetInstanceUID] = thumbnailSrc;
setThumbnailImageSrcMap(prevState => {
return { ...prevState, ...newImageSrcEntry };
@@ -247,7 +295,7 @@ function PanelStudyBrowser({
return () => {
SubscriptionDisplaySetsAdded.unsubscribe();
};
}, [getImageSrc, dataSource, displaySetService]);
}, [displaySetService, dataSource, getImageSrc, hasLoadedViewports]);
useEffect(() => {
// TODO: Will this always hold _all_ the displaySets we care about?
@@ -255,7 +303,17 @@ function PanelStudyBrowser({
const SubscriptionDisplaySetsChanged = displaySetService.subscribe(
displaySetService.EVENTS.DISPLAY_SETS_CHANGED,
changedDisplaySets => {
const mappedDisplaySets = _mapDisplaySets(changedDisplaySets, thumbnailImageSrcMap);
const mappedDisplaySets = mapDisplaySetsWithState(
changedDisplaySets,
displaySetsLoadingState,
thumbnailImageSrcMap,
viewports
);
if (!customMapDisplaySets) {
sortStudyInstances(mappedDisplaySets);
}
setDisplaySets(mappedDisplaySets);
}
);
@@ -263,11 +321,17 @@ function PanelStudyBrowser({
const SubscriptionDisplaySetMetaDataInvalidated = displaySetService.subscribe(
displaySetService.EVENTS.DISPLAY_SET_SERIES_METADATA_INVALIDATED,
() => {
const mappedDisplaySets = _mapDisplaySets(
const mappedDisplaySets = mapDisplaySetsWithState(
displaySetService.getActiveDisplaySets(),
thumbnailImageSrcMap
displaySetsLoadingState,
thumbnailImageSrcMap,
viewports
);
if (!customMapDisplaySets) {
sortStudyInstances(mappedDisplaySets);
}
setDisplaySets(mappedDisplaySets);
}
);
@@ -276,7 +340,13 @@ function PanelStudyBrowser({
SubscriptionDisplaySetsChanged.unsubscribe();
SubscriptionDisplaySetMetaDataInvalidated.unsubscribe();
};
}, [StudyInstanceUIDs, thumbnailImageSrcMap, displaySetService]);
}, [
displaySetsLoadingState,
thumbnailImageSrcMap,
viewports,
displaySetService,
customMapDisplaySets,
]);
const tabs = createStudyBrowserTabs(StudyInstanceUIDs, studyDisplayList, displaySets);
@@ -284,8 +354,7 @@ function PanelStudyBrowser({
function _handleStudyClick(StudyInstanceUID) {
const shouldCollapseStudy = expandedStudyInstanceUIDs.includes(StudyInstanceUID);
const updatedExpandedStudyInstanceUIDs = shouldCollapseStudy
? // eslint-disable-next-line prettier/prettier
[...expandedStudyInstanceUIDs.filter(stdyUid => stdyUid !== StudyInstanceUID)]
? [...expandedStudyInstanceUIDs.filter(stdyUid => stdyUid !== StudyInstanceUID)]
: [...expandedStudyInstanceUIDs, StudyInstanceUID];
setExpandedStudyInstanceUIDs(updatedExpandedStudyInstanceUIDs);
@@ -296,6 +365,43 @@ function PanelStudyBrowser({
}
}
useEffect(() => {
if (jumpToDisplaySet) {
// Get element by displaySetInstanceUID
const displaySetInstanceUID = jumpToDisplaySet;
const element = document.getElementById(`thumbnail-${displaySetInstanceUID}`);
if (element && typeof element.scrollIntoView === 'function') {
// TODO: Any way to support IE here?
element.scrollIntoView({ behavior: 'smooth' });
setJumpToDisplaySet(null);
}
}
}, [jumpToDisplaySet, expandedStudyInstanceUIDs, activeTabName]);
useEffect(() => {
if (!jumpToDisplaySet) {
return;
}
const displaySetInstanceUID = jumpToDisplaySet;
// Set the activeTabName and expand the study
const thumbnailLocation = _findTabAndStudyOfDisplaySet(displaySetInstanceUID, tabs);
if (!thumbnailLocation) {
console.warn('jumpToThumbnail: displaySet thumbnail not found.');
return;
}
const { tabName, StudyInstanceUID } = thumbnailLocation;
setActiveTabName(tabName);
const studyExpanded = expandedStudyInstanceUIDs.includes(StudyInstanceUID);
if (!studyExpanded) {
const updatedExpandedStudyInstanceUIDs = [...expandedStudyInstanceUIDs, StudyInstanceUID];
setExpandedStudyInstanceUIDs(updatedExpandedStudyInstanceUIDs);
}
}, [expandedStudyInstanceUIDs, jumpToDisplaySet, tabs]);
const activeDisplaySetInstanceUIDs = viewports.get(activeViewportId)?.displaySetInstanceUIDs;
return (
@@ -323,10 +429,11 @@ function PanelStudyBrowser({
onClickTab={clickedTabName => {
setActiveTabName(clickedTabName);
}}
onClickUntrack={onClickUntrack}
onClickThumbnail={() => {}}
onDoubleClickThumbnail={onDoubleClickThumbnailHandler}
activeDisplaySetInstanceUIDs={activeDisplaySetInstanceUIDs}
showSettings={actionIcons.find(icon => icon.id === 'settings').value}
showSettings={actionIcons.find(icon => icon.id === 'settings')?.value}
viewPresets={viewPresets}
ThumbnailMenuItems={MoreDropdownMenu({
commandsManager,
@@ -367,35 +474,36 @@ function _mapDataSourceStudies(studies) {
});
}
function _mapDisplaySets(displaySets, thumbnailImageSrcMap) {
function _mapDisplaySets(displaySets, displaySetLoadingState, thumbnailImageSrcMap, viewports) {
const thumbnailDisplaySets = [];
const thumbnailNoImageDisplaySets = [];
displaySets
.filter(ds => !ds.excludeFromThumbnailBrowser)
.forEach(ds => {
const { thumbnailSrc, displaySetInstanceUID } = ds; // thumbnailImageSrcMap[ds.displaySetInstanceUID];
const { thumbnailSrc, displaySetInstanceUID } = ds;
const componentType = _getComponentType(ds);
const array =
componentType === 'thumbnail' ? thumbnailDisplaySets : thumbnailNoImageDisplaySets;
const loadingProgress = displaySetLoadingState?.[displaySetInstanceUID];
array.push({
displaySetInstanceUID: ds.displaySetInstanceUID,
displaySetInstanceUID,
description: ds.SeriesDescription || '',
seriesNumber: ds.SeriesNumber,
modality: ds.Modality,
seriesDate: ds.SeriesDate,
seriesTime: ds.SeriesTime,
numInstances: parseInt(ds.numImageFrames),
seriesDate: formatDate(ds.SeriesDate),
numInstances: ds.numImageFrames,
loadingProgress,
countIcon: ds.countIcon,
StudyInstanceUID: ds.StudyInstanceUID,
messages: ds.messages,
StudyInstanceUID: ds.StudyInstanceUID,
componentType,
imageSrc: thumbnailSrc || thumbnailImageSrcMap[displaySetInstanceUID],
dragData: {
type: 'displayset',
displaySetInstanceUID: ds.displaySetInstanceUID,
displaySetInstanceUID,
// .. Any other data to pass
},
isHydratedForDerivedDisplaySet: ds.isHydrated,
@@ -405,13 +513,44 @@ function _mapDisplaySets(displaySets, thumbnailImageSrcMap) {
return [...thumbnailDisplaySets, ...thumbnailNoImageDisplaySets];
}
const thumbnailNoImageModalities = ['SR', 'SEG', 'SM', 'RTSTRUCT', 'RTPLAN', 'RTDOSE'];
function _getComponentType(ds) {
if (thumbnailNoImageModalities.includes(ds.Modality) || ds?.unsupported) {
// TODO probably others.
return 'thumbnailNoImage';
}
return 'thumbnail';
}
function getImageIdForThumbnail(displaySet, imageIds) {
let imageId;
if (displaySet.isDynamicVolume) {
const timePoints = displaySet.dynamicVolumeInfo.timePoints;
const middleIndex = Math.floor(timePoints.length / 2);
const middleTimePointImageIds = timePoints[middleIndex];
imageId = middleTimePointImageIds[Math.floor(middleTimePointImageIds.length / 2)];
} else {
imageId = imageIds[Math.floor(imageIds.length / 2)];
}
return imageId;
}
function _findTabAndStudyOfDisplaySet(displaySetInstanceUID, tabs) {
for (let t = 0; t < tabs.length; t++) {
const { studies } = tabs[t];
for (let s = 0; s < studies.length; s++) {
const { displaySets } = studies[s];
for (let d = 0; d < displaySets.length; d++) {
const displaySet = displaySets[d];
if (displaySet.displaySetInstanceUID === displaySetInstanceUID) {
return {
tabName: tabs[t].name,
StudyInstanceUID: studies[s].studyInstanceUid,
};
}
}
}
}
}
@@ -1,12 +1,19 @@
async function getStudiesForPatientByMRN(dataSource, qidoForStudyUID) {
if (qidoForStudyUID && qidoForStudyUID.length && qidoForStudyUID[0].mrn) {
return dataSource.query.studies.search({
patientId: qidoForStudyUID[0].mrn,
disableWildcard: true,
});
if (!qidoForStudyUID?.length) {
return [];
}
console.log('No mrn found for', qidoForStudyUID);
return qidoForStudyUID;
const mrn = qidoForStudyUID[0].mrn;
// if not defined or empty, return the original qidoForStudyUID
if (!mrn) {
return qidoForStudyUID;
}
return dataSource.query.studies.search({
patientId: mrn,
disableWildcard: true,
});
}
export default getStudiesForPatientByMRN;
+14 -25
View File
@@ -55,16 +55,8 @@ function ViewerLayout({
setRightPanelClosed
);
const leftPanelRef = useRef<HTMLDivElement>(null);
const rightPanelRef = useRef<HTMLDivElement>(null);
const handleMouseEnter = () => {
if (
leftPanelRef.current?.contains(document.activeElement) ||
rightPanelRef.current?.contains(document.activeElement)
) {
(document.activeElement as HTMLElement)?.blur();
}
(document.activeElement as HTMLElement)?.blur();
};
const LoadingIndicatorProgress = customizationService.getCustomization(
@@ -79,6 +71,7 @@ function ViewerLayout({
useEffect(() => {
document.body.classList.add('bg-black');
document.body.classList.add('overflow-hidden');
return () => {
document.body.classList.remove('bg-black');
document.body.classList.remove('overflow-hidden');
@@ -165,14 +158,12 @@ function ViewerLayout({
{hasLeftPanels ? (
<>
<ResizablePanel {...resizableLeftPanelProps}>
<div ref={leftPanelRef}>
<SidePanelWithServices
side="left"
isExpanded={!leftPanelClosedState}
servicesManager={servicesManager}
{...leftPanelProps}
/>
</div>
<SidePanelWithServices
side="left"
isExpanded={!leftPanelClosedState}
servicesManager={servicesManager}
{...leftPanelProps}
/>
</ResizablePanel>
<ResizableHandle
onDragging={onHandleDragging}
@@ -204,14 +195,12 @@ function ViewerLayout({
className={resizableHandleClassName}
/>
<ResizablePanel {...resizableRightPanelProps}>
<div ref={rightPanelRef}>
<SidePanelWithServices
side="right"
isExpanded={!rightPanelClosedState}
servicesManager={servicesManager}
{...rightPanelProps}
/>
</div>
<SidePanelWithServices
side="right"
isExpanded={!rightPanelClosedState}
servicesManager={servicesManager}
{...rightPanelProps}
/>
</ResizablePanel>
</>
) : null}
@@ -1,5 +1,29 @@
import i18n from '@ohif/i18n';
import { Notification } from '@ohif/ui';
const beginTrackingMessage = i18n.t('MeasurementTable:Track measurements for this series?');
const trackNewSeriesMessage = i18n.t('Do you want to add this measurement to the existing report?');
const discardSeriesMessage = i18n.t(
'You have existing tracked measurements. What would you like to do with your existing tracked measurements?'
);
const trackNewStudyMessage = i18n.t('MeasurementTable:Track measurements for this series?');
const discardStudyMessage = i18n.t(
'Measurements cannot span across multiple studies. Do you want to save your tracked measurements?'
);
const hydrateSRMessage = i18n.t('Do you want to continue tracking measurements for this study?');
const hydrateRTMessage = i18n.t('Do you want to open this Segmentation?');
const hydrateSEGMessage = i18n.t('Do you want to open this Segmentation?');
const discardDirtyMessage = i18n.t('There are unsaved measurements. Do you want to save it?');
export default {
'ui.notificationComponent': Notification,
'viewportNotification.beginTrackingMessage': beginTrackingMessage,
'viewportNotification.trackNewSeriesMessage': trackNewSeriesMessage,
'viewportNotification.discardSeriesMessage': discardSeriesMessage,
'viewportNotification.trackNewStudyMessage': trackNewStudyMessage,
'viewportNotification.discardStudyMessage': discardStudyMessage,
'viewportNotification.hydrateSRMessage': hydrateSRMessage,
'viewportNotification.hydrateRTMessage': hydrateRTMessage,
'viewportNotification.hydrateSEGMessage': hydrateSEGMessage,
'viewportNotification.discardDirtyMessage': discardDirtyMessage,
};
@@ -1,4 +1,6 @@
import React from 'react';
import { setAnnotationLabel } from '@cornerstonejs/tools/utilities';
import { annotation } from '@cornerstonejs/tools';
import { LabellingFlow } from '@ohif/ui';
import { InputDialog } from '@ohif/ui-next';
@@ -89,6 +91,7 @@ export async function callInputDialogAutoComplete({
uiDialogService,
labelConfig,
renderContent = LabellingFlow,
element,
}) {
const exclusive = labelConfig ? labelConfig.exclusive : false;
const dropDownItems = labelConfig ? labelConfig.items : [];
@@ -97,7 +100,8 @@ export async function callInputDialogAutoComplete({
const labellingDoneCallback = newValue => {
uiDialogService.hide('select-annotation');
if (measurement && typeof newValue === 'string') {
measurement.label = newValue;
const sourceAnnotation = annotation.state.getAnnotation(measurement.uid);
setAnnotationLabel(sourceAnnotation, element, newValue);
}
resolve(newValue);
};
@@ -18,6 +18,7 @@ async function promptSaveReport({ servicesManager, commandsManager, extensionMan
const isBackupSave = evt.isBackupSave === undefined ? evt.data.isBackupSave : evt.isBackupSave;
const StudyInstanceUID = evt?.data?.StudyInstanceUID || ctx.trackedStudy;
const SeriesInstanceUID = evt?.data?.SeriesInstanceUID;
const { displaySetInstanceUID } = evt.data ?? evt;
const {
trackedSeries,
@@ -76,6 +77,7 @@ async function promptSaveReport({ servicesManager, commandsManager, extensionMan
SeriesInstanceUID,
viewportId,
isBackupSave,
displaySetInstanceUID,
};
} catch (error) {
console.warn('Unable to save report', error);
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-microscopy",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "OHIF extension for DICOM microscopy",
"author": "Bill Wallace, md-prog",
"license": "MIT",
@@ -30,10 +30,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/i18n": "3.10.0-beta.148",
"@ohif/ui": "3.10.0-beta.148",
"prop-types": "^15.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-pdf",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "OHIF extension for PDF display",
"author": "OHIF",
"license": "MIT",
@@ -30,8 +30,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/ui": "3.10.0-beta.148",
"dcmjs": "*",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/extension-dicom-video
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-dicom-video
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-dicom-video
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-dicom-video
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/extension-dicom-video
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-video",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "OHIF extension for video display",
"author": "OHIF",
"license": "MIT",
@@ -30,8 +30,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/ui": "3.10.0-beta.148",
"dcmjs": "*",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
### Features
* Automate tracking prompts for a less disruptive annotation workflow ([#4822](https://github.com/OHIF/Viewers/issues/4822)) ([54fded5](https://github.com/OHIF/Viewers/commit/54fded554e934f2f75e00d456ebad7692d561225))
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-measurement-tracking
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-measurement-tracking
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-measurement-tracking",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "Tracking features and functionality for basic image viewing",
"author": "OHIF Core Team",
"license": "MIT",
@@ -32,12 +32,12 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@cornerstonejs/core": "^3.8.2",
"@cornerstonejs/tools": "^3.8.2",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"@cornerstonejs/core": "^3.8.4",
"@cornerstonejs/tools": "^3.8.4",
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/ui": "3.10.0-beta.148",
"classnames": "^2.3.2",
"dcmjs": "*",
"lodash.debounce": "^4.0.8",
@@ -49,7 +49,7 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@ohif/ui": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.148",
"@xstate/react": "^3.2.2",
"xstate": "^4.10.0"
}
@@ -3,14 +3,19 @@ import PropTypes from 'prop-types';
import { Machine } from 'xstate';
import { useMachine } from '@xstate/react';
import { useViewportGrid } from '@ohif/ui-next';
import { promptLabelAnnotation, promptSaveReport } from '@ohif/extension-default';
import { machineConfiguration, defaultOptions, RESPONSE } from './measurementTrackingMachine';
import promptBeginTracking from './promptBeginTracking';
import promptTrackNewSeries from './promptTrackNewSeries';
import promptTrackNewStudy from './promptTrackNewStudy';
import promptHydrateStructuredReport from './promptHydrateStructuredReport';
import { measurementTrackingMode } from './promptBeginTracking';
import hydrateStructuredReport from './hydrateStructuredReport';
import { useAppConfig } from '@state';
import {
promptBeginTrackingWrapper,
promptHydrateStructuredReportWrapper,
promptTrackNewSeriesWrapper,
promptTrackNewStudyWrapper,
promptLabelAnnotationWrapper,
promptSaveReportWrapper,
promptHasDirtyAnnotationsWrapper,
} from './promptWrapperFunctions';
const TrackedMeasurementsContext = React.createContext();
TrackedMeasurementsContext.displayName = 'TrackedMeasurementsContext';
@@ -35,7 +40,8 @@ function TrackedMeasurementsContextProvider(
const machineOptions = Object.assign({}, defaultOptions);
machineOptions.actions = Object.assign({}, machineOptions.actions, {
jumpToFirstMeasurementInActiveViewport: (ctx, evt) => {
const { trackedStudy, trackedSeries, activeViewportId } = ctx;
const { trackedStudy, trackedSeries } = ctx;
const { viewportId: activeViewportId } = evt.data;
const measurements = measurementService.getMeasurements();
const trackedMeasurements = measurements.filter(
m => trackedStudy === m.referenceStudyUID && trackedSeries.includes(m.referenceSeriesUID)
@@ -82,7 +88,8 @@ function TrackedMeasurementsContextProvider(
},
jumpToSameImageInActiveViewport: (ctx, evt) => {
const { trackedStudy, trackedSeries, activeViewportId } = ctx;
const { trackedStudy, trackedSeries } = ctx;
const { viewportId: activeViewportId } = evt.data;
const measurements = measurementService.getMeasurements();
const trackedMeasurements = measurements.filter(
m => trackedStudy === m.referenceStudyUID && trackedSeries.includes(m.referenceSeriesUID)
@@ -143,31 +150,64 @@ function TrackedMeasurementsContextProvider(
for (let i = 0; i < measurementIds.length; i++) {
measurementService.remove(measurementIds[i]);
}
measurementService.setIsMeasurementDeletedIndividually(false);
},
clearDisplaySetHydratedState: (ctx, evt) => {
const { displaySetInstanceUID } = evt.data ?? evt;
const displaysets = displaySetService.getActiveDisplaySets();
displaysets?.forEach(displayset => {
if (
displayset.Modality === 'SR' &&
displayset.displaySetInstanceUID !== displaySetInstanceUID &&
displayset.isHydrated
) {
displayset.isHydrated = false;
displayset.isLoaded = false;
}
});
},
updatedViewports: (ctx, evt) => {
const { hangingProtocolService } = servicesManager.services;
const { displaySetInstanceUID, viewportId } = evt.data ?? evt;
const updatedViewports = hangingProtocolService.getViewportsRequireUpdate(
viewportId,
displaySetInstanceUID
);
viewportGridService.setDisplaySetsForViewports(updatedViewports);
},
});
machineOptions.services = Object.assign({}, machineOptions.services, {
promptBeginTracking: promptBeginTracking.bind(null, {
promptBeginTracking: promptBeginTrackingWrapper.bind(null, {
servicesManager,
extensionManager,
appConfig,
}),
promptTrackNewSeries: promptTrackNewSeries.bind(null, {
promptTrackNewSeries: promptTrackNewSeriesWrapper.bind(null, {
servicesManager,
extensionManager,
appConfig,
}),
promptTrackNewStudy: promptTrackNewStudy.bind(null, {
promptTrackNewStudy: promptTrackNewStudyWrapper.bind(null, {
servicesManager,
extensionManager,
appConfig,
}),
promptSaveReport: promptSaveReport.bind(null, {
promptSaveReport: promptSaveReportWrapper.bind(null, {
servicesManager,
commandsManager,
extensionManager,
appConfig,
}),
promptHydrateStructuredReport: promptHydrateStructuredReport.bind(null, {
promptHydrateStructuredReport: promptHydrateStructuredReportWrapper.bind(null, {
servicesManager,
extensionManager,
commandsManager,
appConfig,
}),
promptHasDirtyAnnotations: promptHasDirtyAnnotationsWrapper.bind(null, {
servicesManager,
extensionManager,
commandsManager,
@@ -179,7 +219,7 @@ function TrackedMeasurementsContextProvider(
commandsManager,
appConfig,
}),
promptLabelAnnotation: promptLabelAnnotation.bind(null, {
promptLabelAnnotation: promptLabelAnnotationWrapper.bind(null, {
servicesManager,
extensionManager,
commandsManager,
@@ -194,6 +234,25 @@ function TrackedMeasurementsContextProvider(
const labelConfig = customizationService.getCustomization('measurementLabels');
return evt.data && evt.data.userResponse === RESPONSE.NO_NEVER && labelConfig?.labelOnMeasure;
},
isSimplifiedConfig: (ctx, evt, condMeta) => {
return appConfig?.measurementTrackingMode === measurementTrackingMode.SIMPLIFIED;
},
simplifiedAndLoadSR: (ctx, evt, condMeta) => {
return (
appConfig?.measurementTrackingMode === measurementTrackingMode.SIMPLIFIED &&
evt.data.isBackupSave === false
);
},
hasDirtyAndSimplified: (ctx, evt, condMeta) => {
const measurements = measurementService.getMeasurements();
const hasDirtyMeasurements =
measurements.some(measurement => measurement.isDirty) ||
(measurements.length && measurementService.getIsMeasurementDeletedIndividually());
return (
appConfig?.measurementTrackingMode === measurementTrackingMode.SIMPLIFIED &&
hasDirtyMeasurements
);
},
});
// TODO: IMPROVE
@@ -266,7 +325,8 @@ function TrackedMeasurementsContextProvider(
// load function added by our sopClassHandler module
if (
displaySet.SOPClassHandlerId === SR_SOPCLASSHANDLERID &&
displaySet.isRehydratable === true
displaySet.isRehydratable === true &&
!displaySet.isHydrated
) {
const params = {
displaySetInstanceUID: displaySet.displaySetInstanceUID,
@@ -122,13 +122,27 @@ const machineConfiguration = {
UNTRACK_SERIES: [
{
target: 'tracking',
actions: ['removeTrackedSeries', 'setIsDirty'],
actions: ['removeTrackedSeries', 'setIsDirty', 'clearDisplaySetHydratedState'],
cond: 'hasRemainingTrackedSeries',
},
{
target: 'idle',
},
],
UNTRACK_ALL: [
{
target: 'tracking',
actions: [
'clearContext',
'setIsDirtyToClean',
'clearDisplaySetHydratedState',
'clearAllMeasurements',
],
},
{
target: 'idle',
},
],
SET_TRACKED_SERIES: [
{
target: 'tracking',
@@ -146,6 +160,15 @@ const machineConfiguration = {
target: 'tracking',
},
],
CHECK_DIRTY: {
target: 'promptHasDirtyAnnotations',
cond: 'hasDirtyAndSimplified',
},
PROMPT_HYDRATE_SR: {
target: 'promptHydrateStructuredReport',
cond: 'isSimplifiedConfig',
actions: ['clearAllMeasurements', 'clearDisplaySetHydratedState'],
},
},
},
promptTrackNewSeries: {
@@ -214,6 +237,16 @@ const machineConfiguration = {
invoke: {
src: 'promptSaveReport',
onDone: [
{
target: 'tracking',
actions: [
'clearAllMeasurements',
'clearDisplaySetHydratedState',
'setIsDirty',
'updatedViewports',
],
cond: 'simplifiedAndLoadSR',
},
// "clicked the save button"
// - should clear all measurements
// - show DICOM SR
@@ -312,6 +345,28 @@ const machineConfiguration = {
],
},
},
promptHasDirtyAnnotations: {
invoke: {
src: 'promptHasDirtyAnnotations',
onDone: [
{
target: 'tracking',
actions: [
'clearAllMeasurements',
'clearDisplaySetHydratedState',
'setIsDirty',
'updatedViewports',
],
cond: 'shouldSetStudyAndSeries',
},
{
target: 'promptSaveReport',
cond: 'shouldPromptSaveReport',
},
{ target: 'tracking' },
],
},
},
},
strict: true,
};
@@ -9,17 +9,29 @@ const RESPONSE = {
SET_STUDY_AND_SERIES: 3,
};
export const measurementTrackingMode = {
STANDARD: 'standard',
SIMPLIFIED: 'simplified',
NONE: 'none',
};
function promptBeginTracking({ servicesManager, extensionManager }, ctx, evt) {
const { uiViewportDialogService } = servicesManager.services;
const { uiViewportDialogService, customizationService } = servicesManager.services;
const appConfig = extensionManager._appConfig;
// When the state change happens after a promise, the state machine sends the retult in evt.data;
// In case of direct transition to the state, the state machine sends the data in evt;
const { viewportId, StudyInstanceUID, SeriesInstanceUID } = evt.data || evt;
return new Promise(async function (resolve, reject) {
let promptResult = appConfig?.disableConfirmationPrompts
? RESPONSE.SET_STUDY_AND_SERIES
: await _askTrackMeasurements(uiViewportDialogService, viewportId);
const standardMode = appConfig?.measurementTrackingMode === measurementTrackingMode.STANDARD;
const noTrackingMode = appConfig?.measurementTrackingMode === measurementTrackingMode.NONE;
let promptResult;
promptResult = noTrackingMode
? RESPONSE.NO_NEVER
: standardMode
? await _askTrackMeasurements(uiViewportDialogService, customizationService, viewportId)
: RESPONSE.SET_STUDY_AND_SERIES;
resolve({
userResponse: promptResult,
@@ -30,9 +42,11 @@ function promptBeginTracking({ servicesManager, extensionManager }, ctx, evt) {
});
}
function _askTrackMeasurements(uiViewportDialogService, viewportId) {
function _askTrackMeasurements(uiViewportDialogService, customizationService, viewportId) {
return new Promise(function (resolve, reject) {
const message = i18n.t('MeasurementTable:Track measurements for this series?');
const message = customizationService.getCustomization(
'viewportNotification.beginTrackingMessage'
);
const actions = [
{
id: 'prompt-begin-tracking-cancel',
@@ -0,0 +1,81 @@
const RESPONSE = {
NO_NEVER: -1,
CANCEL: 0,
CREATE_REPORT: 1,
ADD_SERIES: 2,
SET_STUDY_AND_SERIES: 3,
NO_NOT_FOR_SERIES: 4,
};
function promptHasDirtyAnnotations({ servicesManager }: withAppTypes, ctx, evt) {
const { viewportId, displaySetInstanceUID } = evt.data || evt;
return new Promise(async function (resolve, reject) {
const { uiViewportDialogService, customizationService } = servicesManager.services;
const promptResult = await _askSaveDiscardOrCancel(
uiViewportDialogService,
customizationService,
viewportId
);
resolve({
displaySetInstanceUID,
userResponse: promptResult,
viewportId,
isBackupSave: false,
});
});
}
function _askSaveDiscardOrCancel(
UIViewportDialogService: AppTypes.UIViewportDialogService,
customizationService: AppTypes.CustomizationService,
viewportId
) {
return new Promise(function (resolve, reject) {
const message = customizationService.getCustomization(
'viewportNotification.discardDirtyMessage'
);
const actions = [
{ id: 'cancel', type: 'cancel', text: 'Cancel', value: RESPONSE.CANCEL },
{
id: 'discard-existing',
type: 'secondary',
text: 'No, discard existing',
value: RESPONSE.SET_STUDY_AND_SERIES,
},
{
id: 'save-existing',
type: 'primary',
text: 'Yes',
value: RESPONSE.CREATE_REPORT,
},
];
const onSubmit = result => {
UIViewportDialogService.hide();
resolve(result);
};
UIViewportDialogService.show({
viewportId,
id: 'measurement-tracking-prompt-dirty-measurement',
type: 'info',
message,
actions,
onSubmit,
onOutsideClick: () => {
UIViewportDialogService.hide();
resolve(RESPONSE.CANCEL);
},
onKeyPress: event => {
if (event.key === 'Enter') {
const action = actions.find(action => action.id === 'save-existing');
onSubmit(action.value);
}
},
});
});
}
export default promptHasDirtyAnnotations;
@@ -1,5 +1,6 @@
import { hydrateStructuredReport } from '@ohif/extension-cornerstone-dicom-sr';
import { ButtonEnums } from '@ohif/ui';
import { measurementTrackingMode } from './promptBeginTracking';
const RESPONSE = {
NO_NEVER: -1,
@@ -16,13 +17,16 @@ function promptHydrateStructuredReport(
ctx,
evt
) {
const { uiViewportDialogService, displaySetService } = servicesManager.services;
const { uiViewportDialogService, displaySetService, customizationService } =
servicesManager.services;
const { viewportId, displaySetInstanceUID } = evt;
const srDisplaySet = displaySetService.getDisplaySetByUID(displaySetInstanceUID);
return new Promise(async function (resolve, reject) {
const promptResult = appConfig?.disableConfirmationPrompts
? RESPONSE.HYDRATE_REPORT
: await _askTrackMeasurements(uiViewportDialogService, viewportId);
const standardMode = appConfig?.measurementTrackingMode === measurementTrackingMode.STANDARD;
const promptResult = standardMode
? await _askTrackMeasurements(uiViewportDialogService, customizationService, viewportId)
: RESPONSE.HYDRATE_REPORT;
// Need to do action here... So we can set state...
let StudyInstanceUID, SeriesInstanceUIDs;
@@ -49,9 +53,9 @@ function promptHydrateStructuredReport(
});
}
function _askTrackMeasurements(uiViewportDialogService, viewportId) {
function _askTrackMeasurements(uiViewportDialogService, customizationService, viewportId) {
return new Promise(function (resolve, reject) {
const message = 'Do you want to continue tracking measurements for this study?';
const message = customizationService.getCustomization('viewportNotification.hydrateSRMessage');
const actions = [
{
id: 'no-hydrate',
@@ -1,4 +1,5 @@
import { ButtonEnums } from '@ohif/ui';
import { measurementTrackingMode } from './promptBeginTracking';
const RESPONSE = {
NO_NEVER: -1,
@@ -10,17 +11,22 @@ const RESPONSE = {
};
function promptTrackNewSeries({ servicesManager, extensionManager }, ctx, evt) {
const { UIViewportDialogService } = servicesManager.services;
const { UIViewportDialogService, customizationService } = servicesManager.services;
// When the state change happens after a promise, the state machine sends the retult in evt.data;
// In case of direct transition to the state, the state machine sends the data in evt;
const { viewportId, StudyInstanceUID, SeriesInstanceUID } = evt.data || evt;
return new Promise(async function (resolve, reject) {
let promptResult = await _askShouldAddMeasurements(UIViewportDialogService, viewportId);
const appConfig = extensionManager._appConfig;
const showPrompt = appConfig?.measurementTrackingMode === measurementTrackingMode.STANDARD;
let promptResult = showPrompt
? await _askShouldAddMeasurements(UIViewportDialogService, customizationService, viewportId)
: RESPONSE.ADD_SERIES;
if (promptResult === RESPONSE.CREATE_REPORT) {
promptResult = ctx.isDirty
? await _askSaveDiscardOrCancel(UIViewportDialogService, viewportId)
? await _askSaveDiscardOrCancel(UIViewportDialogService, customizationService, viewportId)
: RESPONSE.SET_STUDY_AND_SERIES;
}
@@ -34,9 +40,11 @@ function promptTrackNewSeries({ servicesManager, extensionManager }, ctx, evt) {
});
}
function _askShouldAddMeasurements(uiViewportDialogService, viewportId) {
function _askShouldAddMeasurements(uiViewportDialogService, customizationService, viewportId) {
return new Promise(function (resolve, reject) {
const message = 'Do you want to add this measurement to the existing report?';
const message = customizationService.getCustomization(
'viewportNotification.trackNewSeriesMessage'
);
const actions = [
{
type: ButtonEnums.type.secondary,
@@ -73,10 +81,12 @@ function _askShouldAddMeasurements(uiViewportDialogService, viewportId) {
});
}
function _askSaveDiscardOrCancel(UIViewportDialogService, viewportId) {
function _askSaveDiscardOrCancel(UIViewportDialogService, customizationService, viewportId) {
return new Promise(function (resolve, reject) {
const message =
'You have existing tracked measurements. What would you like to do with your existing tracked measurements?';
const message = customizationService.getCustomization(
'viewportNotification.discardSeriesMessage'
);
const actions = [
{ type: 'cancel', text: 'Cancel', value: RESPONSE.CANCEL },
{
@@ -1,4 +1,5 @@
import i18n from 'i18next';
import { measurementTrackingMode } from './promptBeginTracking';
const RESPONSE = {
NO_NEVER: -1,
@@ -10,18 +11,26 @@ const RESPONSE = {
};
function promptTrackNewStudy({ servicesManager, extensionManager }: withAppTypes, ctx, evt) {
const { uiViewportDialogService } = servicesManager.services;
const { uiViewportDialogService, customizationService } = servicesManager.services;
// When the state change happens after a promise, the state machine sends the retult in evt.data;
// In case of direct transition to the state, the state machine sends the data in evt;
const { viewportId, StudyInstanceUID, SeriesInstanceUID } = evt.data || evt;
return new Promise(async function (resolve, reject) {
let promptResult = await _askTrackMeasurements(uiViewportDialogService, viewportId);
const appConfig = extensionManager._appConfig;
const standardMode = appConfig?.measurementTrackingMode === measurementTrackingMode.STANDARD;
const simplifiedMode =
appConfig?.measurementTrackingMode === measurementTrackingMode.SIMPLIFIED;
let promptResult = standardMode
? await _askTrackMeasurements(uiViewportDialogService, customizationService, viewportId)
: RESPONSE.SET_STUDY_AND_SERIES;
if (promptResult === RESPONSE.SET_STUDY_AND_SERIES) {
promptResult = ctx.isDirty
? await _askSaveDiscardOrCancel(uiViewportDialogService, viewportId)
: RESPONSE.SET_STUDY_AND_SERIES;
promptResult =
ctx.isDirty && (standardMode || simplifiedMode)
? await _askSaveDiscardOrCancel(uiViewportDialogService, customizationService, viewportId)
: RESPONSE.SET_STUDY_AND_SERIES;
}
resolve({
@@ -36,10 +45,13 @@ function promptTrackNewStudy({ servicesManager, extensionManager }: withAppTypes
function _askTrackMeasurements(
UIViewportDialogService: AppTypes.UIViewportDialogService,
customizationService: AppTypes.CustomizationService,
viewportId
) {
return new Promise(function (resolve, reject) {
const message = i18n.t('MeasurementTable:Track measurements for this series?');
const message = customizationService.getCustomization(
'viewportNotification.trackNewStudyMessage'
);
const actions = [
{ type: 'cancel', text: i18n.t('MeasurementTable:No'), value: RESPONSE.CANCEL },
{
@@ -80,11 +92,13 @@ function _askTrackMeasurements(
function _askSaveDiscardOrCancel(
UIViewportDialogService: AppTypes.UIViewportDialogService,
customizationService: AppTypes.CustomizationService,
viewportId
) {
return new Promise(function (resolve, reject) {
const message =
'Measurements cannot span across multiple studies. Do you want to save your tracked measurements?';
const message = customizationService.getCustomization(
'viewportNotification.discardStudyMessage'
);
const actions = [
{ type: 'cancel', text: 'Cancel', value: RESPONSE.CANCEL },
{
@@ -0,0 +1,83 @@
const promptBeginTrackingWrapper = ({ servicesManager, extensionManager }, ctx, evt) => {
const { customizationService } = servicesManager.services;
const promptBeginTracking = customizationService.getCustomization(
'measurement.promptBeginTracking'
);
return promptBeginTracking({ servicesManager, extensionManager }, ctx, evt);
};
const promptHydrateStructuredReportWrapper = (
{ servicesManager, extensionManager, commandsManager, appConfig },
ctx,
evt
) => {
const { customizationService } = servicesManager.services;
const promptHydrateStructuredReport = customizationService.getCustomization(
'measurement.promptHydrateStructuredReport'
);
return promptHydrateStructuredReport(
{ servicesManager, extensionManager, commandsManager, appConfig },
ctx,
evt
);
};
const promptTrackNewSeriesWrapper = ({ servicesManager, extensionManager }, ctx, evt) => {
const { customizationService } = servicesManager.services;
const promptTrackNewSeries = customizationService.getCustomization(
'measurement.promptTrackNewSeries'
);
return promptTrackNewSeries({ servicesManager, extensionManager }, ctx, evt);
};
const promptTrackNewStudyWrapper = ({ servicesManager, extensionManager }, ctx, evt) => {
const { customizationService } = servicesManager.services;
const promptTrackNewStudy = customizationService.getCustomization(
'measurement.promptTrackNewStudy'
);
return promptTrackNewStudy({ servicesManager, extensionManager }, ctx, evt);
};
const promptLabelAnnotationWrapper = ({ servicesManager }, ctx, evt) => {
const { customizationService } = servicesManager.services;
const promptLabelAnnotation = customizationService.getCustomization(
'measurement.promptLabelAnnotation'
);
return promptLabelAnnotation({ servicesManager }, ctx, evt);
};
const promptSaveReportWrapper = (
{ servicesManager, commandsManager, extensionManager },
ctx,
evt
) => {
const { customizationService } = servicesManager.services;
const promptSaveReport = customizationService.getCustomization('measurement.promptSaveReport');
return promptSaveReport({ servicesManager, commandsManager, extensionManager }, ctx, evt);
};
const promptHasDirtyAnnotationsWrapper = (
{ servicesManager, commandsManager, extensionManager },
ctx,
evt
) => {
const { customizationService } = servicesManager.services;
const promptHasDirtyAnnotations = customizationService.getCustomization(
'measurement.promptHasDirtyAnnotations'
);
return promptHasDirtyAnnotations(
{ servicesManager, commandsManager, extensionManager },
ctx,
evt
);
};
export {
promptBeginTrackingWrapper,
promptHydrateStructuredReportWrapper,
promptTrackNewSeriesWrapper,
promptTrackNewStudyWrapper,
promptLabelAnnotationWrapper,
promptSaveReportWrapper,
promptHasDirtyAnnotationsWrapper,
};
@@ -0,0 +1,16 @@
import promptBeginTracking from '../contexts/TrackedMeasurementsContext/promptBeginTracking';
import promptHasDirtyAnnotations from '../contexts/TrackedMeasurementsContext/promptHasDirtyAnnotations';
import promptHydrateStructuredReport from '../contexts/TrackedMeasurementsContext/promptHydrateStructuredReport';
import promptTrackNewSeries from '../contexts/TrackedMeasurementsContext/promptTrackNewSeries';
import promptTrackNewStudy from '../contexts/TrackedMeasurementsContext/promptTrackNewStudy';
import { promptLabelAnnotation, promptSaveReport } from '@ohif/extension-default';
export default {
'measurement.promptBeginTracking': promptBeginTracking,
'measurement.promptHydrateStructuredReport': promptHydrateStructuredReport,
'measurement.promptTrackNewSeries': promptTrackNewSeries,
'measurement.promptTrackNewStudy': promptTrackNewStudy,
'measurement.promptLabelAnnotation': promptLabelAnnotation,
'measurement.promptSaveReport': promptSaveReport,
'measurement.promptHasDirtyAnnotations': promptHasDirtyAnnotations,
};
@@ -0,0 +1,64 @@
import { measurementTrackingMode } from '../contexts/TrackedMeasurementsContext/promptBeginTracking';
type CheckHasDirtyAndSimplifiedModeProps = {
servicesManager: AppTypes.ServicesManager;
appConfig: AppTypes.Config;
displaySetInstanceUID: string;
};
const onDoubleClickHandler = {
callbacks: [
({ activeViewportId, servicesManager, isHangingProtocolLayout, appConfig }) =>
async displaySetInstanceUID => {
const { hangingProtocolService, viewportGridService, uiNotificationService } =
servicesManager.services;
let updatedViewports = [];
const viewportId = activeViewportId;
const haveDirtyMeasurementsInSimplifiedMode = checkHasDirtyAndSimplifiedMode({
servicesManager,
appConfig,
displaySetInstanceUID,
});
try {
if (!haveDirtyMeasurementsInSimplifiedMode) {
updatedViewports = hangingProtocolService.getViewportsRequireUpdate(
viewportId,
displaySetInstanceUID,
isHangingProtocolLayout
);
viewportGridService.setDisplaySetsForViewports(updatedViewports);
}
} catch (error) {
console.warn(error);
uiNotificationService.show({
title: 'Thumbnail Double Click',
message: 'The selected display sets could not be added to the viewport.',
type: 'error',
duration: 3000,
});
}
},
],
};
const customOnDropHandlerCallback = async props => {
const handled = checkHasDirtyAndSimplifiedMode(props);
return Promise.resolve({ handled });
};
const checkHasDirtyAndSimplifiedMode = (props: CheckHasDirtyAndSimplifiedModeProps) => {
const { servicesManager, appConfig, displaySetInstanceUID } = props;
const simplifiedMode = appConfig.measurementTrackingMode === measurementTrackingMode.SIMPLIFIED;
const { measurementService, displaySetService } = servicesManager.services;
const measurements = measurementService.getMeasurements();
const haveDirtyMeasurements =
measurements.some(m => m.isDirty) ||
(measurements.length && measurementService.getIsMeasurementDeletedIndividually());
const displaySet = displaySetService.getDisplaySetByUID(displaySetInstanceUID);
const hasDirtyAndSimplifiedMode =
displaySet.Modality === 'SR' && simplifiedMode && haveDirtyMeasurements;
return hasDirtyAndSimplifiedMode;
};
export { onDoubleClickHandler, customOnDropHandlerCallback };
@@ -0,0 +1,10 @@
import measurementTrackingPrompts from './customizations/measurementTrackingPrompts';
export default function getCustomizationModule() {
return [
{
name: 'default',
value: { ...measurementTrackingPrompts },
},
];
}
+18 -2
View File
@@ -6,6 +6,12 @@ import getViewportModule from './getViewportModule';
import { id } from './id.js';
import { ViewportActionButton } from '@ohif/ui';
import i18n from '@ohif/i18n';
import { measurementTrackingMode } from './contexts/TrackedMeasurementsContext/promptBeginTracking';
import getCustomizationModule from './getCustomizationModule';
import {
onDoubleClickHandler,
customOnDropHandlerCallback,
} from './customizations/studyBrowserCustomization';
const measurementTrackingExtension = {
/**
@@ -18,8 +24,15 @@ const measurementTrackingExtension = {
getViewportModule,
onModeEnter({ servicesManager }) {
const { toolbarService } = servicesManager.services;
const { toolbarService, customizationService } = servicesManager.services;
customizationService.setCustomizations({
'studyBrowser.thumbnailDoubleClickCallback': {
$set: onDoubleClickHandler,
},
customOnDropHandler: {
$set: customOnDropHandlerCallback,
},
});
toolbarService.addButtons(
[
{
@@ -38,6 +51,9 @@ const measurementTrackingExtension = {
true // replace the button if it is already defined
);
},
getCustomizationModule,
};
export default measurementTrackingExtension;
export { measurementTrackingMode };
@@ -1,4 +1,5 @@
import React from 'react';
import { Dialog, ButtonEnums } from '@ohif/ui';
import { utils } from '@ohif/core';
import { AccordionTrigger, MeasurementTable, useViewportGrid } from '@ohif/ui-next';
import {
@@ -11,18 +12,40 @@ import {
} from '@ohif/extension-cornerstone';
import { useTrackedMeasurements } from '../getContextModule';
import { UntrackSeriesModal } from './PanelStudyBrowserTracking/untrackSeriesModal';
const { filterAnd, filterPlanarMeasurement, filterMeasurementsBySeriesUID } =
utils.MeasurementFilters;
function PanelMeasurementTableTracking(props) {
const [viewportGrid] = useViewportGrid();
const { measurementService, uiModalService } = props.servicesManager.services;
const [trackedMeasurements, sendTrackedMeasurementsEvent] = useTrackedMeasurements();
const { trackedStudy, trackedSeries } = trackedMeasurements.context;
const measurementFilter = trackedStudy
? filterAnd(filterPlanarMeasurement, filterMeasurementsBySeriesUID(trackedSeries))
: filterPlanarMeasurement;
const onUntrackConfirm = () => {
sendTrackedMeasurementsEvent('UNTRACK_ALL', {});
};
const onDelete = () => {
const hasDirtyMeasurements = measurementService
.getMeasurements()
.some(measurement => measurement.isDirty);
hasDirtyMeasurements
? uiModalService.show({
title: 'Untrack Study',
content: UntrackSeriesModal,
contentProps: {
onConfirm: onUntrackConfirm,
message: 'Are you sure you want to untrack study and delete all measurements?',
},
})
: onUntrackConfirm();
};
const EmptyComponent = () => (
<div data-cy="trackedMeasurements-panel">
<MeasurementTable
@@ -43,6 +66,7 @@ function PanelMeasurementTableTracking(props) {
measurementFilter,
});
},
onDelete,
};
const Header = props => (
@@ -51,7 +75,10 @@ function PanelMeasurementTableTracking(props) {
className="px-0"
>
<div data-cy="TrackingHeader">
<StudySummaryFromMetadata {...props} />
<StudySummaryFromMetadata
{...props}
actions={actions}
/>
</div>
</AccordionTrigger>
);
@@ -68,7 +95,7 @@ function PanelMeasurementTableTracking(props) {
key="trackingMeasurementsHeader"
asChild={true}
>
<Header key="trackingHeadChild" />
<Header key="trackingHeadChild" />
</AccordionGroup.Trigger>
<MeasurementsOrAdditionalFindings
key="measurementsOrAdditionalFindings"
@@ -1,23 +1,10 @@
import React, { useState, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import { useSystem, utils } from '@ohif/core';
import { useImageViewer, Dialog, ButtonEnums } from '@ohif/ui';
import { useViewportGrid } from '@ohif/ui-next';
import { StudyBrowser } from '@ohif/ui-next';
import { useTrackedMeasurements } from '../../getContextModule';
import { Separator } from '@ohif/ui-next';
import { MoreDropdownMenu, PanelStudyBrowserHeader } from '@ohif/extension-default';
import { defaultActionIcons } from './constants';
import { useSystem } from '@ohif/core';
import PanelStudyBrowser from '@ohif/extension-default/src/Panels/StudyBrowser/PanelStudyBrowser';
import { UntrackSeriesModal } from './untrackSeriesModal';
const { formatDate, createStudyBrowserTabs } = utils;
const DIALOG_ID = {
UNTRACK_SERIES: 'untrack-series',
REJECT_REPORT: 'ds-reject-sr',
};
import { useTrackedMeasurements } from '../../getContextModule';
import { useViewportGrid } from '@ohif/ui-next';
const thumbnailNoImageModalities = [
'SR',
@@ -32,8 +19,7 @@ const thumbnailNoImageModalities = [
];
/**
*
* @param {*} param0
* Panel component for the Study Browser with tracking capabilities
*/
export default function PanelStudyBrowserTracking({
getImageSrc,
@@ -41,404 +27,35 @@ export default function PanelStudyBrowserTracking({
requestDisplaySetCreationForStudy,
dataSource,
}) {
const { servicesManager, commandsManager } = useSystem();
const {
displaySetService,
uiDialogService,
hangingProtocolService,
uiNotificationService,
measurementService,
studyPrefetcherService,
customizationService,
uiModalService,
} = servicesManager.services;
const navigate = useNavigate();
const studyMode = customizationService.getCustomization('studyBrowser.studyMode');
const { t } = useTranslation('Common');
// Normally you nest the components so the tree isn't so deep, and the data
// doesn't have to have such an intense shape. This works well enough for now.
// Tabs --> Studies --> DisplaySets --> Thumbnails
const { StudyInstanceUIDs } = useImageViewer();
const [{ activeViewportId, viewports, isHangingProtocolLayout }, viewportGridService] =
useViewportGrid();
const { servicesManager } = useSystem();
const { displaySetService, uiModalService, measurementService, viewportGridService } =
servicesManager.services;
const [trackedMeasurements, sendTrackedMeasurementsEvent] = useTrackedMeasurements();
const [activeTabName, setActiveTabName] = useState(studyMode);
const [expandedStudyInstanceUIDs, setExpandedStudyInstanceUIDs] = useState([
...StudyInstanceUIDs,
]);
const [studyDisplayList, setStudyDisplayList] = useState([]);
const [hasLoadedViewports, setHasLoadedViewports] = useState(false);
const [displaySets, setDisplaySets] = useState([]);
const [displaySetsLoadingState, setDisplaySetsLoadingState] = useState({});
const [thumbnailImageSrcMap, setThumbnailImageSrcMap] = useState({});
const [jumpToDisplaySet, setJumpToDisplaySet] = useState(null);
const [viewPresets, setViewPresets] = useState(
customizationService.getCustomization('studyBrowser.viewPresets')
);
const [actionIcons, setActionIcons] = useState(defaultActionIcons);
const updateActionIconValue = actionIcon => {
actionIcon.value = !actionIcon.value;
const newActionIcons = [...actionIcons];
setActionIcons(newActionIcons);
};
const updateViewPresetValue = viewPreset => {
if (!viewPreset) {
return;
}
const newViewPresets = viewPresets.map(preset => {
preset.selected = preset.id === viewPreset.id;
return preset;
});
setViewPresets(newViewPresets);
};
const onDoubleClickThumbnailHandler = displaySetInstanceUID => {
let updatedViewports = [];
const viewportId = activeViewportId;
try {
updatedViewports = hangingProtocolService.getViewportsRequireUpdate(
viewportId,
displaySetInstanceUID,
isHangingProtocolLayout
);
} catch (error) {
console.warn(error);
uiNotificationService.show({
title: 'Thumbnail Double Click',
message:
'The selected display sets could not be added to the viewport due to a mismatch in the Hanging Protocol rules.',
type: 'error',
duration: 3000,
});
}
viewportGridService.setDisplaySetsForViewports(updatedViewports);
};
const activeViewportDisplaySetInstanceUIDs =
viewports.get(activeViewportId)?.displaySetInstanceUIDs;
const { trackedSeries } = trackedMeasurements.context;
useEffect(() => {
setActiveTabName(studyMode);
}, [studyMode]);
// ~~ studyDisplayList
useEffect(() => {
// Fetch all studies for the patient in each primary study
async function fetchStudiesForPatient(StudyInstanceUID) {
// current study qido
const qidoForStudyUID = await dataSource.query.studies.search({
studyInstanceUid: StudyInstanceUID,
});
if (!qidoForStudyUID?.length) {
navigate('/notfoundstudy', '_self');
throw new Error('Invalid study URL');
}
let qidoStudiesForPatient = qidoForStudyUID;
// try to fetch the prior studies based on the patientID if the
// server can respond.
try {
qidoStudiesForPatient = await getStudiesForPatientByMRN(qidoForStudyUID);
} catch (error) {
console.warn(error);
}
const mappedStudies = _mapDataSourceStudies(qidoStudiesForPatient);
const actuallyMappedStudies = mappedStudies.map(qidoStudy => {
return {
studyInstanceUid: qidoStudy.StudyInstanceUID,
date: formatDate(qidoStudy.StudyDate) || t('NoStudyDate'),
description: qidoStudy.StudyDescription,
modalities: qidoStudy.ModalitiesInStudy,
numInstances: qidoStudy.NumInstances,
};
});
setStudyDisplayList(prevArray => {
const ret = [...prevArray];
for (const study of actuallyMappedStudies) {
if (!prevArray.find(it => it.studyInstanceUid === study.studyInstanceUid)) {
ret.push(study);
}
}
return ret;
const checkDirtyMeasurements = displaySetInstanceUID => {
const displaySet = displaySetService.getDisplaySetByUID(displaySetInstanceUID);
if (displaySet.Modality === 'SR') {
const activeViewportId = viewportGridService.getActiveViewportId();
sendTrackedMeasurementsEvent('CHECK_DIRTY', {
viewportId: activeViewportId,
displaySetInstanceUID: displaySetInstanceUID,
});
}
};
StudyInstanceUIDs.forEach(sid => fetchStudiesForPatient(sid));
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [StudyInstanceUIDs, getStudiesForPatientByMRN]);
// ~~ Initial Thumbnails
useEffect(() => {
if (!hasLoadedViewports) {
if (activeViewportId) {
// Once there is an active viewport id, it means the layout is ready
// so wait a bit of time to allow the viewports preferential loading
// which improves user experience of responsiveness significantly on slower
// systems.
const delayMs = 250 + displaySetService.getActiveDisplaySets().length * 10;
window.setTimeout(() => setHasLoadedViewports(true), delayMs);
}
return;
}
let currentDisplaySets = displaySetService.activeDisplaySets;
// filter non based on the list of modalities that are supported by cornerstone
currentDisplaySets = currentDisplaySets.filter(
ds => !thumbnailNoImageModalities.includes(ds.Modality)
);
if (!currentDisplaySets.length) {
return;
}
currentDisplaySets.forEach(async dSet => {
const newImageSrcEntry = {};
const displaySet = displaySetService.getDisplaySetByUID(dSet.displaySetInstanceUID);
const imageIds = dataSource.getImageIdsForDisplaySet(displaySet);
const imageId = getImageIdForThumbnail(displaySet, imageIds);
// TODO: Is it okay that imageIds are not returned here for SR displaySets?
if (!imageId || displaySet?.unsupported) {
return;
}
// When the image arrives, render it and store the result in the thumbnailImgSrcMap
let { thumbnailSrc } = displaySet;
if (!thumbnailSrc && displaySet.getThumbnailSrc) {
thumbnailSrc = await displaySet.getThumbnailSrc();
}
if (!thumbnailSrc) {
const thumbnailSrc = await getImageSrc(imageId);
displaySet.thumbnailSrc = thumbnailSrc;
}
newImageSrcEntry[dSet.displaySetInstanceUID] = thumbnailSrc;
setThumbnailImageSrcMap(prevState => {
return { ...prevState, ...newImageSrcEntry };
});
});
}, [displaySetService, dataSource, getImageSrc, activeViewportId, hasLoadedViewports]);
// ~~ displaySets
useEffect(() => {
const currentDisplaySets = displaySetService.activeDisplaySets;
if (!currentDisplaySets.length) {
return;
}
const mappedDisplaySets = _mapDisplaySets(
currentDisplaySets,
displaySetsLoadingState,
thumbnailImageSrcMap,
trackedSeries,
viewports,
viewportGridService,
dataSource,
displaySetService,
uiDialogService,
uiNotificationService
);
setDisplaySets(mappedDisplaySets);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
displaySetService.activeDisplaySets,
displaySetsLoadingState,
trackedSeries,
viewports,
dataSource,
thumbnailImageSrcMap,
]);
// -- displaySetsLoadingState
useEffect(() => {
const { unsubscribe } = studyPrefetcherService.subscribe(
studyPrefetcherService.EVENTS.DISPLAYSET_LOAD_PROGRESS,
updatedDisplaySetLoadingState => {
const { displaySetInstanceUID, loadingProgress } = updatedDisplaySetLoadingState;
setDisplaySetsLoadingState(prevState => ({
...prevState,
[displaySetInstanceUID]: loadingProgress,
}));
}
);
return () => unsubscribe();
}, [studyPrefetcherService]);
// ~~ subscriptions --> displaySets
useEffect(() => {
// DISPLAY_SETS_ADDED returns an array of DisplaySets that were added
const SubscriptionDisplaySetsAdded = displaySetService.subscribe(
displaySetService.EVENTS.DISPLAY_SETS_ADDED,
data => {
if (!hasLoadedViewports) {
return;
}
const { displaySetsAdded, options } = data;
displaySetsAdded.forEach(async dSet => {
const displaySetInstanceUID = dSet.displaySetInstanceUID;
const newImageSrcEntry = {};
const displaySet = displaySetService.getDisplaySetByUID(displaySetInstanceUID);
if (displaySet?.unsupported) {
return;
}
if (options.madeInClient) {
setJumpToDisplaySet(displaySetInstanceUID);
}
const imageIds = dataSource.getImageIdsForDisplaySet(displaySet);
const imageId = getImageIdForThumbnail(displaySet, imageIds);
// TODO: Is it okay that imageIds are not returned here for SR displaysets?
if (!imageId) {
return;
}
// When the image arrives, render it and store the result in the thumbnailImgSrcMap
newImageSrcEntry[displaySetInstanceUID] = await getImageSrc(imageId);
setThumbnailImageSrcMap(prevState => {
return { ...prevState, ...newImageSrcEntry };
});
});
const subscriptionOndropFired = viewportGridService.subscribe(
viewportGridService.EVENTS.VIEWPORT_ONDROP_HANDLED,
({ eventData }) => {
checkDirtyMeasurements(eventData.displaySetInstanceUID);
}
);
return () => {
SubscriptionDisplaySetsAdded.unsubscribe();
subscriptionOndropFired.unsubscribe();
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [displaySetService, dataSource, getImageSrc, thumbnailImageSrcMap, trackedSeries, viewports]);
useEffect(() => {
// TODO: Will this always hold _all_ the displaySets we care about?
// DISPLAY_SETS_CHANGED returns `DisplaySerService.activeDisplaySets`
const SubscriptionDisplaySetsChanged = displaySetService.subscribe(
displaySetService.EVENTS.DISPLAY_SETS_CHANGED,
changedDisplaySets => {
const mappedDisplaySets = _mapDisplaySets(
changedDisplaySets,
displaySetsLoadingState,
thumbnailImageSrcMap,
trackedSeries,
viewports,
viewportGridService,
dataSource,
displaySetService,
uiDialogService,
uiNotificationService
);
setDisplaySets(mappedDisplaySets);
}
);
const SubscriptionDisplaySetMetaDataInvalidated = displaySetService.subscribe(
displaySetService.EVENTS.DISPLAY_SET_SERIES_METADATA_INVALIDATED,
() => {
const mappedDisplaySets = _mapDisplaySets(
displaySetService.getActiveDisplaySets(),
displaySetsLoadingState,
thumbnailImageSrcMap,
trackedSeries,
viewports,
viewportGridService,
dataSource,
displaySetService,
uiDialogService,
uiNotificationService
);
setDisplaySets(mappedDisplaySets);
}
);
return () => {
SubscriptionDisplaySetsChanged.unsubscribe();
SubscriptionDisplaySetMetaDataInvalidated.unsubscribe();
};
}, [
displaySetsLoadingState,
thumbnailImageSrcMap,
trackedSeries,
viewports,
dataSource,
displaySetService,
]);
const tabs = createStudyBrowserTabs(StudyInstanceUIDs, studyDisplayList, displaySets);
// TODO: Should not fire this on "close"
function _handleStudyClick(StudyInstanceUID) {
const shouldCollapseStudy = expandedStudyInstanceUIDs.includes(StudyInstanceUID);
const updatedExpandedStudyInstanceUIDs = shouldCollapseStudy
? [...expandedStudyInstanceUIDs.filter(stdyUid => stdyUid !== StudyInstanceUID)]
: [...expandedStudyInstanceUIDs, StudyInstanceUID];
setExpandedStudyInstanceUIDs(updatedExpandedStudyInstanceUIDs);
if (!shouldCollapseStudy) {
const madeInClient = true;
requestDisplaySetCreationForStudy(displaySetService, StudyInstanceUID, madeInClient);
}
}
useEffect(() => {
if (jumpToDisplaySet) {
// Get element by displaySetInstanceUID
const displaySetInstanceUID = jumpToDisplaySet;
const element = document.getElementById(`thumbnail-${displaySetInstanceUID}`);
if (element && typeof element.scrollIntoView === 'function') {
// TODO: Any way to support IE here?
element.scrollIntoView({ behavior: 'smooth' });
setJumpToDisplaySet(null);
}
}
}, [jumpToDisplaySet, expandedStudyInstanceUIDs, activeTabName]);
useEffect(() => {
if (!jumpToDisplaySet) {
return;
}
const displaySetInstanceUID = jumpToDisplaySet;
// Set the activeTabName and expand the study
const thumbnailLocation = _findTabAndStudyOfDisplaySet(displaySetInstanceUID, tabs);
if (!thumbnailLocation) {
console.warn('jumpToThumbnail: displaySet thumbnail not found.');
return;
}
const { tabName, StudyInstanceUID } = thumbnailLocation;
setActiveTabName(tabName);
const studyExpanded = expandedStudyInstanceUIDs.includes(StudyInstanceUID);
if (!studyExpanded) {
const updatedExpandedStudyInstanceUIDs = [...expandedStudyInstanceUIDs, StudyInstanceUID];
setExpandedStudyInstanceUIDs(updatedExpandedStudyInstanceUIDs);
}
}, [expandedStudyInstanceUIDs, jumpToDisplaySet, tabs]);
}, []);
const onClickUntrack = displaySetInstanceUID => {
const onConfirm = () => {
const displaySet = displaySetService.getDisplaySetByUID(displaySetInstanceUID);
@@ -458,55 +75,74 @@ export default function PanelStudyBrowserTracking({
content: UntrackSeriesModal,
contentProps: {
onConfirm,
message: 'Are you sure you want to untrack this series?',
},
});
};
return (
<>
<>
<PanelStudyBrowserHeader
viewPresets={viewPresets}
updateViewPresetValue={updateViewPresetValue}
actionIcons={actionIcons}
updateActionIconValue={updateActionIconValue}
/>
<Separator
orientation="horizontal"
className="bg-black"
thickness="2px"
/>
</>
// Custom mapping function to add tracking data to display sets
const mapDisplaySetsWithTracking = (
displaySets,
displaySetLoadingState,
thumbnailImageSrcMap,
viewports
) => {
const thumbnailDisplaySets = [];
const thumbnailNoImageDisplaySets = [];
displaySets
.filter(ds => !ds.excludeFromThumbnailBrowser)
.forEach(ds => {
const { thumbnailSrc, displaySetInstanceUID } = ds;
const componentType = getComponentType(ds);
<StudyBrowser
tabs={tabs}
servicesManager={servicesManager}
activeTabName={activeTabName}
expandedStudyInstanceUIDs={expandedStudyInstanceUIDs}
onClickStudy={_handleStudyClick}
onClickTab={clickedTabName => {
setActiveTabName(clickedTabName);
}}
onClickUntrack={displaySetInstanceUID => {
onClickUntrack(displaySetInstanceUID);
}}
onClickThumbnail={() => {}}
onDoubleClickThumbnail={onDoubleClickThumbnailHandler}
activeDisplaySetInstanceUIDs={activeViewportDisplaySetInstanceUIDs}
showSettings={actionIcons.find(icon => icon.id === 'settings').value}
viewPresets={viewPresets}
ThumbnailMenuItems={MoreDropdownMenu({
commandsManager,
servicesManager,
menuItemsKey: 'studyBrowser.thumbnailMenuItems',
})}
StudyMenuItems={MoreDropdownMenu({
commandsManager,
servicesManager,
menuItemsKey: 'studyBrowser.studyMenuItems',
})}
/>
</>
const array =
componentType === 'thumbnailTracked' ? thumbnailDisplaySets : thumbnailNoImageDisplaySets;
const loadingProgress = displaySetLoadingState?.[displaySetInstanceUID];
array.push({
displaySetInstanceUID,
description: ds.SeriesDescription || '',
seriesNumber: ds.SeriesNumber,
modality: ds.Modality,
seriesDate: ds.SeriesDate ? new Date(ds.SeriesDate).toLocaleDateString() : '',
numInstances: ds.numImageFrames,
loadingProgress,
countIcon: ds.countIcon,
messages: ds.messages,
StudyInstanceUID: ds.StudyInstanceUID,
componentType,
imageSrc: thumbnailSrc || thumbnailImageSrcMap[displaySetInstanceUID],
dragData: {
type: 'displayset',
displaySetInstanceUID,
},
isTracked: trackedSeries.includes(ds.SeriesInstanceUID),
isHydratedForDerivedDisplaySet: ds.isHydrated,
});
});
return [...thumbnailDisplaySets, ...thumbnailNoImageDisplaySets];
};
// Override component type to use tracking specific components
const getComponentType = ds => {
if (thumbnailNoImageModalities.includes(ds.Modality) || ds?.unsupported) {
return 'thumbnailNoImage';
}
return 'thumbnailTracked';
};
return (
<PanelStudyBrowser
getImageSrc={getImageSrc}
getStudiesForPatientByMRN={getStudiesForPatientByMRN}
requestDisplaySetCreationForStudy={requestDisplaySetCreationForStudy}
dataSource={dataSource}
customMapDisplaySets={mapDisplaySetsWithTracking}
onClickUntrack={onClickUntrack}
onDoubleClickThumbnailHandlerCallBack={checkDirtyMeasurements}
/>
);
}
@@ -518,120 +154,3 @@ PanelStudyBrowserTracking.propTypes = {
getStudiesForPatientByMRN: PropTypes.func.isRequired,
requestDisplaySetCreationForStudy: PropTypes.func.isRequired,
};
function getImageIdForThumbnail(displaySet: any, imageIds: any) {
let imageId;
if (displaySet.isDynamicVolume) {
const timePoints = displaySet.dynamicVolumeInfo.timePoints;
const middleIndex = Math.floor(timePoints.length / 2);
const middleTimePointImageIds = timePoints[middleIndex];
imageId = middleTimePointImageIds[Math.floor(middleTimePointImageIds.length / 2)];
} else {
imageId = imageIds[Math.floor(imageIds.length / 2)];
}
return imageId;
}
/**
* Maps from the DataSource's format to a naturalized object
*
* @param {*} studies
*/
function _mapDataSourceStudies(studies) {
return studies.map(study => {
// TODO: Why does the data source return in this format?
return {
AccessionNumber: study.accession,
StudyDate: study.date,
StudyDescription: study.description,
NumInstances: study.instances,
ModalitiesInStudy: study.modalities,
PatientID: study.mrn,
PatientName: study.patientName,
StudyInstanceUID: study.studyInstanceUid,
StudyTime: study.time,
};
});
}
function _mapDisplaySets(
displaySets,
displaySetLoadingState,
thumbnailImageSrcMap,
trackedSeriesInstanceUIDs,
viewports, // TODO: make array of `displaySetInstanceUIDs`?
viewportGridService,
dataSource,
displaySetService,
uiDialogService,
uiNotificationService
) {
const thumbnailDisplaySets = [];
const thumbnailNoImageDisplaySets = [];
displaySets
.filter(ds => !ds.excludeFromThumbnailBrowser)
.forEach(ds => {
const { thumbnailSrc, displaySetInstanceUID } = ds; // thumbnailImageSrcMap[ds.displaySetInstanceUID];
const componentType = _getComponentType(ds);
const array =
componentType === 'thumbnailTracked' ? thumbnailDisplaySets : thumbnailNoImageDisplaySets;
const loadingProgress = displaySetLoadingState?.[displaySetInstanceUID];
const thumbnailProps = {
displaySetInstanceUID,
description: ds.SeriesDescription,
seriesNumber: ds.SeriesNumber,
modality: ds.Modality,
seriesDate: formatDate(ds.SeriesDate),
numInstances: ds.numImageFrames,
loadingProgress,
countIcon: ds.countIcon,
messages: ds.messages,
StudyInstanceUID: ds.StudyInstanceUID,
componentType,
imageSrc: thumbnailSrc || thumbnailImageSrcMap[displaySetInstanceUID],
dragData: {
type: 'displayset',
displaySetInstanceUID,
// .. Any other data to pass
},
isTracked: trackedSeriesInstanceUIDs.includes(ds.SeriesInstanceUID),
isHydratedForDerivedDisplaySet: ds.isHydrated,
};
array.push(thumbnailProps);
});
return [...thumbnailDisplaySets, ...thumbnailNoImageDisplaySets];
}
function _getComponentType(ds) {
if (thumbnailNoImageModalities.includes(ds.Modality) || ds?.unsupported) {
return 'thumbnailNoImage';
}
return 'thumbnailTracked';
}
function _findTabAndStudyOfDisplaySet(displaySetInstanceUID, tabs) {
for (let t = 0; t < tabs.length; t++) {
const { studies } = tabs[t];
for (let s = 0; s < studies.length; s++) {
const { displaySets } = studies[s];
for (let d = 0; d < displaySets.length; d++) {
const displaySet = displaySets[d];
if (displaySet.displaySetInstanceUID === displaySetInstanceUID) {
return {
tabName: tabs[t].name,
StudyInstanceUID: studies[s].studyInstanceUid,
};
}
}
}
}
}
@@ -1,11 +1,11 @@
import React from 'react';
import { FooterAction } from '@ohif/ui-next';
export function UntrackSeriesModal({ hide, onConfirm }) {
export function UntrackSeriesModal({ hide, onConfirm, message }) {
return (
<div className="text-foreground">
<div>
<p>Are you sure you want to untrack this series?</p>
<p>{message}</p>
<p className="mt-2">
This action cannot be undone and will delete all your existing measurements.
</p>
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/extension-test
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-test
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-test
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-test
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/extension-test
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-test",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "OHIF extension used inside e2e testing",
"author": "OHIF",
"license": "MIT",
@@ -30,8 +30,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/ui": "3.10.0-beta.148",
"dcmjs": "0.38.0",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/extension-tmtv
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/extension-tmtv
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-tmtv
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/extension-tmtv
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/extension-tmtv
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-tmtv",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "OHIF extension for Total Metabolic Tumor Volume",
"author": "OHIF",
"license": "MIT",
@@ -30,8 +30,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/ui": "3.10.0-beta.148",
"dcmjs": "*",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
+1 -1
View File
@@ -1,5 +1,5 @@
{
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"packages": ["extensions/*", "platform/*", "modes/*", "addOns/externals/*"],
"npmClient": "yarn"
}
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-basic-dev-mode",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "Basic OHIF Viewer Using Cornerstone",
"author": "OHIF",
"license": "MIT",
@@ -31,12 +31,12 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/extension-dicom-pdf": "3.10.0-beta.144",
"@ohif/extension-dicom-video": "3.10.0-beta.144"
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/extension-dicom-pdf": "3.10.0-beta.148",
"@ohif/extension-dicom-video": "3.10.0-beta.148"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/mode-test
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/mode-test
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-test
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-test
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-test",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "Basic mode for testing",
"author": "OHIF",
"license": "MIT",
@@ -34,14 +34,14 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/extension-dicom-pdf": "3.10.0-beta.144",
"@ohif/extension-dicom-video": "3.10.0-beta.144",
"@ohif/extension-measurement-tracking": "3.10.0-beta.144",
"@ohif/extension-test": "3.10.0-beta.144"
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/extension-dicom-pdf": "3.10.0-beta.148",
"@ohif/extension-dicom-video": "3.10.0-beta.148",
"@ohif/extension-measurement-tracking": "3.10.0-beta.148",
"@ohif/extension-test": "3.10.0-beta.148"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
+35
View File
@@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/mode-longitudinal
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/mode-longitudinal
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-longitudinal
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/mode-longitudinal
+10 -10
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-longitudinal",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "Longitudinal Workflow",
"author": "OHIF",
"license": "MIT",
@@ -34,15 +34,15 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/extension-dicom-pdf": "3.10.0-beta.144",
"@ohif/extension-dicom-video": "3.10.0-beta.144",
"@ohif/extension-measurement-tracking": "3.10.0-beta.144"
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/extension-dicom-pdf": "3.10.0-beta.148",
"@ohif/extension-dicom-video": "3.10.0-beta.148",
"@ohif/extension-measurement-tracking": "3.10.0-beta.148"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
+8 -1
View File
@@ -82,7 +82,8 @@ function modeFactory({ modeConfiguration }) {
* Lifecycle hooks
*/
onModeEnter: function ({ servicesManager, extensionManager, commandsManager }: withAppTypes) {
const { measurementService, toolbarService, toolGroupService } = servicesManager.services;
const { measurementService, toolbarService, toolGroupService, customizationService } =
servicesManager.services;
measurementService.clearMeasurements();
@@ -135,6 +136,12 @@ function modeFactory({ modeConfiguration }) {
'WindowLevelRegion',
]);
customizationService.setCustomizations({
'panelSegmentation.disableEditing': {
$set: true,
},
});
// // ActivatePanel event trigger for when a segmentation or measurement is added.
// // Do not force activation so as to respect the state the user may have left the UI in.
// _activatePanelTriggersSubscriptions = [
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/mode-microscopy
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/mode-microscopy
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-microscopy
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-microscopy
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/mode-microscopy
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-microscopy",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "OHIF mode for DICOM microscopy",
"author": "OHIF",
"license": "MIT",
@@ -35,8 +35,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-dicom-microscopy": "3.10.0-beta.144"
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-dicom-microscopy": "3.10.0-beta.148"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/mode-preclinical-4d
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/mode-preclinical-4d
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-preclinical-4d
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-preclinical-4d
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/mode-preclinical-4d
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-preclinical-4d",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "4D Workflow",
"author": "OHIF",
"license": "MIT",
@@ -33,12 +33,12 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dynamic-volume": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/extension-tmtv": "3.10.0-beta.144"
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dynamic-volume": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/extension-tmtv": "3.10.0-beta.148"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+35
View File
@@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/mode-segmentation
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/mode-segmentation
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-segmentation
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-segmentation",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "OHIF segmentation mode which enables labelmap segmentation read/edit/export",
"author": "@ohif",
"license": "MIT",
@@ -35,14 +35,14 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/extension-dicom-pdf": "3.10.0-beta.144",
"@ohif/extension-dicom-video": "3.10.0-beta.144"
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/extension-dicom-pdf": "3.10.0-beta.148",
"@ohif/extension-dicom-video": "3.10.0-beta.148"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
+1 -1
View File
@@ -192,7 +192,7 @@ function modeFactory({ modeConfiguration }) {
/** HangingProtocol used by the mode */
// Commented out to just use the most applicable registered hanging protocol
// The example is used for a grid layout to specify that as a preferred layout
// hangingProtocol: ['@ohif/mnGrid'],
hangingProtocol: ['@ohif/mnGrid'],
/** SopClassHandlers used by the mode */
sopClassHandlers: [ohif.sopClassHandler, segmentation.sopClassHandler, dicomRT.sopClassHandler],
};
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/mode-tmtv
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/mode-tmtv
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-tmtv
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/mode-tmtv
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/mode-tmtv
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-tmtv",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "Total Metabolic Tumor Volume Workflow",
"author": "OHIF",
"license": "MIT",
@@ -34,13 +34,13 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/extension-dicom-pdf": "3.10.0-beta.144",
"@ohif/extension-dicom-video": "3.10.0-beta.144",
"@ohif/extension-measurement-tracking": "3.10.0-beta.144"
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/extension-dicom-pdf": "3.10.0-beta.148",
"@ohif/extension-dicom-video": "3.10.0-beta.148",
"@ohif/extension-measurement-tracking": "3.10.0-beta.148"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
+38
View File
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
### Features
* Automate tracking prompts for a less disruptive annotation workflow ([#4822](https://github.com/OHIF/Viewers/issues/4822)) ([54fded5](https://github.com/OHIF/Viewers/commit/54fded554e934f2f75e00d456ebad7692d561225))
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/app
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/app
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
+19 -19
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/app",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"productVersion": "3.4.0",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
@@ -54,25 +54,25 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.4",
"@cornerstonejs/codec-openjph": "^2.4.5",
"@cornerstonejs/dicom-image-loader": "^3.8.2",
"@cornerstonejs/dicom-image-loader": "^3.8.4",
"@emotion/serialize": "^1.1.3",
"@ohif/core": "3.10.0-beta.144",
"@ohif/extension-cornerstone": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.144",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.144",
"@ohif/extension-default": "3.10.0-beta.144",
"@ohif/extension-dicom-microscopy": "3.10.0-beta.144",
"@ohif/extension-dicom-pdf": "3.10.0-beta.144",
"@ohif/extension-dicom-video": "3.10.0-beta.144",
"@ohif/extension-test": "3.10.0-beta.144",
"@ohif/i18n": "3.10.0-beta.144",
"@ohif/mode-basic-dev-mode": "3.10.0-beta.144",
"@ohif/mode-longitudinal": "3.10.0-beta.144",
"@ohif/mode-microscopy": "3.10.0-beta.144",
"@ohif/mode-test": "3.10.0-beta.144",
"@ohif/ui": "3.10.0-beta.144",
"@ohif/ui-next": "3.10.0-beta.144",
"@ohif/core": "3.10.0-beta.148",
"@ohif/extension-cornerstone": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.148",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.148",
"@ohif/extension-default": "3.10.0-beta.148",
"@ohif/extension-dicom-microscopy": "3.10.0-beta.148",
"@ohif/extension-dicom-pdf": "3.10.0-beta.148",
"@ohif/extension-dicom-video": "3.10.0-beta.148",
"@ohif/extension-test": "3.10.0-beta.148",
"@ohif/i18n": "3.10.0-beta.148",
"@ohif/mode-basic-dev-mode": "3.10.0-beta.148",
"@ohif/mode-longitudinal": "3.10.0-beta.148",
"@ohif/mode-microscopy": "3.10.0-beta.148",
"@ohif/mode-test": "3.10.0-beta.148",
"@ohif/ui": "3.10.0-beta.148",
"@ohif/ui-next": "3.10.0-beta.148",
"@svgr/webpack": "^8.1.0",
"@types/react": "^18.3.3",
"classnames": "^2.3.2",
+1
View File
@@ -47,6 +47,7 @@ async function appInit(appConfigOrFunc, defaultExtensions, defaultModes) {
};
// Default the peer import function
appConfig.peerImport ||= peerImport;
appConfig.measurementTrackingMode ||= 'standard';
const extensionManager = new ExtensionManager({
commandsManager,
+19 -4
View File
@@ -257,6 +257,7 @@ function ViewerViewportGrid(props: withAppTypes) {
}, [viewports, _getUpdatedViewports]);
const onDropHandler = (viewportId, { displaySetInstanceUID }) => {
const { viewportGridService } = servicesManager.services;
const customOnDropHandler = customizationService.getCustomization('customOnDropHandler');
const dropHandlerPromise = customOnDropHandler({
...props,
@@ -264,17 +265,31 @@ function ViewerViewportGrid(props: withAppTypes) {
displaySetInstanceUID,
appConfig,
});
dropHandlerPromise.then(({ handled }) => {
if (!handled) {
const updatedViewports = _getUpdatedViewports(viewportId, displaySetInstanceUID);
viewportGridService.setDisplaySetsForViewports(updatedViewports);
}
});
viewportGridService.publishViewportOnDropHandled({ displaySetInstanceUID });
};
// Store previous isReferenceViewable values to avoid infinite loops
const prevReferenceViewableMap = useRef(new Map());
// Track viewports that need isReferenceViewable updates
const viewportsToUpdate = useRef(new Map());
// Apply isReferenceViewable updates in an effect, not during render
useEffect(() => {
const updates = viewportsToUpdate.current;
if (updates.size > 0) {
updates.forEach((isReferenceViewable, viewportId) => {
viewportGridService.setIsReferenceViewable(viewportId, isReferenceViewable);
prevReferenceViewableMap.current.set(viewportId, isReferenceViewable);
});
viewportsToUpdate.current.clear();
}
});
const getViewportPanes = useCallback(() => {
const viewportPanes = [];
@@ -313,7 +328,7 @@ function ViewerViewportGrid(props: withAppTypes) {
uiNotificationService
);
// Only update isReferenceViewable if it's changed to avoid render loops
// Only queue isReferenceViewable updates if it's changed to avoid render loops
// We need to handle both function and non-function values
if (viewportId) {
const prevValue = prevReferenceViewableMap.current.get(viewportId);
@@ -323,8 +338,8 @@ function ViewerViewportGrid(props: withAppTypes) {
// For non-functions, compare directly. For functions, we treat them as always different
// (this is conservative but safe)
if (!isSameFunction && prevValue !== isReferenceViewable) {
viewportGridService.setIsReferenceViewable(viewportId, isReferenceViewable);
prevReferenceViewableMap.current.set(viewportId, isReferenceViewable);
// Queue the update instead of doing it during render
viewportsToUpdate.current.set(viewportId, isReferenceViewable);
}
}
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
**Note:** Version bump only for package @ohif/cli
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/cli
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/cli
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
**Note:** Version bump only for package @ohif/cli
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
**Note:** Version bump only for package @ohif/cli
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/cli",
"version": "3.10.0-beta.144",
"version": "3.10.0-beta.148",
"description": "A CLI to bootstrap new OHIF extension or mode",
"type": "module",
"main": "src/index.js",
+38
View File
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.10.0-beta.148](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.147...v3.10.0-beta.148) (2025-04-04)
### Features
* Automate tracking prompts for a less disruptive annotation workflow ([#4822](https://github.com/OHIF/Viewers/issues/4822)) ([54fded5](https://github.com/OHIF/Viewers/commit/54fded554e934f2f75e00d456ebad7692d561225))
# [3.10.0-beta.147](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.146...v3.10.0-beta.147) (2025-04-03)
**Note:** Version bump only for package @ohif/core
# [3.10.0-beta.146](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.145...v3.10.0-beta.146) (2025-04-02)
**Note:** Version bump only for package @ohif/core
# [3.10.0-beta.145](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.144...v3.10.0-beta.145) (2025-04-02)
### Bug Fixes
* **seg:** Enhance segmentation tools and UI, refactor code, and update dependencies ([#4915](https://github.com/OHIF/Viewers/issues/4915)) ([8432d5f](https://github.com/OHIF/Viewers/commit/8432d5f6330b300ac6760b32372be382210ed05b))
# [3.10.0-beta.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
Loaded 100 of 133 files, more files were not shown because too many files have changed in this diff. Show more