diff --git a/CHANGELOG.md b/CHANGELOG.md
index 816ab311bf1..66b85ef0c38 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/commit.txt b/commit.txt
index 739b5810168..4e9e567b090 100644
--- a/commit.txt
+++ b/commit.txt
@@ -1 +1 @@
-d250d04580883446fcb8d748b2a97c5c198922af
\ No newline at end of file
+8192e348eca993fec331d4963efe88f9a730eceb
\ No newline at end of file
diff --git a/extensions/cornerstone-dicom-rt/CHANGELOG.md b/extensions/cornerstone-dicom-rt/CHANGELOG.md
index f6ab1b9b728..575e74b13cf 100644
--- a/extensions/cornerstone-dicom-rt/CHANGELOG.md
+++ b/extensions/cornerstone-dicom-rt/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
diff --git a/extensions/cornerstone-dicom-rt/package.json b/extensions/cornerstone-dicom-rt/package.json
index 894f2551177..6cd13d9bb28 100644
--- a/extensions/cornerstone-dicom-rt/package.json
+++ b/extensions/cornerstone-dicom-rt/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-rt",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"description": "DICOM RT read workflow",
"author": "OHIF",
"license": "MIT",
@@ -33,10 +33,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
- "@ohif/core": "3.8.0-beta.86",
- "@ohif/extension-cornerstone": "3.8.0-beta.86",
- "@ohif/extension-default": "3.8.0-beta.86",
- "@ohif/i18n": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone": "3.8.0-beta.87",
+ "@ohif/extension-default": "3.8.0-beta.87",
+ "@ohif/i18n": "3.8.0-beta.87",
"prop-types": "^15.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
diff --git a/extensions/cornerstone-dicom-seg/CHANGELOG.md b/extensions/cornerstone-dicom-seg/CHANGELOG.md
index c4e9165d38b..3211958956e 100644
--- a/extensions/cornerstone-dicom-seg/CHANGELOG.md
+++ b/extensions/cornerstone-dicom-seg/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/extensions/cornerstone-dicom-seg/package.json b/extensions/cornerstone-dicom-seg/package.json
index 450769f9513..0daddefb298 100644
--- a/extensions/cornerstone-dicom-seg/package.json
+++ b/extensions/cornerstone-dicom-seg/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-seg",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"description": "DICOM SEG read workflow",
"author": "OHIF",
"license": "MIT",
@@ -33,10 +33,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
- "@ohif/core": "3.8.0-beta.86",
- "@ohif/extension-cornerstone": "3.8.0-beta.86",
- "@ohif/extension-default": "3.8.0-beta.86",
- "@ohif/i18n": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone": "3.8.0-beta.87",
+ "@ohif/extension-default": "3.8.0-beta.87",
+ "@ohif/i18n": "3.8.0-beta.87",
"prop-types": "^15.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
@@ -46,8 +46,8 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@cornerstonejs/adapters": "^1.70.9",
- "@cornerstonejs/core": "^1.70.9",
+ "@cornerstonejs/adapters": "^1.70.10",
+ "@cornerstonejs/core": "^1.70.10",
"@kitware/vtk.js": "30.3.3",
"react-color": "^2.19.3"
}
diff --git a/extensions/cornerstone-dicom-sr/CHANGELOG.md b/extensions/cornerstone-dicom-sr/CHANGELOG.md
index fd63b2a760a..7b2a83d4524 100644
--- a/extensions/cornerstone-dicom-sr/CHANGELOG.md
+++ b/extensions/cornerstone-dicom-sr/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/extensions/cornerstone-dicom-sr/package.json b/extensions/cornerstone-dicom-sr/package.json
index a30cc98df8a..d4a2782f96b 100644
--- a/extensions/cornerstone-dicom-sr/package.json
+++ b/extensions/cornerstone-dicom-sr/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-sr",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/extension-cornerstone": "3.8.0-beta.86",
- "@ohif/extension-measurement-tracking": "3.8.0-beta.86",
- "@ohif/ui": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone": "3.8.0-beta.87",
+ "@ohif/extension-measurement-tracking": "3.8.0-beta.87",
+ "@ohif/ui": "3.8.0-beta.87",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
@@ -46,9 +46,9 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@cornerstonejs/adapters": "^1.70.9",
- "@cornerstonejs/core": "^1.70.9",
- "@cornerstonejs/tools": "^1.70.9",
+ "@cornerstonejs/adapters": "^1.70.10",
+ "@cornerstonejs/core": "^1.70.10",
+ "@cornerstonejs/tools": "^1.70.10",
"classnames": "^2.3.2"
}
}
diff --git a/extensions/cornerstone-dynamic-volume/CHANGELOG.md b/extensions/cornerstone-dynamic-volume/CHANGELOG.md
index 7331723f469..5cc163a12d3 100644
--- a/extensions/cornerstone-dynamic-volume/CHANGELOG.md
+++ b/extensions/cornerstone-dynamic-volume/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/extensions/cornerstone-dynamic-volume/package.json b/extensions/cornerstone-dynamic-volume/package.json
index d8100e68c81..afdeb47be2a 100644
--- a/extensions/cornerstone-dynamic-volume/package.json
+++ b/extensions/cornerstone-dynamic-volume/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dynamic-volume",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/extension-cornerstone": "3.8.0-beta.86",
- "@ohif/extension-default": "3.8.0-beta.86",
- "@ohif/i18n": "3.8.0-beta.86",
- "@ohif/ui": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone": "3.8.0-beta.87",
+ "@ohif/extension-default": "3.8.0-beta.87",
+ "@ohif/i18n": "3.8.0-beta.87",
+ "@ohif/ui": "3.8.0-beta.87",
"dcmjs": "^0.29.5",
"dicom-parser": "^1.8.21",
"hammerjs": "^2.0.8",
@@ -42,9 +42,9 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@cornerstonejs/core": "^1.70.9",
- "@cornerstonejs/streaming-image-volume-loader": "^1.70.9",
- "@cornerstonejs/tools": "^1.70.9",
+ "@cornerstonejs/core": "^1.70.10",
+ "@cornerstonejs/streaming-image-volume-loader": "^1.70.10",
+ "@cornerstonejs/tools": "^1.70.10",
"classnames": "^2.3.2"
}
}
diff --git a/extensions/cornerstone-dynamic-volume/src/getPanelModule.tsx b/extensions/cornerstone-dynamic-volume/src/getPanelModule.tsx
index a32b5243d57..41f45384797 100644
--- a/extensions/cornerstone-dynamic-volume/src/getPanelModule.tsx
+++ b/extensions/cornerstone-dynamic-volume/src/getPanelModule.tsx
@@ -43,21 +43,21 @@ function getPanelModule({ commandsManager, extensionManager, servicesManager })
return [
{
name: 'dynamic-volume',
- iconName: 'group-layers',
+ iconName: 'tab-4d',
iconLabel: '4D Workflow',
label: '4D Workflow',
component: wrappedDynamicDataPanel,
},
{
name: 'dynamic-toolbox',
- iconName: 'group-layers',
+ iconName: 'tab-4d',
iconLabel: '4D Workflow',
label: 'Dynamic Toolbox',
component: wrappedDynamicToolbox,
},
{
name: 'dynamic-export',
- iconName: 'group-layers',
+ iconName: 'tab-4d',
iconLabel: '4D Workflow',
label: '4D Workflow',
component: wrappedDynamicExport,
diff --git a/extensions/cornerstone/CHANGELOG.md b/extensions/cornerstone/CHANGELOG.md
index 81e00816836..8d6bd6f371f 100644
--- a/extensions/cornerstone/CHANGELOG.md
+++ b/extensions/cornerstone/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/extensions/cornerstone/package.json b/extensions/cornerstone/package.json
index e48602a993a..9a8b237a062 100644
--- a/extensions/cornerstone/package.json
+++ b/extensions/cornerstone/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"description": "OHIF extension for Cornerstone",
"author": "OHIF",
"license": "MIT",
@@ -38,10 +38,10 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
- "@cornerstonejs/dicom-image-loader": "^1.70.9",
+ "@cornerstonejs/dicom-image-loader": "^1.70.10",
"@icr/polyseg-wasm": "^0.4.0",
- "@ohif/core": "3.8.0-beta.86",
- "@ohif/ui": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/ui": "3.8.0-beta.87",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.21",
"hammerjs": "^2.0.8",
@@ -55,10 +55,10 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@cornerstonejs/adapters": "^1.70.9",
- "@cornerstonejs/core": "^1.70.9",
- "@cornerstonejs/streaming-image-volume-loader": "^1.70.9",
- "@cornerstonejs/tools": "^1.70.9",
+ "@cornerstonejs/adapters": "^1.70.10",
+ "@cornerstonejs/core": "^1.70.10",
+ "@cornerstonejs/streaming-image-volume-loader": "^1.70.10",
+ "@cornerstonejs/tools": "^1.70.10",
"@icr/polyseg-wasm": "^0.4.0",
"@kitware/vtk.js": "30.3.3",
"html2canvas": "^1.4.1",
diff --git a/extensions/cornerstone/src/commandsModule.ts b/extensions/cornerstone/src/commandsModule.ts
index f72a710510d..ecabf31fb64 100644
--- a/extensions/cornerstone/src/commandsModule.ts
+++ b/extensions/cornerstone/src/commandsModule.ts
@@ -346,9 +346,9 @@ function commandsModule({
}
}
},
- setToolActiveToolbar: ({ value, itemId, toolGroupIds = [] }) => {
+ setToolActiveToolbar: ({ value, itemId, toolName, toolGroupIds = [] }) => {
// Sometimes it is passed as value (tools with options), sometimes as itemId (toolbar buttons)
- const toolName = itemId || value;
+ toolName = toolName || itemId || value;
toolGroupIds = toolGroupIds.length ? toolGroupIds : toolGroupService.getToolGroupIds();
diff --git a/extensions/cornerstone/src/components/ViewportWindowLevel/getViewportVolumeHistogram.ts b/extensions/cornerstone/src/components/ViewportWindowLevel/getViewportVolumeHistogram.ts
index 2d72229fc95..167d49f8a02 100644
--- a/extensions/cornerstone/src/components/ViewportWindowLevel/getViewportVolumeHistogram.ts
+++ b/extensions/cornerstone/src/components/ViewportWindowLevel/getViewportVolumeHistogram.ts
@@ -2,10 +2,12 @@ import { getWebWorkerManager } from '@cornerstonejs/core';
const workerManager = getWebWorkerManager();
-const options = {
- // maxWorkerInstances: 1,
- // overwrite: false
- autoTerminationOnIdle: 1000,
+const WorkerOptions = {
+ maxWorkerInstances: 1,
+ autoTerminateOnIdle: {
+ enabled: true,
+ idleTimeThreshold: 1000,
+ },
};
// Register the task
@@ -15,9 +17,9 @@ const workerFn = () => {
});
};
-workerManager.registerWorker('histogram-worker', workerFn, options);
-
const getViewportVolumeHistogram = async (viewport, volume, options?) => {
+ workerManager.registerWorker('histogram-worker', workerFn, WorkerOptions);
+
if (!volume?.loadStatus.loaded) {
return undefined;
}
diff --git a/extensions/cornerstone/src/init.tsx b/extensions/cornerstone/src/init.tsx
index 9e5f2c38c49..52993059b87 100644
--- a/extensions/cornerstone/src/init.tsx
+++ b/extensions/cornerstone/src/init.tsx
@@ -279,19 +279,18 @@ export default async function init({
eventTarget.addEventListener(EVENTS.ELEMENT_DISABLED, elementDisabledHandler.bind(null));
colormaps.forEach(registerColormap);
- // Create a debounced function that shows the notification
- const debouncedShowNotification = debounce(detail => {
- uiNotificationService.show({
- title: detail.type,
- message: detail.message,
- type: 'error',
- });
- }, 300);
-
// Event listener
- eventTarget.addEventListener(EVENTS.ERROR_EVENT, ({ detail }) => {
- debouncedShowNotification(detail);
- });
+ eventTarget.addEventListenerDebounced(
+ EVENTS.ERROR_EVENT,
+ ({ detail }) => {
+ uiNotificationService.show({
+ title: detail.type,
+ message: detail.message,
+ type: 'error',
+ });
+ },
+ 1000
+ );
}
function CPUModal() {
diff --git a/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts b/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts
index a5bb5c8528c..5365fa947de 100644
--- a/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts
+++ b/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts
@@ -1045,28 +1045,33 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
private performResize() {
const isImmediate = false;
- const viewports = this.getRenderingEngine().getViewports();
+ try {
+ const viewports = this.getRenderingEngine().getViewports();
- // Store the current position presentations for each viewport.
- viewports.forEach(({ id }) => {
- const presentation = this.getPositionPresentation(id);
- this.beforeResizePositionPresentations.set(id, presentation);
- });
+ // Store the current position presentations for each viewport.
+ viewports.forEach(({ id }) => {
+ const presentation = this.getPositionPresentation(id);
+ this.beforeResizePositionPresentations.set(id, presentation);
+ });
- // Resize the rendering engine and render.
- const renderingEngine = this.renderingEngine;
- renderingEngine.resize(isImmediate);
- renderingEngine.render();
+ // Resize the rendering engine and render.
+ const renderingEngine = this.renderingEngine;
+ renderingEngine.resize(isImmediate);
+ renderingEngine.render();
- // Reset the camera for viewports that should reset their camera on resize,
- // which means only those viewports that have a zoom level of 1.
- this.beforeResizePositionPresentations.forEach((positionPresentation, viewportId) => {
- this.setPresentations(viewportId, { positionPresentation });
- });
+ // Reset the camera for viewports that should reset their camera on resize,
+ // which means only those viewports that have a zoom level of 1.
+ this.beforeResizePositionPresentations.forEach((positionPresentation, viewportId) => {
+ this.setPresentations(viewportId, { positionPresentation });
+ });
- // Resize and render the rendering engine again.
- renderingEngine.resize(isImmediate);
- renderingEngine.render();
+ // Resize and render the rendering engine again.
+ renderingEngine.resize(isImmediate);
+ renderingEngine.render();
+ } catch (e) {
+ // This can happen if the resize is too close to navigation or shutdown
+ console.warn('Caught resize exception', e);
+ }
}
private resetGridResizeTimeout() {
diff --git a/extensions/default/CHANGELOG.md b/extensions/default/CHANGELOG.md
index 02be36375ea..913320166a9 100644
--- a/extensions/default/CHANGELOG.md
+++ b/extensions/default/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/extension-default
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/extensions/default/package.json b/extensions/default/package.json
index 72b50dd36e9..95a4f0bc13d 100644
--- a/extensions/default/package.json
+++ b/extensions/default/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-default",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/i18n": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/i18n": "3.8.0-beta.87",
"dcmjs": "^0.29.12",
"dicomweb-client": "^0.10.4",
"prop-types": "^15.6.2",
diff --git a/extensions/dicom-microscopy/CHANGELOG.md b/extensions/dicom-microscopy/CHANGELOG.md
index 9f91ecdb5d5..053d711a9b3 100644
--- a/extensions/dicom-microscopy/CHANGELOG.md
+++ b/extensions/dicom-microscopy/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/extension-dicom-microscopy
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
diff --git a/extensions/dicom-microscopy/package.json b/extensions/dicom-microscopy/package.json
index 568e1d86672..c14ee4822cf 100644
--- a/extensions/dicom-microscopy/package.json
+++ b/extensions/dicom-microscopy/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-microscopy",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/extension-default": "3.8.0-beta.86",
- "@ohif/i18n": "3.8.0-beta.86",
- "@ohif/ui": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-default": "3.8.0-beta.87",
+ "@ohif/i18n": "3.8.0-beta.87",
+ "@ohif/ui": "3.8.0-beta.87",
"prop-types": "^15.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
diff --git a/extensions/dicom-pdf/CHANGELOG.md b/extensions/dicom-pdf/CHANGELOG.md
index e169f30b8b5..96351f5d6c5 100644
--- a/extensions/dicom-pdf/CHANGELOG.md
+++ b/extensions/dicom-pdf/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/extension-dicom-pdf
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
diff --git a/extensions/dicom-pdf/package.json b/extensions/dicom-pdf/package.json
index 643d936bc83..920435914a0 100644
--- a/extensions/dicom-pdf/package.json
+++ b/extensions/dicom-pdf/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-pdf",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/ui": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/ui": "3.8.0-beta.87",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
diff --git a/extensions/dicom-video/CHANGELOG.md b/extensions/dicom-video/CHANGELOG.md
index 8997ff9eb0a..a1591bedb01 100644
--- a/extensions/dicom-video/CHANGELOG.md
+++ b/extensions/dicom-video/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/extension-dicom-video
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/extension-dicom-video
diff --git a/extensions/dicom-video/package.json b/extensions/dicom-video/package.json
index 03400cf4ca5..80711014749 100644
--- a/extensions/dicom-video/package.json
+++ b/extensions/dicom-video/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-video",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/ui": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/ui": "3.8.0-beta.87",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
diff --git a/extensions/measurement-tracking/CHANGELOG.md b/extensions/measurement-tracking/CHANGELOG.md
index e3e7058680e..f8b11b905e2 100644
--- a/extensions/measurement-tracking/CHANGELOG.md
+++ b/extensions/measurement-tracking/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/extensions/measurement-tracking/package.json b/extensions/measurement-tracking/package.json
index 1bf2091b71e..166528b0fc5 100644
--- a/extensions/measurement-tracking/package.json
+++ b/extensions/measurement-tracking/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-measurement-tracking",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"description": "Tracking features and functionality for basic image viewing",
"author": "OHIF Core Team",
"license": "MIT",
@@ -32,11 +32,11 @@
"start": "yarn run dev"
},
"peerDependencies": {
- "@cornerstonejs/core": "^1.70.9",
- "@cornerstonejs/tools": "^1.70.9",
- "@ohif/core": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.86",
- "@ohif/ui": "3.8.0-beta.86",
+ "@cornerstonejs/core": "^1.70.10",
+ "@cornerstonejs/tools": "^1.70.10",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.87",
+ "@ohif/ui": "3.8.0-beta.87",
"classnames": "^2.3.2",
"dcmjs": "^0.29.12",
"lodash.debounce": "^4.17.21",
@@ -48,7 +48,7 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@ohif/ui": "3.8.0-beta.86",
+ "@ohif/ui": "3.8.0-beta.87",
"@xstate/react": "^3.2.2",
"xstate": "^4.10.0"
}
diff --git a/extensions/test-extension/CHANGELOG.md b/extensions/test-extension/CHANGELOG.md
index 7a08fa1bbb9..10a7e5fd50b 100644
--- a/extensions/test-extension/CHANGELOG.md
+++ b/extensions/test-extension/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/extension-test
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/extension-test
diff --git a/extensions/test-extension/package.json b/extensions/test-extension/package.json
index 941ad5b3f37..33aaddebc77 100644
--- a/extensions/test-extension/package.json
+++ b/extensions/test-extension/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-test",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/ui": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/ui": "3.8.0-beta.87",
"dcmjs": "0.29.11",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
diff --git a/extensions/tmtv/CHANGELOG.md b/extensions/tmtv/CHANGELOG.md
index b1dbaa095b7..6b383d944ef 100644
--- a/extensions/tmtv/CHANGELOG.md
+++ b/extensions/tmtv/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/extension-tmtv
diff --git a/extensions/tmtv/package.json b/extensions/tmtv/package.json
index 4956d6323ff..6a83aa5d92a 100644
--- a/extensions/tmtv/package.json
+++ b/extensions/tmtv/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-tmtv",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/ui": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/ui": "3.8.0-beta.87",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
diff --git a/extensions/tmtv/src/Panels/PanelROIThresholdSegmentation/PanelROIThresholdExport.tsx b/extensions/tmtv/src/Panels/PanelROIThresholdSegmentation/PanelROIThresholdExport.tsx
index 44582ed968b..bcbe0a4a7f3 100644
--- a/extensions/tmtv/src/Panels/PanelROIThresholdSegmentation/PanelROIThresholdExport.tsx
+++ b/extensions/tmtv/src/Panels/PanelROIThresholdSegmentation/PanelROIThresholdExport.tsx
@@ -2,11 +2,16 @@ import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { Icon, ActionButtons } from '@ohif/ui';
import { useTranslation } from 'react-i18next';
+import { eventTarget } from '@cornerstonejs/core';
+import { Enums } from '@cornerstonejs/tools';
+import { handleROIThresholding } from '../../utils/handleROIThresholding';
+
export default function PanelRoiThresholdSegmentation({ servicesManager, commandsManager }) {
const { segmentationService, uiNotificationService } = servicesManager.services;
const { t } = useTranslation('PanelSUVExport');
const [segmentations, setSegmentations] = useState(() => segmentationService.getSegmentations());
+ const [activeSegmentation, setActiveSegmentation] = useState(null);
/**
* Update UI based on segmentation changes (added, removed, updated)
@@ -22,7 +27,11 @@ export default function PanelRoiThresholdSegmentation({ servicesManager, command
const { unsubscribe } = segmentationService.subscribe(evt, () => {
const segmentations = segmentationService.getSegmentations();
setSegmentations(segmentations);
+
+ const activeSegmentation = segmentations.filter(seg => seg.isActive);
+ setActiveSegmentation(activeSegmentation[0]);
});
+
subscriptions.push(unsubscribe);
});
@@ -33,26 +42,53 @@ export default function PanelRoiThresholdSegmentation({ servicesManager, command
};
}, []);
- const tmtvValue = segmentations?.[0]?.cachedStats?.tmtv?.value || null;
- const config = segmentations?.[0]?.cachedStats?.tmtv?.config || {};
-
- segmentations.forEach(segmentation => {
- const { cachedStats } = segmentation;
- if (!cachedStats) {
- return;
- }
+ useEffect(() => {
+ const callback = async evt => {
+ const { detail } = evt;
+ const { segmentationId } = detail;
- // segment 1
- const suvPeak = cachedStats?.['1']?.suvPeak?.suvPeak;
+ if (!segmentationId) {
+ return;
+ }
- if (Number.isNaN(suvPeak)) {
- uiNotificationService.show({
- title: 'SUV Peak',
- message: 'Segmented volume does not allow SUV Peak calculation',
- type: 'warning',
+ await handleROIThresholding({
+ segmentationId,
+ commandsManager,
+ segmentationService,
});
- }
- });
+
+ const segmentation = segmentationService.getSegmentation(segmentationId);
+
+ const { cachedStats } = segmentation;
+ if (!cachedStats) {
+ return;
+ }
+
+ // segment 1
+ const suvPeak = cachedStats?.['1']?.suvPeak?.suvPeak;
+
+ if (Number.isNaN(suvPeak)) {
+ uiNotificationService.show({
+ title: 'SUV Peak',
+ message: 'Segmented volume does not allow SUV Peak calculation',
+ type: 'warning',
+ });
+ }
+ };
+
+ eventTarget.addEventListenerDebounced(Enums.Events.SEGMENTATION_DATA_MODIFIED, callback, 300);
+
+ return () => {
+ eventTarget.removeEventListenerDebounced(Enums.Events.SEGMENTATION_DATA_MODIFIED, callback);
+ };
+ }, []);
+
+ if (!activeSegmentation) {
+ return null;
+ }
+
+ const tmtvValue = activeSegmentation.cachedStats?.tmtv?.value || null;
+ const config = activeSegmentation.cachedStats?.tmtv?.config || {};
const actions = [
{
@@ -67,7 +103,7 @@ export default function PanelRoiThresholdSegmentation({ servicesManager, command
disabled: tmtvValue === null,
},
{
- label: 'Create RT Report',
+ label: 'Export RT Report',
onClick: () => {
commandsManager.runCommand('createTMTVRTReport');
},
@@ -80,7 +116,7 @@ export default function PanelRoiThresholdSegmentation({ servicesManager, command
{tmtvValue !== null ? (
-
+
{'TMTV:'}
diff --git a/extensions/tmtv/src/Panels/RectangleROIOptions.tsx b/extensions/tmtv/src/Panels/RectangleROIOptions.tsx
index 602bb5531df..5a227b652d1 100644
--- a/extensions/tmtv/src/Panels/RectangleROIOptions.tsx
+++ b/extensions/tmtv/src/Panels/RectangleROIOptions.tsx
@@ -62,72 +62,16 @@ function RectangleROIOptions({ servicesManager, commandsManager }) {
const handleROIThresholding = useCallback(() => {
const segmentationId = selectedSegmentationId;
-
- const segmentation = segmentationService.getSegmentation(segmentationId);
const activeSegmentIndex =
cs3dTools.segmentation.segmentIndex.getActiveSegmentIndex(segmentationId);
// run the threshold based on the active segment index
// Todo: later find a way to associate each rectangle with a segment (e.g., maybe with color?)
- const labelmap = runCommand('thresholdSegmentationByRectangleROITool', {
+ runCommand('thresholdSegmentationByRectangleROITool', {
segmentationId,
config,
segmentIndex: activeSegmentIndex,
});
-
- // re-calculating the cached stats for the active segmentation
- const updatedPerSegmentCachedStats = {};
- segmentation.segments = segmentation.segments.map(segment => {
- if (!segment || !segment.segmentIndex) {
- return segment;
- }
-
- const segmentIndex = segment.segmentIndex;
-
- const lesionStats = runCommand('getLesionStats', { labelmap, segmentIndex });
- const suvPeak = runCommand('calculateSuvPeak', { labelmap, segmentIndex });
- const lesionGlyoclysisStats = lesionStats.volume * lesionStats.meanValue;
-
- // update segDetails with the suv peak for the active segmentation
- const cachedStats = {
- lesionStats,
- suvPeak,
- lesionGlyoclysisStats,
- };
-
- segment.cachedStats = cachedStats;
- segment.displayText = [
- `SUV Peak: ${suvPeak.suvPeak.toFixed(2)}`,
- `Volume: ${lesionStats.volume.toFixed(2)} mm3`,
- ];
- updatedPerSegmentCachedStats[segmentIndex] = cachedStats;
-
- return segment;
- });
-
- const notYetUpdatedAtSource = true;
-
- const segmentations = segmentationService.getSegmentations();
- const tmtv = runCommand('calculateTMTV', { segmentations });
-
- segmentation.cachedStats = Object.assign(
- segmentation.cachedStats,
- updatedPerSegmentCachedStats,
- {
- tmtv: {
- value: tmtv.toFixed(3),
- config: { ...config },
- },
- }
- );
-
- segmentationService.addOrUpdateSegmentation(
- {
- ...segmentation,
- },
- false, // don't suppress events
- notYetUpdatedAtSource
- );
}, [selectedSegmentationId, config]);
useEffect(() => {
@@ -171,27 +115,6 @@ function RectangleROIOptions({ servicesManager, commandsManager }) {
};
}, []);
- useEffect(() => {
- const { unsubscribe } = segmentationService.subscribe(
- segmentationService.EVENTS.SEGMENTATION_REMOVED,
- () => {
- const segmentations = segmentationService.getSegmentations();
-
- if (segmentations.length > 0) {
- setSelectedSegmentationId(segmentations[0].id);
- handleROIThresholding();
- } else {
- setSelectedSegmentationId(null);
- handleROIThresholding();
- }
- }
- );
-
- return () => {
- unsubscribe();
- };
- }, []);
-
return (
{
+ return new Worker(new URL('./utils/calculateSUVPeakWorker.js', import.meta.url), {
+ name: 'suv-peak-worker', // name used by the browser to name the worker
+ });
+};
+
const commandsModule = ({ servicesManager, commandsManager, extensionManager }) => {
const {
viewportGridService,
@@ -265,7 +283,10 @@ const commandsModule = ({ servicesManager, commandsManager, extensionManager })
{ overwrite: true, segmentIndex }
);
},
- calculateSuvPeak: ({ labelmap, segmentIndex }) => {
+ calculateSuvPeak: async ({ labelmap, segmentIndex }) => {
+ // if we put it in the top, it will appear in other modes
+ workerManager.registerWorker('suv-peak-worker', workerFn, options);
+
const { referencedVolumeId } = labelmap;
const referencedVolume = cs.cache.getVolume(referencedVolumeId);
@@ -277,7 +298,31 @@ const commandsModule = ({ servicesManager, commandsManager, extensionManager })
csTools.annotation.state.getAnnotation(annotationUID)
);
- const suvPeak = calculateSuvPeak(labelmap, referencedVolume, annotations, segmentIndex);
+ const labelmapProps = {
+ dimensions: labelmap.dimensions,
+ origin: labelmap.origin,
+ direction: labelmap.direction,
+ spacing: labelmap.spacing,
+ scalarData: labelmap.scalarData,
+ metadata: labelmap.metadata,
+ };
+
+ const referenceVolumeProps = {
+ dimensions: referencedVolume.dimensions,
+ origin: referencedVolume.origin,
+ direction: referencedVolume.direction,
+ spacing: referencedVolume.spacing,
+ scalarData: referencedVolume.scalarData,
+ metadata: referencedVolume.metadata,
+ };
+
+ const suvPeak = await workerManager.executeTask('suv-peak-worker', 'calculateSuvPeak', {
+ labelmapProps,
+ referenceVolumeProps,
+ annotations,
+ segmentIndex,
+ });
+
return {
suvPeak: suvPeak.mean,
suvMax: suvPeak.max,
diff --git a/extensions/tmtv/src/utils/calculateSUVPeak.ts b/extensions/tmtv/src/utils/calculateSUVPeakWorker.js
similarity index 74%
rename from extensions/tmtv/src/utils/calculateSUVPeak.ts
rename to extensions/tmtv/src/utils/calculateSUVPeakWorker.js
index 6627d2e2b05..638ec9d4f82 100644
--- a/extensions/tmtv/src/utils/calculateSUVPeak.ts
+++ b/extensions/tmtv/src/utils/calculateSUVPeakWorker.js
@@ -1,18 +1,32 @@
-import { Types } from '@cornerstonejs/core';
import { utilities } from '@cornerstonejs/tools';
import { vec3 } from 'gl-matrix';
+import vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData';
+import vtkDataArray from '@kitware/vtk.js/Common/Core/DataArray';
+import { expose } from 'comlink';
-type AnnotationsForThresholding = {
- data: {
- handles: {
- points: Types.Point3[];
- };
- cachedStats?: {
- projectionPoints?: Types.Point3[][];
- };
+const createVolume = ({ dimensions, origin, direction, spacing, scalarData, metadata }) => {
+ const imageData = vtkImageData.newInstance();
+ imageData.setDimensions(dimensions);
+ imageData.setOrigin(origin);
+ imageData.setDirection(direction);
+ imageData.setSpacing(spacing);
+
+ const scalarArray = vtkDataArray.newInstance({
+ name: 'Pixels',
+ numberOfComponents: 1,
+ values: scalarData,
+ });
+
+ imageData.getPointData().setScalars(scalarArray);
+
+ imageData.modified();
+
+ return {
+ imageData,
+ metadata,
+ getScalarData: () => scalarData,
};
};
-
/**
* This method calculates the SUV peak on a segmented ROI from a reference PET
* volume. If a rectangle annotation is provided, the peak is calculated within that
@@ -25,17 +39,10 @@ type AnnotationsForThresholding = {
* @param segmentIndex The index of the segment to use for masking
* @returns
*/
-function calculateSuvPeak(
- labelmap: Types.IImageVolume,
- referenceVolume: Types.IImageVolume,
- annotations?: AnnotationsForThresholding[],
- segmentIndex = 1
-): {
- max: number;
- maxIJK: Types.Point3;
- maxLPS: Types.Point3;
- mean: number;
-} {
+function calculateSuvPeak({ labelmapProps, referenceVolumeProps, annotations, segmentIndex = 1 }) {
+ const labelmap = createVolume(labelmapProps);
+ const referenceVolume = createVolume(referenceVolumeProps);
+
if (referenceVolume.metadata.Modality !== 'PT') {
return;
}
@@ -59,7 +66,7 @@ function calculateSuvPeak(
const rectangleCornersIJK = pointsToUse.map(world => {
const ijk = vec3.fromValues(0, 0, 0);
referenceVolumeImageData.worldToIndex(world, ijk);
- return ijk as Types.Point3;
+ return ijk;
});
boundsIJK = utilities.boundingBox.getBoundingBoxAroundShape(rectangleCornersIJK, dimensions);
@@ -88,7 +95,7 @@ function calculateSuvPeak(
utilities.pointInShapeCallback(labelmapImageData, () => true, callback, boundsIJK);
- const direction = labelmapImageData.getDirection().slice(0, 3) as Types.Point3;
+ const direction = labelmapImageData.getDirection().slice(0, 3);
/**
* 2. Find the bottom and top of the great circle for the second sphere (1cc sphere)
@@ -100,10 +107,10 @@ function calculateSuvPeak(
const secondaryCircleWorld = vec3.create();
const bottomWorld = vec3.create();
const topWorld = vec3.create();
- referenceVolumeImageData.indexToWorld(maxIJK as vec3, secondaryCircleWorld);
+ referenceVolumeImageData.indexToWorld(maxIJK, secondaryCircleWorld);
vec3.scaleAndAdd(bottomWorld, secondaryCircleWorld, direction, -diameter / 2);
vec3.scaleAndAdd(topWorld, secondaryCircleWorld, direction, diameter / 2);
- const suvPeakCirclePoints = [bottomWorld, topWorld] as [Types.Point3, Types.Point3];
+ const suvPeakCirclePoints = [bottomWorld, topWorld];
/**
* 3. Find the Mean and Max of the 1cc sphere centered on the suv Max of the previous
@@ -132,4 +139,8 @@ function calculateSuvPeak(
};
}
-export default calculateSuvPeak;
+const obj = {
+ calculateSuvPeak,
+};
+
+expose(obj);
diff --git a/extensions/tmtv/src/utils/handleROIThresholding.ts b/extensions/tmtv/src/utils/handleROIThresholding.ts
new file mode 100644
index 00000000000..ab47fa0326d
--- /dev/null
+++ b/extensions/tmtv/src/utils/handleROIThresholding.ts
@@ -0,0 +1,64 @@
+import { cache } from '@cornerstonejs/core';
+
+export const handleROIThresholding = async ({
+ segmentationId,
+ commandsManager,
+ segmentationService,
+ config = {},
+}) => {
+ const segmentation = segmentationService.getSegmentation(segmentationId);
+
+ // re-calculating the cached stats for the active segmentation
+ const updatedPerSegmentCachedStats = {};
+ segmentation.segments = await Promise.all(
+ segmentation.segments.map(async segment => {
+ if (!segment || !segment.segmentIndex) {
+ return segment;
+ }
+
+ const labelmap = cache.getVolume(segmentationId);
+
+ const segmentIndex = segment.segmentIndex;
+
+ const lesionStats = commandsManager.run('getLesionStats', { labelmap, segmentIndex });
+ const suvPeak = await commandsManager.run('calculateSuvPeak', { labelmap, segmentIndex });
+ const lesionGlyoclysisStats = lesionStats.volume * lesionStats.meanValue;
+
+ // update segDetails with the suv peak for the active segmentation
+ const cachedStats = {
+ lesionStats,
+ suvPeak,
+ lesionGlyoclysisStats,
+ };
+
+ segment.cachedStats = cachedStats;
+ segment.displayText = [
+ `SUV Peak: ${suvPeak.suvPeak.toFixed(2)}`,
+ `Volume: ${lesionStats.volume.toFixed(2)} mm3`,
+ ];
+ updatedPerSegmentCachedStats[segmentIndex] = cachedStats;
+
+ return segment;
+ })
+ );
+
+ const notYetUpdatedAtSource = true;
+
+ const segmentations = segmentationService.getSegmentations();
+ const tmtv = commandsManager.run('calculateTMTV', { segmentations });
+
+ segmentation.cachedStats = Object.assign(segmentation.cachedStats, updatedPerSegmentCachedStats, {
+ tmtv: {
+ value: tmtv.toFixed(3),
+ config: { ...config },
+ },
+ });
+
+ segmentationService.addOrUpdateSegmentation(
+ {
+ ...segmentation,
+ },
+ false, // don't suppress events
+ notYetUpdatedAtSource
+ );
+};
diff --git a/lerna.json b/lerna.json
index bbc5602cbda..6226e17f82d 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"packages": ["extensions/*", "platform/*", "modes/*"],
"npmClient": "yarn"
}
diff --git a/modes/basic-dev-mode/CHANGELOG.md b/modes/basic-dev-mode/CHANGELOG.md
index 8c3ebf9021d..2abbfbc21dd 100644
--- a/modes/basic-dev-mode/CHANGELOG.md
+++ b/modes/basic-dev-mode/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/mode-basic-dev-mode
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
diff --git a/modes/basic-dev-mode/package.json b/modes/basic-dev-mode/package.json
index 6e11b9741eb..5160536145a 100644
--- a/modes/basic-dev-mode/package.json
+++ b/modes/basic-dev-mode/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-basic-dev-mode",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/extension-cornerstone": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.86",
- "@ohif/extension-default": "3.8.0-beta.86",
- "@ohif/extension-dicom-pdf": "3.8.0-beta.86",
- "@ohif/extension-dicom-video": "3.8.0-beta.86"
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.87",
+ "@ohif/extension-default": "3.8.0-beta.87",
+ "@ohif/extension-dicom-pdf": "3.8.0-beta.87",
+ "@ohif/extension-dicom-video": "3.8.0-beta.87"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
diff --git a/modes/basic-test-mode/CHANGELOG.md b/modes/basic-test-mode/CHANGELOG.md
index 8bd97580baa..a83460c67fd 100644
--- a/modes/basic-test-mode/CHANGELOG.md
+++ b/modes/basic-test-mode/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/mode-test
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/modes/basic-test-mode/package.json b/modes/basic-test-mode/package.json
index ed0d99a4c11..3a0b3a66399 100644
--- a/modes/basic-test-mode/package.json
+++ b/modes/basic-test-mode/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-test",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/extension-cornerstone": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.86",
- "@ohif/extension-default": "3.8.0-beta.86",
- "@ohif/extension-dicom-pdf": "3.8.0-beta.86",
- "@ohif/extension-dicom-video": "3.8.0-beta.86",
- "@ohif/extension-measurement-tracking": "3.8.0-beta.86",
- "@ohif/extension-test": "3.8.0-beta.86"
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.87",
+ "@ohif/extension-default": "3.8.0-beta.87",
+ "@ohif/extension-dicom-pdf": "3.8.0-beta.87",
+ "@ohif/extension-dicom-video": "3.8.0-beta.87",
+ "@ohif/extension-measurement-tracking": "3.8.0-beta.87",
+ "@ohif/extension-test": "3.8.0-beta.87"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
diff --git a/modes/longitudinal/CHANGELOG.md b/modes/longitudinal/CHANGELOG.md
index 79ad419a3a6..40b24e27ef4 100644
--- a/modes/longitudinal/CHANGELOG.md
+++ b/modes/longitudinal/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/mode-longitudinal
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/modes/longitudinal/package.json b/modes/longitudinal/package.json
index 9ada2b0d8b8..335c6e24038 100644
--- a/modes/longitudinal/package.json
+++ b/modes/longitudinal/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-longitudinal",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"description": "Longitudinal Workflow",
"author": "OHIF",
"license": "MIT",
@@ -34,15 +34,15 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
- "@ohif/core": "3.8.0-beta.86",
- "@ohif/extension-cornerstone": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.86",
- "@ohif/extension-default": "3.8.0-beta.86",
- "@ohif/extension-dicom-pdf": "3.8.0-beta.86",
- "@ohif/extension-dicom-video": "3.8.0-beta.86",
- "@ohif/extension-measurement-tracking": "3.8.0-beta.86"
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.87",
+ "@ohif/extension-default": "3.8.0-beta.87",
+ "@ohif/extension-dicom-pdf": "3.8.0-beta.87",
+ "@ohif/extension-dicom-video": "3.8.0-beta.87",
+ "@ohif/extension-measurement-tracking": "3.8.0-beta.87"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
diff --git a/modes/microscopy/CHANGELOG.md b/modes/microscopy/CHANGELOG.md
index 192211831e4..671c3842bad 100644
--- a/modes/microscopy/CHANGELOG.md
+++ b/modes/microscopy/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/mode-microscopy
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/mode-microscopy
diff --git a/modes/microscopy/package.json b/modes/microscopy/package.json
index a2b792b9692..5fcec217484 100644
--- a/modes/microscopy/package.json
+++ b/modes/microscopy/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-microscopy",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/extension-dicom-microscopy": "3.8.0-beta.86"
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-dicom-microscopy": "3.8.0-beta.87"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
diff --git a/modes/preclinical-4d/CHANGELOG.md b/modes/preclinical-4d/CHANGELOG.md
index ec951c43bbc..8aaffe8d966 100644
--- a/modes/preclinical-4d/CHANGELOG.md
+++ b/modes/preclinical-4d/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/mode-preclinical-4d
diff --git a/modes/preclinical-4d/package.json b/modes/preclinical-4d/package.json
index d4053df863a..0613fed35ea 100644
--- a/modes/preclinical-4d/package.json
+++ b/modes/preclinical-4d/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-preclinical-4d",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"description": "4D Workflow",
"author": "OHIF",
"license": "MIT",
@@ -30,12 +30,12 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
- "@ohif/core": "3.8.0-beta.86",
- "@ohif/extension-cornerstone": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dynamic-volume": "3.8.0-beta.86",
- "@ohif/extension-default": "3.8.0-beta.86",
- "@ohif/extension-tmtv": "3.8.0-beta.86"
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dynamic-volume": "3.8.0-beta.87",
+ "@ohif/extension-default": "3.8.0-beta.87",
+ "@ohif/extension-tmtv": "3.8.0-beta.87"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
diff --git a/modes/preclinical-4d/src/segmentationButtons.ts b/modes/preclinical-4d/src/segmentationButtons.ts
index 330cdcf48b8..ecc028a1f8a 100644
--- a/modes/preclinical-4d/src/segmentationButtons.ts
+++ b/modes/preclinical-4d/src/segmentationButtons.ts
@@ -29,7 +29,7 @@ const toolbarButtons: Button[] = [
commands: _createSetToolActiveCommands('CircularBrush'),
options: [
{
- name: 'Radius (mm)',
+ name: 'Size (mm)',
id: 'brush-radius',
type: 'range',
min: 0.5,
@@ -131,9 +131,9 @@ const toolbarButtons: Button[] = [
type: 'double-range',
id: 'threshold-range',
min: 0,
- max: 10,
- step: 1,
- values: [2, 5],
+ max: 100,
+ step: 0.5,
+ values: [2, 50],
commands: {
commandName: 'setThresholdRange',
commandOptions: {
diff --git a/modes/segmentation/CHANGELOG.md b/modes/segmentation/CHANGELOG.md
index b020383f096..37b25dda6ef 100644
--- a/modes/segmentation/CHANGELOG.md
+++ b/modes/segmentation/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/mode-segmentation
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/modes/segmentation/package.json b/modes/segmentation/package.json
index 0dc262c92e5..2ab5ea5812e 100644
--- a/modes/segmentation/package.json
+++ b/modes/segmentation/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-segmentation",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/extension-cornerstone": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.86",
- "@ohif/extension-default": "3.8.0-beta.86",
- "@ohif/extension-dicom-pdf": "3.8.0-beta.86",
- "@ohif/extension-dicom-video": "3.8.0-beta.86"
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.87",
+ "@ohif/extension-default": "3.8.0-beta.87",
+ "@ohif/extension-dicom-pdf": "3.8.0-beta.87",
+ "@ohif/extension-dicom-video": "3.8.0-beta.87"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
diff --git a/modes/tmtv/CHANGELOG.md b/modes/tmtv/CHANGELOG.md
index e750502e1c5..153d87b0d45 100644
--- a/modes/tmtv/CHANGELOG.md
+++ b/modes/tmtv/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/mode-tmtv
diff --git a/modes/tmtv/package.json b/modes/tmtv/package.json
index 4db83fea0fa..99b54cbac52 100644
--- a/modes/tmtv/package.json
+++ b/modes/tmtv/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-tmtv",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"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.8.0-beta.86",
- "@ohif/extension-cornerstone": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.86",
- "@ohif/extension-default": "3.8.0-beta.86",
- "@ohif/extension-dicom-pdf": "3.8.0-beta.86",
- "@ohif/extension-dicom-video": "3.8.0-beta.86",
- "@ohif/extension-measurement-tracking": "3.8.0-beta.86"
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.87",
+ "@ohif/extension-default": "3.8.0-beta.87",
+ "@ohif/extension-dicom-pdf": "3.8.0-beta.87",
+ "@ohif/extension-dicom-video": "3.8.0-beta.87",
+ "@ohif/extension-measurement-tracking": "3.8.0-beta.87"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
diff --git a/modes/tmtv/src/index.js b/modes/tmtv/src/index.js
index da318a5278d..03c73baff02 100644
--- a/modes/tmtv/src/index.js
+++ b/modes/tmtv/src/index.js
@@ -99,7 +99,10 @@ function modeFactory({ modeConfiguration }) {
'Pan',
'SyncToggle',
]);
- toolbarService.createButtonSection('ROIThresholdToolbox', ['RectangleROIStartEndThreshold']);
+ toolbarService.createButtonSection('ROIThresholdToolbox', [
+ 'RectangleROIStartEndThreshold',
+ 'BrushTools',
+ ]);
customizationService.addModeCustomizations([
{
diff --git a/modes/tmtv/src/initToolGroups.js b/modes/tmtv/src/initToolGroups.js
index 965668ff4a5..0a972f28990 100644
--- a/modes/tmtv/src/initToolGroups.js
+++ b/modes/tmtv/src/initToolGroups.js
@@ -4,7 +4,6 @@ export const toolGroupIds = {
Fusion: 'fusionToolGroup',
MIP: 'mipToolGroup',
default: 'default',
- // MPR: 'mpr',
};
function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
@@ -59,6 +58,67 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, mo
{ toolName: toolNames.Angle },
{ toolName: toolNames.CobbAngle },
{ toolName: toolNames.Magnify },
+ {
+ toolName: 'CircularBrush',
+ parentTool: 'Brush',
+ configuration: {
+ activeStrategy: 'FILL_INSIDE_CIRCLE',
+ },
+ },
+ {
+ toolName: 'CircularEraser',
+ parentTool: 'Brush',
+ configuration: {
+ activeStrategy: 'ERASE_INSIDE_CIRCLE',
+ },
+ },
+ {
+ toolName: 'SphereBrush',
+ parentTool: 'Brush',
+ configuration: {
+ activeStrategy: 'FILL_INSIDE_SPHERE',
+ },
+ },
+ {
+ toolName: 'SphereEraser',
+ parentTool: 'Brush',
+ configuration: {
+ activeStrategy: 'ERASE_INSIDE_SPHERE',
+ },
+ },
+ {
+ toolName: 'ThresholdCircularBrush',
+ parentTool: 'Brush',
+ configuration: {
+ activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',
+ },
+ },
+ {
+ toolName: 'ThresholdSphereBrush',
+ parentTool: 'Brush',
+ configuration: {
+ activeStrategy: 'THRESHOLD_INSIDE_SPHERE',
+ },
+ },
+ {
+ toolName: 'ThresholdCircularBrushDynamic',
+ parentTool: 'Brush',
+ configuration: {
+ activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',
+ // preview: {
+ // enabled: true,
+ // },
+ strategySpecificConfiguration: {
+ // to use the use the center segment index to determine
+ // if inside -> same segment, if outside -> eraser
+ // useCenterSegmentIndex: true,
+ THRESHOLD: {
+ isDynamic: true,
+ dynamicRadius: 3,
+ },
+ },
+ },
+ },
],
enabled: [{ toolName: toolNames.SegmentationDisplay }],
disabled: [
diff --git a/modes/tmtv/src/toolbarButtons.js b/modes/tmtv/src/toolbarButtons.js
index 042a54b5963..b6a14fc6461 100644
--- a/modes/tmtv/src/toolbarButtons.js
+++ b/modes/tmtv/src/toolbarButtons.js
@@ -1,8 +1,6 @@
-import { defaults, ToolbarService } from '@ohif/core';
+import { ToolbarService } from '@ohif/core';
import { toolGroupIds } from './initToolGroups';
-const { windowLevelPresets } = defaults;
-
const setToolActiveToolbar = {
commandName: 'setToolActiveToolbar',
commandOptions: {
@@ -10,6 +8,18 @@ const setToolActiveToolbar = {
},
};
+function _createSetToolActiveCommands(toolName) {
+ return [
+ {
+ commandName: 'setToolActiveToolbar',
+ commandOptions: {
+ toolName,
+ toolGroupIds: [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion],
+ },
+ },
+ ];
+}
+
const toolbarButtons = [
{
id: 'MeasurementTools',
@@ -107,13 +117,183 @@ const toolbarButtons = [
icon: 'tool-create-threshold',
label: 'Rectangle ROI Threshold',
commands: setToolActiveToolbar,
- evaluate: {
- name: 'evaluate.cornerstoneTool',
- disabledText: 'Select the PT Axial to enable this tool',
- },
+ evaluate: [
+ 'evaluate.cornerstone.segmentation',
+ // need to put the disabled text last, since each evaluator will
+ // merge the result text into the final result
+ {
+ name: 'evaluate.cornerstoneTool',
+ disabledText: 'Select the PT Axial to enable this tool',
+ },
+ ],
options: 'tmtv.RectangleROIThresholdOptions',
},
},
+ {
+ id: 'BrushTools',
+ uiType: 'ohif.buttonGroup',
+ props: {
+ groupId: 'BrushTools',
+ items: [
+ {
+ id: 'Brush',
+ icon: 'icon-tool-brush',
+ label: 'Brush',
+ evaluate: {
+ name: 'evaluate.cornerstone.segmentation',
+ toolNames: ['CircularBrush', 'SphereBrush'],
+ disabledText: 'Create new segmentation to enable this tool.',
+ },
+ commands: _createSetToolActiveCommands('CircularBrush'),
+ options: [
+ {
+ name: 'Radius (mm)',
+ id: 'brush-radius',
+ type: 'range',
+ min: 0.5,
+ max: 99.5,
+ step: 0.5,
+ value: 25,
+ commands: {
+ commandName: 'setBrushSize',
+ commandOptions: { toolNames: ['CircularBrush', 'SphereBrush'] },
+ },
+ },
+ {
+ name: 'Shape',
+ type: 'radio',
+ id: 'brush-mode',
+ value: 'CircularBrush',
+ values: [
+ { value: 'CircularBrush', label: 'Circle' },
+ { value: 'SphereBrush', label: 'Sphere' },
+ ],
+ commands: 'setToolActiveToolbar',
+ },
+ ],
+ },
+ {
+ id: 'Eraser',
+ icon: 'icon-tool-eraser',
+ label: 'Eraser',
+ evaluate: {
+ name: 'evaluate.cornerstone.segmentation',
+ toolNames: ['CircularEraser', 'SphereEraser'],
+ },
+ commands: _createSetToolActiveCommands('CircularEraser'),
+ options: [
+ {
+ name: 'Radius (mm)',
+ id: 'eraser-radius',
+ type: 'range',
+ min: 0.5,
+ max: 99.5,
+ step: 0.5,
+ value: 25,
+ commands: {
+ commandName: 'setBrushSize',
+ commandOptions: { toolNames: ['CircularEraser', 'SphereEraser'] },
+ },
+ },
+ {
+ name: 'Shape',
+ type: 'radio',
+ id: 'eraser-mode',
+ value: 'CircularEraser',
+ values: [
+ { value: 'CircularEraser', label: 'Circle' },
+ { value: 'SphereEraser', label: 'Sphere' },
+ ],
+ commands: 'setToolActiveToolbar',
+ },
+ ],
+ },
+ {
+ id: 'Threshold',
+ icon: 'icon-tool-threshold',
+ label: 'Threshold Tool',
+ evaluate: {
+ name: 'evaluate.cornerstone.segmentation',
+ toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'],
+ },
+ commands: _createSetToolActiveCommands('ThresholdCircularBrush'),
+ options: [
+ {
+ name: 'Radius (mm)',
+ id: 'threshold-radius',
+ type: 'range',
+ min: 0.5,
+ max: 99.5,
+ step: 0.5,
+ value: 25,
+ commands: {
+ commandName: 'setBrushSize',
+ commandOptions: {
+ toolNames: [
+ 'ThresholdCircularBrush',
+ 'ThresholdSphereBrush',
+ 'ThresholdCircularBrushDynamic',
+ ],
+ },
+ },
+ },
+
+ {
+ name: 'Threshold',
+ type: 'radio',
+ id: 'dynamic-mode',
+ value: 'ThresholdRange',
+ values: [
+ { value: 'ThresholdDynamic', label: 'Dynamic' },
+ { value: 'ThresholdRange', label: 'Range' },
+ ],
+ commands: ({ value, commandsManager }) => {
+ if (value === 'ThresholdDynamic') {
+ commandsManager.run('setToolActive', {
+ toolName: 'ThresholdCircularBrushDynamic',
+ });
+ } else {
+ commandsManager.run('setToolActive', {
+ toolName: 'ThresholdCircularBrush',
+ });
+ }
+ },
+ },
+ {
+ name: 'Shape',
+ type: 'radio',
+ id: 'eraser-mode',
+ value: 'ThresholdCircularBrush',
+ values: [
+ { value: 'ThresholdCircularBrush', label: 'Circle' },
+ { value: 'ThresholdSphereBrush', label: 'Sphere' },
+ ],
+ condition: ({ options }) =>
+ options.find(option => option.id === 'dynamic-mode').value === 'ThresholdRange',
+ commands: 'setToolActiveToolbar',
+ },
+ {
+ name: 'ThresholdRange',
+ type: 'double-range',
+ id: 'threshold-range',
+ min: 0,
+ max: 50,
+ step: 0.5,
+ values: [2.5, 50],
+ condition: ({ options }) =>
+ options.find(option => option.id === 'dynamic-mode').value === 'ThresholdRange',
+ commands: {
+ commandName: 'setThresholdRange',
+ commandOptions: {
+ toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'],
+ },
+ },
+ },
+ ],
+ },
+ ],
+ },
+ },
];
export default toolbarButtons;
diff --git a/platform/app/CHANGELOG.md b/platform/app/CHANGELOG.md
index 248509cd960..33623f7d874 100644
--- a/platform/app/CHANGELOG.md
+++ b/platform/app/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/platform/app/package.json b/platform/app/package.json
index d233d1c7a57..6027b032791 100644
--- a/platform/app/package.json
+++ b/platform/app/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/app",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"productVersion": "3.4.0",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
@@ -54,24 +54,24 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.5",
- "@cornerstonejs/dicom-image-loader": "^1.70.9",
+ "@cornerstonejs/dicom-image-loader": "^1.70.10",
"@emotion/serialize": "^1.1.3",
- "@ohif/core": "3.8.0-beta.86",
- "@ohif/extension-cornerstone": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.86",
- "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.86",
- "@ohif/extension-default": "3.8.0-beta.86",
- "@ohif/extension-dicom-microscopy": "3.8.0-beta.86",
- "@ohif/extension-dicom-pdf": "3.8.0-beta.86",
- "@ohif/extension-dicom-video": "3.8.0-beta.86",
- "@ohif/extension-test": "3.8.0-beta.86",
- "@ohif/i18n": "3.8.0-beta.86",
- "@ohif/mode-basic-dev-mode": "3.8.0-beta.86",
- "@ohif/mode-longitudinal": "3.8.0-beta.86",
- "@ohif/mode-microscopy": "3.8.0-beta.86",
- "@ohif/mode-test": "3.8.0-beta.86",
- "@ohif/ui": "3.8.0-beta.86",
+ "@ohif/core": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.87",
+ "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.87",
+ "@ohif/extension-default": "3.8.0-beta.87",
+ "@ohif/extension-dicom-microscopy": "3.8.0-beta.87",
+ "@ohif/extension-dicom-pdf": "3.8.0-beta.87",
+ "@ohif/extension-dicom-video": "3.8.0-beta.87",
+ "@ohif/extension-test": "3.8.0-beta.87",
+ "@ohif/i18n": "3.8.0-beta.87",
+ "@ohif/mode-basic-dev-mode": "3.8.0-beta.87",
+ "@ohif/mode-longitudinal": "3.8.0-beta.87",
+ "@ohif/mode-microscopy": "3.8.0-beta.87",
+ "@ohif/mode-test": "3.8.0-beta.87",
+ "@ohif/ui": "3.8.0-beta.87",
"@types/react": "^17.0.38",
"classnames": "^2.3.2",
"core-js": "^3.16.1",
diff --git a/platform/cli/CHANGELOG.md b/platform/cli/CHANGELOG.md
index f3e03a22b1d..2c640f2270d 100644
--- a/platform/cli/CHANGELOG.md
+++ b/platform/cli/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/cli
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/cli
diff --git a/platform/cli/package.json b/platform/cli/package.json
index c1ef187a499..d8c56ea64ee 100644
--- a/platform/cli/package.json
+++ b/platform/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/cli",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"description": "A CLI to bootstrap new OHIF extension or mode",
"type": "module",
"main": "src/index.js",
diff --git a/platform/core/CHANGELOG.md b/platform/core/CHANGELOG.md
index f36972679f9..f7c86b21d5c 100644
--- a/platform/core/CHANGELOG.md
+++ b/platform/core/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/platform/core/package.json b/platform/core/package.json
index edb65f7759f..cdba59e8b55 100644
--- a/platform/core/package.json
+++ b/platform/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/core",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"description": "Generic business logic for web-based medical imaging applications",
"author": "OHIF Core Team",
"license": "MIT",
@@ -37,8 +37,8 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
- "@cornerstonejs/dicom-image-loader": "^1.70.9",
- "@ohif/ui": "3.8.0-beta.86",
+ "@cornerstonejs/dicom-image-loader": "^1.70.10",
+ "@ohif/ui": "3.8.0-beta.87",
"cornerstone-math": "0.1.9",
"dicom-parser": "^1.8.21"
},
diff --git a/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts b/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts
index 317d7ae412a..8f3821e9652 100644
--- a/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts
+++ b/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts
@@ -1107,6 +1107,7 @@ export default class HangingProtocolService extends PubSubService {
if (this.protocol.id !== protocolId) {
console.warn('setting protocol');
this.protocol = this.getProtocolById(protocolId);
+ this.stageIndex = 0;
}
const protocol = this.protocol;
const stage = protocol.stages[stageIdx];
diff --git a/platform/core/src/services/PanelService/PanelService.tsx b/platform/core/src/services/PanelService/PanelService.tsx
index 06795f4f207..0368b1a6cac 100644
--- a/platform/core/src/services/PanelService/PanelService.tsx
+++ b/platform/core/src/services/PanelService/PanelService.tsx
@@ -107,8 +107,8 @@ export default class PanelService extends PubSubService {
// stack the content of the panels in one react component
content = () => (
<>
- {panelsData.map(({ content: PanelContent }) => (
-
+ {panelsData.map(({ content: PanelContent }, index) => (
+
))}
>
);
diff --git a/platform/core/src/services/ToolBarService/ToolbarService.ts b/platform/core/src/services/ToolBarService/ToolbarService.ts
index b9dfea404b3..d5a0b28283b 100644
--- a/platform/core/src/services/ToolBarService/ToolbarService.ts
+++ b/platform/core/src/services/ToolBarService/ToolbarService.ts
@@ -438,7 +438,11 @@ export default class ToolbarService extends PubSubService {
}
if (Array.isArray(evaluate)) {
- const evaluators = evaluate.map(evaluatorName => {
+ const evaluators = evaluate.map(evaluator => {
+ const isObject = typeof evaluator === 'object';
+
+ const evaluatorName = isObject ? evaluator.name : evaluator;
+
const evaluateFunction = this._evaluateFunction[evaluatorName];
if (!evaluateFunction) {
@@ -447,6 +451,10 @@ export default class ToolbarService extends PubSubService {
);
}
+ if (isObject) {
+ return args => evaluateFunction({ ...args, ...evaluator });
+ }
+
return evaluateFunction;
});
diff --git a/platform/docs/CHANGELOG.md b/platform/docs/CHANGELOG.md
index 720166d73f5..207df9f227f 100644
--- a/platform/docs/CHANGELOG.md
+++ b/platform/docs/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/platform/docs/docs/platform/extensions/modules/toolbar.md b/platform/docs/docs/platform/extensions/modules/toolbar.md
index 4ef1fe3ec06..e10fe36ec32 100644
--- a/platform/docs/docs/platform/extensions/modules/toolbar.md
+++ b/platform/docs/docs/platform/extensions/modules/toolbar.md
@@ -137,6 +137,36 @@ this pattern, where multiple toolbar buttons are using the same evaluator but wi
},
```
+#### Composing evaluators
+
+You can choose to set up multiple evaluators for a single button. This comes in handy when you need to assess the button according to various conditions. For example, we aim to prevent the Cine player from showing up on the 3D viewport, so we have:
+
+```js
+evaluate: ['evaluate.cine', 'evaluate.not3D'],
+```
+
+You can even come up with advanced evaluators such as:
+
+```js
+evaluate: [
+ 'evaluate.cornerstone.segmentation',
+ // need to put the disabled text last, since each evaluator will
+ // merge the result text into the final result
+ {
+ name: 'evaluate.cornerstoneTool',
+ disabledText: 'Select the PT Axial to enable this tool',
+ },
+],
+```
+
+that we use for our RectangleROIStartEndThreshold tool in tmtv mode.
+
+As you see this evaluator is composed of two evaluators, one is `evaluate.cornerstone.segmentation` which makes sure (in the implementation), that
+there is a segmentation created, and the second one is `evaluate.cornerstoneTool` which makes sure that the tool is available in the viewport.
+
+Since we are using multiple evaluators, the `disabledText` of each evaluator will be merged into the final result, so you need to
+put the `disabledText` in the last evaluator.
+
#### Group evaluators
Split buttons (see in [ToolbarService](../../services/data/ToolbarService.md) on how to define one) may feature a group evaluator, we provide two of them and you can write your own.
diff --git a/platform/docs/package.json b/platform/docs/package.json
index 82ba6cb3f5d..b148749d67a 100644
--- a/platform/docs/package.json
+++ b/platform/docs/package.json
@@ -1,6 +1,6 @@
{
"name": "ohif-docs",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"private": true,
"workspaces": {
"nohoist": [
diff --git a/platform/i18n/CHANGELOG.md b/platform/i18n/CHANGELOG.md
index b2bfc9f3512..91d8d9c2f66 100644
--- a/platform/i18n/CHANGELOG.md
+++ b/platform/i18n/CHANGELOG.md
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+**Note:** Version bump only for package @ohif/i18n
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
**Note:** Version bump only for package @ohif/i18n
diff --git a/platform/i18n/package.json b/platform/i18n/package.json
index 22272ac8ab6..30ebe277535 100644
--- a/platform/i18n/package.json
+++ b/platform/i18n/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/i18n",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"description": "Internationalization library for The OHIF Viewer",
"author": "OHIF",
"license": "MIT",
diff --git a/platform/ui/CHANGELOG.md b/platform/ui/CHANGELOG.md
index 3df6f48d7e9..4cb2d6901fb 100644
--- a/platform/ui/CHANGELOG.md
+++ b/platform/ui/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+# [3.8.0-beta.87](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.86...v3.8.0-beta.87) (2024-04-19)
+
+
+### Features
+
+* **tmtv-mode:** Add Brush tools and move SUV peak calculation to web worker ([#4053](https://github.com/OHIF/Viewers/issues/4053)) ([8192e34](https://github.com/OHIF/Viewers/commit/8192e348eca993fec331d4963efe88f9a730eceb))
+
+
+
+
+
# [3.8.0-beta.86](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.85...v3.8.0-beta.86) (2024-04-19)
diff --git a/platform/ui/package.json b/platform/ui/package.json
index 16369efda9e..425a2805182 100644
--- a/platform/ui/package.json
+++ b/platform/ui/package.json
@@ -1,6 +1,6 @@
{
"name": "@ohif/ui",
- "version": "3.8.0-beta.86",
+ "version": "3.8.0-beta.87",
"description": "A set of React components for Medical Imaging Viewers",
"author": "OHIF Contributors",
"license": "MIT",
diff --git a/platform/ui/src/assets/icons/tab-4d.svg b/platform/ui/src/assets/icons/tab-4d.svg
new file mode 100644
index 00000000000..e8eb101c216
--- /dev/null
+++ b/platform/ui/src/assets/icons/tab-4d.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/platform/ui/src/components/Icon/getIcon.js b/platform/ui/src/components/Icon/getIcon.js
index 494b8ce3bfe..3ffa7069371 100644
--- a/platform/ui/src/components/Icon/getIcon.js
+++ b/platform/ui/src/components/Icon/getIcon.js
@@ -216,6 +216,9 @@ import layoutCommon2x2 from './../../assets/icons/layout-common-2x2.svg';
import layoutCommon2x3 from './../../assets/icons/layout-common-2x3.svg';
import iconToolRotate from './../../assets/icons/tool-3d-rotate.svg';
+//
+import tab4D from './../../assets/icons/tab-4d.svg';
+
/** New investigational use */
import investigationalUse from './../../assets/icons/illustration-investigational-use.svg';
@@ -426,6 +429,7 @@ const ICONS = {
'layout-common-1x2': layoutCommon1x2,
'layout-common-2x2': layoutCommon2x2,
'layout-common-2x3': layoutCommon2x3,
+ 'tab-4d': tab4D,
/** New investigational use */
'illustration-investigational-use': investigationalUse,
diff --git a/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupSegment.tsx b/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupSegment.tsx
index 11773a8b7fd..0e9e0b0a26e 100644
--- a/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupSegment.tsx
+++ b/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupSegment.tsx
@@ -28,9 +28,12 @@ const SegmentItem = ({
return (
{
e.stopPropagation();
onClick(segmentationId, segmentIndex);
@@ -151,11 +154,11 @@ const SegmentItem = ({
{Array.isArray(displayText) ? (
-
+
{displayText.map(text => (
{text}
@@ -163,7 +166,7 @@ const SegmentItem = ({
) : (
displayText && (
-
+
{displayText}
)
diff --git a/version.json b/version.json
index a207a457157..fb690c5e5e2 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
- "version": "3.8.0-beta.86",
- "commit": "d250d04580883446fcb8d748b2a97c5c198922af"
+ "version": "3.8.0-beta.87",
+ "commit": "8192e348eca993fec331d4963efe88f9a730eceb"
}
\ No newline at end of file
diff --git a/version.txt b/version.txt
index aced1b99847..de637e14028 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-3.8.0-beta.86
\ No newline at end of file
+3.8.0-beta.87
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index d020ed1fac8..8bed35679db 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1497,13 +1497,13 @@
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==
-"@cornerstonejs/adapters@^1.70.9":
- version "1.70.9"
- resolved "https://registry.yarnpkg.com/@cornerstonejs/adapters/-/adapters-1.70.9.tgz#77f96dbdd2d53225ad8d13d4912afa3538c84baa"
- integrity sha512-eGJu9Skb2WUYvXn1JNO/5NB3EMEHj9rGAelrTozFclqPjnfHbxXlMBeScdE8YTmwR6wHtwiB/lXgu6hhrbYOMQ==
+"@cornerstonejs/adapters@^1.70.10":
+ version "1.70.10"
+ resolved "https://registry.yarnpkg.com/@cornerstonejs/adapters/-/adapters-1.70.10.tgz#5b8113a6a7c0d8677d72d97761530e3e7f91e118"
+ integrity sha512-OTYDg64SjrmCGEt1VDM27iaUOXi+v7WZaoJI5CfwXOA3cHG9AAv8lRaCtvUhIMKXce7HZuYdgKh/zizvrnVPow==
dependencies:
"@babel/runtime-corejs2" "^7.17.8"
- "@cornerstonejs/tools" "^1.70.9"
+ "@cornerstonejs/tools" "^1.70.10"
buffer "^6.0.3"
dcmjs "^0.29.8"
gl-matrix "^3.4.3"
@@ -1550,10 +1550,10 @@
resolved "https://registry.yarnpkg.com/@cornerstonejs/codec-openjph/-/codec-openjph-2.4.5.tgz#8690b61a86fa53ef38a70eee9d665a79229517c0"
integrity sha512-MZCUy8VG0VG5Nl1l58+g+kH3LujAzLYTfJqkwpWI2gjSrGXnP6lgwyy4GmPRZWVoS40/B1LDNALK905cNWm+sg==
-"@cornerstonejs/core@^1.70.9":
- version "1.70.9"
- resolved "https://registry.yarnpkg.com/@cornerstonejs/core/-/core-1.70.9.tgz#c08aa055a786aac79c457e744f18c5fe3f3203f5"
- integrity sha512-2Gu6SXRKuWFoP0aD0dC5et5pcWExxJOE2DWXUKuVdXollbIC+uq3I5FSWOwM8Zzu/Z3JzWWY5IYYPKdJqb8ogQ==
+"@cornerstonejs/core@^1.70.10":
+ version "1.70.10"
+ resolved "https://registry.yarnpkg.com/@cornerstonejs/core/-/core-1.70.10.tgz#8485ad15cd07e784a07892c2d2246bc6e2d5d5fe"
+ integrity sha512-c9wkgDGKpGt0VEdILLAIn5ZRTqoofsGrWAzj+8h0zogdVY9yQ1PIP2WW7xEbuUcJ/m1RFpapiwqMFU6UEXNNBA==
dependencies:
"@kitware/vtk.js" "30.3.3"
comlink "^4.4.1"
@@ -1561,34 +1561,34 @@
gl-matrix "^3.4.3"
lodash.clonedeep "4.5.0"
-"@cornerstonejs/dicom-image-loader@^1.70.9":
- version "1.70.9"
- resolved "https://registry.yarnpkg.com/@cornerstonejs/dicom-image-loader/-/dicom-image-loader-1.70.9.tgz#e329eb86343651f3d6148e03eb1e9d4390b79a6a"
- integrity sha512-M4qd88NA+z62d8w6eaDUbYfFCn3dmDqGkF0iI2s67LlySmeDo7pUmSG8gQbuJMOUPQMxD1Hy8EXBexaTAsBiaQ==
+"@cornerstonejs/dicom-image-loader@^1.70.10":
+ version "1.70.10"
+ resolved "https://registry.yarnpkg.com/@cornerstonejs/dicom-image-loader/-/dicom-image-loader-1.70.10.tgz#29de339e969e370b07fbb229724094b924cf5469"
+ integrity sha512-4/J4xU3C1Qk8KAQaQdF0duaehfGFX5z47ucU3rXqvN44+qHZrK/iPeGVORhJmErlB9qTY++K8uAZbqo/E65Aiw==
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"
- "@cornerstonejs/core" "^1.70.9"
+ "@cornerstonejs/core" "^1.70.10"
dicom-parser "^1.8.9"
pako "^2.0.4"
uuid "^9.0.0"
-"@cornerstonejs/streaming-image-volume-loader@^1.70.9":
- version "1.70.9"
- resolved "https://registry.yarnpkg.com/@cornerstonejs/streaming-image-volume-loader/-/streaming-image-volume-loader-1.70.9.tgz#3f3b7c04b3db6c303cb278e5ab8d1916cd91a3b1"
- integrity sha512-Uay1IIRJMge0Tp7DrgisaqIXowh5IdROXbexmbGVT++0qeyzIQIzXdaUrJpuXDpaB2bYppWEY9moKja0mtlBHw==
+"@cornerstonejs/streaming-image-volume-loader@^1.70.10":
+ version "1.70.10"
+ resolved "https://registry.yarnpkg.com/@cornerstonejs/streaming-image-volume-loader/-/streaming-image-volume-loader-1.70.10.tgz#e548e82b1014517efd686c294e161a15b66b6e1e"
+ integrity sha512-Rg7v0WDjGNjV+DPXLj1LLSXV/6kBq+RxRBxLVfKnA3onEFRuPxqnMUYY9uxG7Edr5RLaGlnBCr4V4tvFzzYYmA==
dependencies:
- "@cornerstonejs/core" "^1.70.9"
+ "@cornerstonejs/core" "^1.70.10"
comlink "^4.4.1"
-"@cornerstonejs/tools@^1.70.9":
- version "1.70.9"
- resolved "https://registry.yarnpkg.com/@cornerstonejs/tools/-/tools-1.70.9.tgz#e71b709ba5652918a9c92ad344638d3188d8af2b"
- integrity sha512-/Pbbb/hAeYd0bgrXtAEwQOksdL5qy+zwosk3HMsUCa5S7FnvEOSnSQbs0h8UZwKIkW09LtzAkSiPgJpP7A3cwg==
+"@cornerstonejs/tools@^1.70.10":
+ version "1.70.10"
+ resolved "https://registry.yarnpkg.com/@cornerstonejs/tools/-/tools-1.70.10.tgz#9b24b17dfb5ba48556df7643bee01f79b6378672"
+ integrity sha512-GmwhfB/DzEc86cur2pHvlLp/FCvhG7WlNe0dJWLNRPA/fgPt+BPVBwrMf4a6934r4N7WCzwOJjcnUpiwDjT+MQ==
dependencies:
- "@cornerstonejs/core" "^1.70.9"
+ "@cornerstonejs/core" "^1.70.10"
"@icr/polyseg-wasm" "0.4.0"
"@types/offscreencanvas" "2019.7.3"
comlink "^4.4.1"