Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1dc00d3030 | ||
|
|
44d450c5b8 | ||
|
|
c75a3f3af5 | ||
|
|
908482d2e0 | ||
|
|
6b26db387e | ||
|
|
b7419fb6a1 | ||
|
|
c4045251fb | ||
|
|
ec4cc64b06 | ||
|
|
d9473e8db2 |
No files matched your search
@@ -9,7 +9,7 @@ jobs:
|
||||
timeout-minutes: 60
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: mcr.microsoft.com/playwright:v1.50.0-noble
|
||||
image: mcr.microsoft.com/playwright:v1.51.1-noble
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package ohif-monorepo-root
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package ohif-monorepo-root
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
+24
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @externals/devDependencies
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @externals/devDependencies
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @externals/devDependencies
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@externals/devDependencies",
|
||||
"description": "External dev dependencies - put dev build dependencies here",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"engines": {
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @externals/dicom-microscopy-viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @externals/dicom-microscopy-viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @externals/dicom-microscopy-viewer
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@externals/dicom-microscopy-viewer",
|
||||
"description": "External reference to dicom-microscopy-viewer",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dicom-microscopy-viewer": "^0.46.1"
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
d7bd36544a039deae30e179404452cde738b8b03
|
||||
c75a3f3af58c4cd29c349338e4065269d8d9f387
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-pmap
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-pmap
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone-dicom-pmap",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/i18n": "3.10.0-beta.141",
|
||||
"@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",
|
||||
@@ -46,8 +46,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^3.7.17",
|
||||
"@cornerstonejs/core": "^3.7.17",
|
||||
"@cornerstonejs/adapters": "^3.8.2",
|
||||
"@cornerstonejs/core": "^3.8.2",
|
||||
"@kitware/vtk.js": "32.12.0",
|
||||
"react-color": "^2.19.3"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone-dicom-rt",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"description": "DICOM RT read workflow",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -33,10 +33,10 @@
|
||||
"start": "yarn run dev"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/i18n": "3.10.0-beta.141",
|
||||
"@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",
|
||||
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone-dicom-seg",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"description": "DICOM SEG read workflow",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
@@ -33,10 +33,10 @@
|
||||
"start": "yarn run dev"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ohif/core": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/i18n": "3.10.0-beta.141",
|
||||
"@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",
|
||||
@@ -46,8 +46,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^3.7.17",
|
||||
"@cornerstonejs/core": "^3.7.17",
|
||||
"@cornerstonejs/adapters": "^3.8.2",
|
||||
"@cornerstonejs/core": "^3.8.2",
|
||||
"@kitware/vtk.js": "32.12.0",
|
||||
"react-color": "^2.19.3"
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ export function getToolbarModule({ servicesManager }: withAppTypes) {
|
||||
if (!toolNames) {
|
||||
return {
|
||||
disabled: false,
|
||||
// isActive: true,
|
||||
// isActive: false,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone-dicom-sr",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-measurement-tracking": "3.10.0-beta.141",
|
||||
"@ohif/ui": "3.10.0-beta.141",
|
||||
"@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",
|
||||
@@ -46,9 +46,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^3.7.17",
|
||||
"@cornerstonejs/core": "^3.7.17",
|
||||
"@cornerstonejs/tools": "^3.7.17",
|
||||
"@cornerstonejs/adapters": "^3.8.2",
|
||||
"@cornerstonejs/core": "^3.8.2",
|
||||
"@cornerstonejs/tools": "^3.8.2",
|
||||
"classnames": "^2.3.2"
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dynamic-volume
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone-dynamic-volume
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone-dynamic-volume",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/i18n": "3.10.0-beta.141",
|
||||
"@ohif/ui": "3.10.0-beta.141",
|
||||
"@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",
|
||||
@@ -42,8 +42,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/core": "^3.7.17",
|
||||
"@cornerstonejs/tools": "^3.7.17",
|
||||
"@cornerstonejs/core": "^3.8.2",
|
||||
"@cornerstonejs/tools": "^3.8.2",
|
||||
"classnames": "^2.3.2"
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,24 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Button, PanelSection, ButtonGroup, IconButton, InputNumber } from '@ohif/ui';
|
||||
import { Icons, Tooltip, TooltipTrigger, TooltipContent, Numeric } from '@ohif/ui-next';
|
||||
import {
|
||||
Tabs,
|
||||
TabsList,
|
||||
TabsTrigger,
|
||||
Button,
|
||||
PanelSection,
|
||||
Icons,
|
||||
Tooltip,
|
||||
TooltipTrigger,
|
||||
TooltipContent,
|
||||
Numeric,
|
||||
} from '@ohif/ui-next';
|
||||
import { Enums } from '@cornerstonejs/core';
|
||||
|
||||
const controlClassNames = {
|
||||
sizeClassName: 'w-[58px] h-[28px]',
|
||||
arrowsDirection: 'horizontal',
|
||||
labelPosition: 'bottom',
|
||||
// Helper function to safely convert any value to uppercase string
|
||||
const toUpperCaseString = value => {
|
||||
if (value === null || value === undefined) {
|
||||
return '';
|
||||
}
|
||||
return String(value).toUpperCase();
|
||||
};
|
||||
|
||||
const Header = ({ title, tooltip }) => (
|
||||
@@ -16,18 +28,18 @@ const Header = ({ title, tooltip }) => (
|
||||
<span>
|
||||
<Icons.ByName
|
||||
name="info-link"
|
||||
className="text-primary-active h-[14px] w-[14px]"
|
||||
className="text-primary h-3 w-3"
|
||||
/>
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent
|
||||
sideOffset={4}
|
||||
className="bg-primary-dark max-w-xs p-2 text-white"
|
||||
className="max-w-xs"
|
||||
>
|
||||
<div>{tooltip}</div>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<span className="text-aqua-pale text-[11px] uppercase">{title}</span>
|
||||
<span className="text-muted-foreground text-xs uppercase tracking-wide">{title}</span>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -51,112 +63,138 @@ const DynamicVolumeControls = ({
|
||||
const [computedView, setComputedView] = useState(false);
|
||||
const [computeViewMode, setComputeViewMode] = useState(Enums.DynamicOperatorType.SUM);
|
||||
|
||||
// Wrapper for onGenerate to handle potential errors
|
||||
const handleGenerate = () => {
|
||||
try {
|
||||
if (typeof onGenerate === 'function') {
|
||||
onGenerate(computeViewMode);
|
||||
} else {
|
||||
console.error('onGenerate is not a function', onGenerate);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error in onGenerate:', error);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex select-none flex-col">
|
||||
<PanelSection
|
||||
title="Controls"
|
||||
childrenClassName="space-y-4 pb-5 px-5"
|
||||
>
|
||||
<div className="mt-2">
|
||||
<Header
|
||||
title="View"
|
||||
tooltip={
|
||||
'Select the view mode, 4D to view the dynamic volume or Computed to view the computed volume'
|
||||
}
|
||||
/>
|
||||
<ButtonGroup className="mt-2 w-full">
|
||||
<button
|
||||
className="w-1/2"
|
||||
onClick={() => {
|
||||
setComputedView(false);
|
||||
onDynamicClick?.();
|
||||
<PanelSection defaultOpen={true}>
|
||||
<PanelSection.Header>Controls</PanelSection.Header>
|
||||
<PanelSection.Content className="bg-muted space-y-4 px-5 pt-2 pb-4">
|
||||
<div className="mb-4">
|
||||
<Header
|
||||
title="View"
|
||||
tooltip={
|
||||
'Select the view mode, 4D to view the dynamic volume or Computed to view the computed volume'
|
||||
}
|
||||
/>
|
||||
<Tabs
|
||||
value={computedView ? 'computed' : '4d'}
|
||||
onValueChange={value => {
|
||||
const isComputed = value === 'computed';
|
||||
setComputedView(isComputed);
|
||||
if (!isComputed && typeof onDynamicClick === 'function') {
|
||||
onDynamicClick();
|
||||
}
|
||||
}}
|
||||
className="my-2 w-full"
|
||||
>
|
||||
4D
|
||||
</button>
|
||||
<button
|
||||
className="w-1/2"
|
||||
onClick={() => {
|
||||
setComputedView(true);
|
||||
}}
|
||||
>
|
||||
Computed
|
||||
</button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
<div>
|
||||
<DimensionGroupControls
|
||||
onPlayPauseChange={onPlayPauseChange}
|
||||
isPlaying={isPlaying}
|
||||
computedView={computedView}
|
||||
// fps
|
||||
fps={fps}
|
||||
onFpsChange={onFpsChange}
|
||||
minFps={minFps}
|
||||
maxFps={maxFps}
|
||||
//
|
||||
numDimensionGroups={numDimensionGroups}
|
||||
onDimensionGroupChange={onDimensionGroupChange}
|
||||
currentDimensionGroupNumber={currentDimensionGroupNumber}
|
||||
/>
|
||||
</div>
|
||||
<div className={`mt-6 flex flex-col ${computedView ? '' : 'ohif-disabled'}`}>
|
||||
<Header
|
||||
title="Computed Operation"
|
||||
tooltip={
|
||||
<div>
|
||||
Operation Buttons (SUM, AVERAGE, SUBTRACT): Select the mathematical operation to be
|
||||
applied to the data set.
|
||||
<br /> Range Slider: Choose the numeric range of dimension groups within which the
|
||||
operation will be performed.
|
||||
<br />
|
||||
Generate Button: Execute the chosen operation on the specified range of data.
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
<ButtonGroup
|
||||
className="mt-2 w-full"
|
||||
separated={true}
|
||||
>
|
||||
<button
|
||||
className="w-1/2"
|
||||
onClick={() => setComputeViewMode(Enums.DynamicOperatorType.SUM)}
|
||||
>
|
||||
{Enums.DynamicOperatorType.SUM.toString().toUpperCase()}
|
||||
</button>
|
||||
<button
|
||||
className="w-1/2"
|
||||
onClick={() => setComputeViewMode(Enums.DynamicOperatorType.AVERAGE)}
|
||||
>
|
||||
{Enums.DynamicOperatorType.AVERAGE.toString().toUpperCase()}
|
||||
</button>
|
||||
<button
|
||||
className="w-1/2"
|
||||
onClick={() => setComputeViewMode(Enums.DynamicOperatorType.SUBTRACT)}
|
||||
>
|
||||
{Enums.DynamicOperatorType.SUBTRACT.toString().toUpperCase()}
|
||||
</button>
|
||||
</ButtonGroup>
|
||||
<div className="mt-2 w-full">
|
||||
<Numeric.Container
|
||||
mode="doubleRange"
|
||||
min={1}
|
||||
max={numDimensionGroups}
|
||||
values={rangeValues}
|
||||
onChange={onDoubleRangeChange}
|
||||
>
|
||||
<Numeric.DoubleRange showNumberInputs />
|
||||
</Numeric.Container>
|
||||
<TabsList className="w-full">
|
||||
<TabsTrigger
|
||||
value="4d"
|
||||
className="w-1/2"
|
||||
>
|
||||
4D
|
||||
</TabsTrigger>
|
||||
<TabsTrigger
|
||||
value="computed"
|
||||
className="w-1/2"
|
||||
>
|
||||
Computed
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
</Tabs>
|
||||
</div>
|
||||
<Button
|
||||
className="mt-2 !h-[26px] !w-[115px] self-start !p-0"
|
||||
onClick={() => {
|
||||
onGenerate(computeViewMode);
|
||||
}}
|
||||
>
|
||||
Generate
|
||||
</Button>
|
||||
</div>
|
||||
<div>
|
||||
<DimensionGroupControls
|
||||
onPlayPauseChange={onPlayPauseChange}
|
||||
isPlaying={isPlaying}
|
||||
computedView={computedView}
|
||||
// fps
|
||||
fps={fps}
|
||||
onFpsChange={onFpsChange}
|
||||
minFps={minFps}
|
||||
maxFps={maxFps}
|
||||
//
|
||||
numDimensionGroups={numDimensionGroups}
|
||||
onDimensionGroupChange={onDimensionGroupChange}
|
||||
currentDimensionGroupNumber={currentDimensionGroupNumber}
|
||||
/>
|
||||
</div>
|
||||
<div className={`mt-3 flex flex-col ${computedView ? '' : 'ohif-disabled'}`}>
|
||||
<Header
|
||||
title="Computed Operation"
|
||||
tooltip={
|
||||
<div>
|
||||
Operation Buttons (SUM, AVERAGE, SUBTRACT): Select the mathematical operation to
|
||||
be applied to the data set.
|
||||
<br /> Range Slider: Choose the numeric range of dimension groups within which the
|
||||
operation will be performed.
|
||||
<br />
|
||||
Generate Button: Execute the chosen operation on the specified range of data.
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
<Tabs
|
||||
value={String(computeViewMode)}
|
||||
onValueChange={value => {
|
||||
setComputeViewMode(value);
|
||||
}}
|
||||
className="mt-2 w-full"
|
||||
>
|
||||
<TabsList className="w-full gap-1">
|
||||
{' '}
|
||||
<TabsTrigger
|
||||
value={String(Enums.DynamicOperatorType.SUM)}
|
||||
className="w-1/3"
|
||||
>
|
||||
{toUpperCaseString(Enums.DynamicOperatorType.SUM)}
|
||||
</TabsTrigger>
|
||||
<TabsTrigger
|
||||
value={String(Enums.DynamicOperatorType.AVERAGE)}
|
||||
className="w-1/3"
|
||||
>
|
||||
{toUpperCaseString(Enums.DynamicOperatorType.AVERAGE)}
|
||||
</TabsTrigger>
|
||||
<TabsTrigger
|
||||
value={String(Enums.DynamicOperatorType.SUBTRACT)}
|
||||
className="w-1/3"
|
||||
>
|
||||
{toUpperCaseString(Enums.DynamicOperatorType.SUBTRACT)}
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
</Tabs>
|
||||
<div className="mt-2 w-full">
|
||||
<Numeric.Container
|
||||
mode="doubleRange"
|
||||
min={1}
|
||||
max={numDimensionGroups || 1}
|
||||
values={rangeValues || [1, numDimensionGroups || 1]}
|
||||
onChange={onDoubleRangeChange || (() => {})}
|
||||
>
|
||||
<Numeric.DoubleRange showNumberInputs />
|
||||
</Numeric.Container>
|
||||
</div>
|
||||
<Button
|
||||
variant="default"
|
||||
size="sm"
|
||||
className="mt-2 h-[26px] w-[115px] self-start p-0"
|
||||
onClick={handleGenerate}
|
||||
>
|
||||
Generate
|
||||
</Button>
|
||||
</div>
|
||||
</PanelSection.Content>
|
||||
</PanelSection>
|
||||
</div>
|
||||
);
|
||||
@@ -179,7 +217,7 @@ function DimensionGroupControls({
|
||||
const getPlayPauseIconName = () => (isPlaying ? 'icon-pause' : 'icon-play');
|
||||
|
||||
return (
|
||||
<div className={computedView && 'ohif-disabled'}>
|
||||
<div className={computedView ? 'ohif-disabled' : ''}>
|
||||
<Header
|
||||
title="4D Controls"
|
||||
tooltip={
|
||||
@@ -192,32 +230,56 @@ function DimensionGroupControls({
|
||||
}
|
||||
/>
|
||||
<div className="mt-3 flex justify-between">
|
||||
<IconButton
|
||||
<Button
|
||||
id="play-pause-button"
|
||||
className="bg-customblue-30 h-[26px] w-[58px] rounded-[4px]"
|
||||
onClick={() => onPlayPauseChange(!isPlaying)}
|
||||
variant="secondary"
|
||||
size="default"
|
||||
className="w-[58px]"
|
||||
onClick={() => {
|
||||
if (typeof onPlayPauseChange === 'function') {
|
||||
onPlayPauseChange(!isPlaying);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Icons.ByName
|
||||
name={getPlayPauseIconName()}
|
||||
className="active:text-primary-light hover:bg-customblue-300 h-[24px] w-[24px] cursor-pointer text-white"
|
||||
className="text-foreground h-[24px] w-[24px]"
|
||||
/>
|
||||
</IconButton>
|
||||
<InputNumber
|
||||
value={currentDimensionGroupNumber}
|
||||
onChange={onDimensionGroupChange}
|
||||
minValue={1}
|
||||
maxValue={numDimensionGroups}
|
||||
label="Group"
|
||||
{...controlClassNames}
|
||||
/>
|
||||
<InputNumber
|
||||
value={fps}
|
||||
onChange={onFpsChange}
|
||||
minValue={minFps}
|
||||
maxValue={maxFps}
|
||||
{...controlClassNames}
|
||||
label="FPS"
|
||||
/>
|
||||
</Button>
|
||||
|
||||
<Numeric.Container
|
||||
mode="stepper"
|
||||
value={currentDimensionGroupNumber || 1}
|
||||
onChange={onDimensionGroupChange || (() => {})}
|
||||
min={1}
|
||||
max={numDimensionGroups || 1}
|
||||
step={1}
|
||||
>
|
||||
<div className="flex flex-col items-center">
|
||||
<Numeric.NumberStepper
|
||||
className="h-[28px] w-[58px]"
|
||||
direction="horizontal"
|
||||
/>
|
||||
<Numeric.Label className="text-muted-foreground mt-1 text-sm">Frame</Numeric.Label>
|
||||
</div>
|
||||
</Numeric.Container>
|
||||
|
||||
<Numeric.Container
|
||||
mode="stepper"
|
||||
value={fps || 1}
|
||||
onChange={onFpsChange || (() => {})}
|
||||
min={minFps || 1}
|
||||
max={maxFps || 30}
|
||||
step={1}
|
||||
>
|
||||
<div className="flex flex-col items-center">
|
||||
<Numeric.NumberStepper
|
||||
className="h-[28px] w-[58px]"
|
||||
direction="horizontal"
|
||||
/>
|
||||
<Numeric.Label className="text-muted-foreground mt-1 text-sm">FPS</Numeric.Label>
|
||||
</div>
|
||||
</Numeric.Container>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.7.17",
|
||||
"@ohif/core": "3.10.0-beta.141",
|
||||
"@ohif/ui": "3.10.0-beta.141",
|
||||
"@cornerstonejs/dicom-image-loader": "^3.8.2",
|
||||
"@ohif/core": "3.10.0-beta.144",
|
||||
"@ohif/ui": "3.10.0-beta.144",
|
||||
"dcmjs": "*",
|
||||
"dicom-parser": "^1.8.21",
|
||||
"hammerjs": "^2.0.8",
|
||||
@@ -51,11 +51,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^3.7.17",
|
||||
"@cornerstonejs/core": "^3.7.17",
|
||||
"@cornerstonejs/labelmap-interpolation": "^3.7.17",
|
||||
"@cornerstonejs/polymorphic-segmentation": "^3.7.17",
|
||||
"@cornerstonejs/tools": "^3.7.17",
|
||||
"@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",
|
||||
"@itk-wasm/morphological-contour-interpolation": "1.1.0",
|
||||
"@kitware/vtk.js": "32.12.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
} from '@cornerstonejs/tools';
|
||||
import * as cornerstoneTools from '@cornerstonejs/tools';
|
||||
import * as labelmapInterpolation from '@cornerstonejs/labelmap-interpolation';
|
||||
import { ONNXSegmentationController } from '@cornerstonejs/ai';
|
||||
|
||||
import { Types as OhifTypes, utils } from '@ohif/core';
|
||||
import i18n from '@ohif/i18n';
|
||||
@@ -59,6 +60,28 @@ const getLabelmapTools = ({ toolGroupService }) => {
|
||||
return labelmapTools;
|
||||
};
|
||||
|
||||
const segmentAI = new ONNXSegmentationController({
|
||||
autoSegmentMode: true,
|
||||
models: {
|
||||
sam_b: [
|
||||
{
|
||||
name: 'sam-b-encoder',
|
||||
url: 'https://huggingface.co/schmuell/sam-b-fp16/resolve/main/sam_vit_b_01ec64.encoder-fp16.onnx',
|
||||
size: 180,
|
||||
key: 'encoder',
|
||||
},
|
||||
{
|
||||
name: 'sam-b-decoder',
|
||||
url: 'https://huggingface.co/schmuell/sam-b-fp16/resolve/main/sam_vit_b_01ec64.decoder.onnx',
|
||||
size: 17,
|
||||
key: 'decoder',
|
||||
},
|
||||
],
|
||||
},
|
||||
modelName: 'sam_b',
|
||||
});
|
||||
let segmentAIEnabled = false;
|
||||
|
||||
function commandsModule({
|
||||
servicesManager,
|
||||
commandsManager,
|
||||
@@ -979,7 +1002,7 @@ function commandsModule({
|
||||
});
|
||||
}
|
||||
},
|
||||
setSourceViewportForReferenceLinesTool: ({ viewportId }) => {
|
||||
setViewportForToolConfiguration: ({ viewportId, toolName }) => {
|
||||
if (!viewportId) {
|
||||
const { activeViewportId } = viewportGridService.getState();
|
||||
viewportId = activeViewportId ?? 'default';
|
||||
@@ -987,9 +1010,11 @@ function commandsModule({
|
||||
|
||||
const toolGroup = toolGroupService.getToolGroupForViewport(viewportId);
|
||||
|
||||
const prevConfig = toolGroup?.getToolConfiguration(toolName);
|
||||
toolGroup?.setToolConfiguration(
|
||||
ReferenceLinesTool.toolName,
|
||||
toolName,
|
||||
{
|
||||
...prevConfig,
|
||||
sourceViewportId: viewportId,
|
||||
},
|
||||
true // overwrite
|
||||
@@ -1525,17 +1550,85 @@ function commandsModule({
|
||||
}
|
||||
});
|
||||
},
|
||||
acceptPreview: () => {
|
||||
toggleUseCenterSegmentIndex: ({ toggle }) => {
|
||||
const labelmapTools = getLabelmapTools({ toolGroupService });
|
||||
labelmapTools.forEach(tool => {
|
||||
tool.acceptPreview();
|
||||
tool.configuration = {
|
||||
...tool.configuration,
|
||||
useCenterSegmentIndex: toggle,
|
||||
};
|
||||
});
|
||||
},
|
||||
rejectPreview: () => {
|
||||
_handlePreviewAction: action => {
|
||||
const labelmapTools = getLabelmapTools({ toolGroupService });
|
||||
labelmapTools.forEach(tool => {
|
||||
tool.rejectPreview();
|
||||
const { viewport } = _getActiveViewportEnabledElement();
|
||||
const activeTools = labelmapTools.filter(
|
||||
tool => tool.mode === 'Active' || tool.mode === 'Enabled'
|
||||
);
|
||||
|
||||
activeTools.forEach(tool => {
|
||||
tool[`${action}Preview`]();
|
||||
});
|
||||
|
||||
if (segmentAI.enabled) {
|
||||
segmentAI[`${action}Preview`](viewport.element);
|
||||
}
|
||||
},
|
||||
acceptPreview: () => {
|
||||
actions._handlePreviewAction('accept');
|
||||
},
|
||||
rejectPreview: () => {
|
||||
actions._handlePreviewAction('reject');
|
||||
},
|
||||
clearMarkersForMarkerLabelmap: () => {
|
||||
const { viewport } = _getActiveViewportEnabledElement();
|
||||
const toolGroup = cornerstoneTools.ToolGroupManager.getToolGroupForViewport(viewport.id);
|
||||
const toolInstance = toolGroup.getToolInstance('MarkerLabelmap');
|
||||
|
||||
if (!toolInstance) {
|
||||
return;
|
||||
}
|
||||
|
||||
toolInstance.clearMarkers(viewport);
|
||||
},
|
||||
interpolateScrollForMarkerLabelmap: () => {
|
||||
const { viewport } = _getActiveViewportEnabledElement();
|
||||
const toolGroup = cornerstoneTools.ToolGroupManager.getToolGroupForViewport(viewport.id);
|
||||
const toolInstance = toolGroup.getToolInstance('MarkerLabelmap');
|
||||
|
||||
if (!toolInstance) {
|
||||
return;
|
||||
}
|
||||
|
||||
toolInstance.interpolateScroll(viewport, 1);
|
||||
},
|
||||
toggleLabelmapAssist: async () => {
|
||||
const { viewport } = _getActiveViewportEnabledElement();
|
||||
const newState = !segmentAI.enabled;
|
||||
segmentAI.enabled = newState;
|
||||
|
||||
if (!segmentAIEnabled) {
|
||||
await segmentAI.initModel();
|
||||
segmentAIEnabled = true;
|
||||
}
|
||||
|
||||
// set the brush tool to active
|
||||
const toolGroupIds = toolGroupService.getToolGroupIds();
|
||||
if (newState) {
|
||||
actions.setToolActiveToolbar({
|
||||
toolName: 'CircularBrushForAutoSegmentAI',
|
||||
toolGroupIds: toolGroupIds,
|
||||
});
|
||||
} else {
|
||||
toolGroupIds.forEach(toolGroupId => {
|
||||
const toolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(toolGroupId);
|
||||
toolGroup.setToolPassive('CircularBrushForAutoSegmentAI');
|
||||
});
|
||||
}
|
||||
|
||||
if (segmentAI.enabled) {
|
||||
segmentAI.initViewport(viewport);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1680,8 +1773,8 @@ function commandsModule({
|
||||
setViewportColormap: {
|
||||
commandFn: actions.setViewportColormap,
|
||||
},
|
||||
setSourceViewportForReferenceLinesTool: {
|
||||
commandFn: actions.setSourceViewportForReferenceLinesTool,
|
||||
setViewportForToolConfiguration: {
|
||||
commandFn: actions.setViewportForToolConfiguration,
|
||||
},
|
||||
storePresentation: {
|
||||
commandFn: actions.storePresentation,
|
||||
@@ -1806,6 +1899,10 @@ function commandsModule({
|
||||
toggleSegmentSelect: actions.toggleSegmentSelect,
|
||||
acceptPreview: actions.acceptPreview,
|
||||
rejectPreview: actions.rejectPreview,
|
||||
toggleUseCenterSegmentIndex: actions.toggleUseCenterSegmentIndex,
|
||||
toggleLabelmapAssist: actions.toggleLabelmapAssist,
|
||||
interpolateScrollForMarkerLabelmap: actions.interpolateScrollForMarkerLabelmap,
|
||||
clearMarkersForMarkerLabelmap: actions.clearMarkersForMarkerLabelmap,
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useCallback, useState, ReactElement, useMemo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import debounce from 'lodash.debounce';
|
||||
import { PanelSection, WindowLevel } from '@ohif/ui';
|
||||
import { PanelSection, WindowLevel } from '@ohif/ui-next';
|
||||
import { Enums, eventTarget } from '@cornerstonejs/core';
|
||||
import { useActiveViewportDisplaySets } from '@ohif/core';
|
||||
import {
|
||||
@@ -20,7 +20,7 @@ const ViewportWindowLevel = ({
|
||||
viewportId: string;
|
||||
}>): ReactElement => {
|
||||
const { cornerstoneViewportService } = servicesManager.services;
|
||||
const [windowLevels, setWindowLevels] = useState([]);
|
||||
const [windowLevels, setWindowLevels] = useState<any[]>([]);
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const displaySets = useActiveViewportDisplaySets({ servicesManager });
|
||||
|
||||
@@ -200,29 +200,41 @@ const ViewportWindowLevel = ({
|
||||
}, [viewportId, cornerstoneViewportService, updateViewportHistograms, displaySetIds, isLoading]);
|
||||
|
||||
return (
|
||||
<PanelSection title="Window Level">
|
||||
{windowLevels.map((windowLevel, i) => {
|
||||
if (!windowLevel.histogram) {
|
||||
return null;
|
||||
}
|
||||
<PanelSection defaultOpen={true}>
|
||||
<PanelSection.Header>Window Level</PanelSection.Header>
|
||||
<PanelSection.Content className="bg-muted py-1">
|
||||
{windowLevels.map((windowLevel, i) => {
|
||||
if (!windowLevel.histogram) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<WindowLevel
|
||||
key={windowLevel.volumeId}
|
||||
title={`${windowLevel.modality}`}
|
||||
histogram={windowLevel.histogram}
|
||||
voi={windowLevel.voi}
|
||||
step={windowLevel.step}
|
||||
showOpacitySlider={windowLevel.showOpacitySlider}
|
||||
colormap={windowLevel.colormap}
|
||||
onVOIChange={voi => handleVOIChange(windowLevel.volumeId, voi)}
|
||||
opacity={windowLevel.opacity}
|
||||
onOpacityChange={opacity =>
|
||||
handleOpacityChange(windowLevel.viewportId, i, windowLevel.volumeId, opacity)
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
return (
|
||||
<WindowLevel
|
||||
key={windowLevel.volumeId}
|
||||
histogram={windowLevel.histogram}
|
||||
voi={windowLevel.voi}
|
||||
step={windowLevel.step}
|
||||
showOpacitySlider={windowLevel.showOpacitySlider}
|
||||
colormap={windowLevel.colormap}
|
||||
onVOIChange={voi => handleVOIChange(windowLevel.volumeId, voi)}
|
||||
opacity={windowLevel.opacity}
|
||||
onOpacityChange={opacity =>
|
||||
handleOpacityChange(windowLevel.viewportId, i, windowLevel.volumeId, opacity)
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{windowLevels.length === 0 && !isLoading && (
|
||||
<div className="text-muted-foreground py-2 text-center text-sm">
|
||||
No window level data available
|
||||
</div>
|
||||
)}
|
||||
{isLoading && (
|
||||
<div className="text-muted-foreground py-2 text-center text-sm">
|
||||
Loading window level data...
|
||||
</div>
|
||||
)}
|
||||
</PanelSection.Content>
|
||||
</PanelSection>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ export default function getSegmentationPanelCustomization({ commandsManager, ser
|
||||
// Get initial states based on current configuration
|
||||
const [previewEdits, setPreviewEdits] = useState(false);
|
||||
const [toggleSegmentEnabled, setToggleSegmentEnabled] = useState(false);
|
||||
|
||||
const [useCenterAsSegmentIndex, setUseCenterAsSegmentIndex] = useState(false);
|
||||
const handlePreviewEditsChange = checked => {
|
||||
setPreviewEdits(checked);
|
||||
commandsManager.run('toggleSegmentPreviewEdit', { toggle: checked });
|
||||
@@ -47,6 +47,11 @@ export default function getSegmentationPanelCustomization({ commandsManager, ser
|
||||
commandsManager.run('toggleSegmentSelect', { toggle: checked });
|
||||
};
|
||||
|
||||
const handleUseCenterAsSegmentIndexChange = checked => {
|
||||
setUseCenterAsSegmentIndex(checked);
|
||||
commandsManager.run('toggleUseCenterSegmentIndex', { toggle: checked });
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="bg-muted flex flex-col gap-4 border-b border-b-[2px] border-black px-2 py-3">
|
||||
<div className="flex items-center gap-2">
|
||||
@@ -57,12 +62,20 @@ export default function getSegmentationPanelCustomization({ commandsManager, ser
|
||||
<span className="text-base text-white">Preview edits before creating</span>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
<Switch
|
||||
checked={useCenterAsSegmentIndex}
|
||||
onCheckedChange={handleUseCenterAsSegmentIndexChange}
|
||||
/>
|
||||
<span className="text-base text-white">Use Center as Segment Index</span>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
<Switch
|
||||
checked={toggleSegmentEnabled}
|
||||
onCheckedChange={handleToggleSegmentEnabledChange}
|
||||
/>
|
||||
<span className="text-base text-white">Highlight segments to select</span>
|
||||
<span className="text-base text-white">Hover on segment border to activate</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -38,7 +38,9 @@ import {
|
||||
OrientationMarkerTool,
|
||||
WindowLevelRegionTool,
|
||||
SegmentSelectTool,
|
||||
RegionSegmentPlusTool,
|
||||
} from '@cornerstonejs/tools';
|
||||
import { LabelmapSlicePropagationTool, MarkerLabelmapTool } from '@cornerstonejs/ai';
|
||||
import * as polySeg from '@cornerstonejs/polymorphic-segmentation';
|
||||
|
||||
import CalibrationLineTool from './tools/CalibrationLineTool';
|
||||
@@ -98,6 +100,9 @@ export default function initCornerstoneTools(configuration = {}) {
|
||||
addTool(WindowLevelRegionTool);
|
||||
addTool(PlanarFreehandContourSegmentationTool);
|
||||
addTool(SegmentSelectTool);
|
||||
addTool(LabelmapSlicePropagationTool);
|
||||
addTool(MarkerLabelmapTool);
|
||||
addTool(RegionSegmentPlusTool);
|
||||
// Modify annotation tools to use dashed lines on SR
|
||||
const annotationStyle = {
|
||||
textBoxFontSize: '15px',
|
||||
@@ -152,6 +157,9 @@ const toolNames = {
|
||||
PlanarFreehandContourSegmentation: PlanarFreehandContourSegmentationTool.toolName,
|
||||
SegmentBidirectional: SegmentBidirectionalTool.toolName,
|
||||
SegmentSelect: SegmentSelectTool.toolName,
|
||||
LabelmapSlicePropagation: LabelmapSlicePropagationTool.toolName,
|
||||
MarkerLabelmap: MarkerLabelmapTool.toolName,
|
||||
RegionSegmentPlus: RegionSegmentPlusTool.toolName,
|
||||
};
|
||||
|
||||
export { toolNames };
|
||||
@@ -360,7 +360,7 @@ class SegmentationService extends PubSubService {
|
||||
type: LABELMAP,
|
||||
data: {
|
||||
imageIds: segImageIds,
|
||||
referencedVolumeId: this._getVolumeIdForDisplaySet(displaySet),
|
||||
// referencedVolumeId: this._getVolumeIdForDisplaySet(displaySet),
|
||||
referencedImageIds: referenceImageIds,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-default
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-default
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-default",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/i18n": "3.10.0-beta.141",
|
||||
"@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",
|
||||
|
||||
@@ -42,14 +42,14 @@ export function ToolBoxButtonGroupWrapper({ groupId, buttonSection, ...props })
|
||||
);
|
||||
}
|
||||
|
||||
export function ToolBoxButtonWrapper({ onInteraction, options, ...props }) {
|
||||
export function ToolBoxButtonWrapper({ onInteraction, className, options, ...props }) {
|
||||
return (
|
||||
<div className="bg-popover flex flex-row rounded-md px-0 py-0">
|
||||
<ToolButton
|
||||
{...props}
|
||||
id={props.id}
|
||||
size="small"
|
||||
className={classNames(props.disabled && 'text-foreground/70')}
|
||||
className={classNames(props.disabled && 'text-foreground/70', className)}
|
||||
onInteraction={event => {
|
||||
onInteraction?.({
|
||||
event,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useState, useCallback } from 'react';
|
||||
import React, { useEffect, useState, useCallback, useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { InvestigationalUseDialog } from '@ohif/ui';
|
||||
@@ -55,6 +55,18 @@ 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();
|
||||
}
|
||||
};
|
||||
|
||||
const LoadingIndicatorProgress = customizationService.getCustomization(
|
||||
'ui.loadingIndicatorProgress'
|
||||
);
|
||||
@@ -150,16 +162,17 @@ function ViewerLayout({
|
||||
{showLoadingIndicator && <LoadingIndicatorProgress className="h-full w-full bg-black" />}
|
||||
<ResizablePanelGroup {...resizablePanelGroupProps}>
|
||||
{/* LEFT SIDEPANELS */}
|
||||
|
||||
{hasLeftPanels ? (
|
||||
<>
|
||||
<ResizablePanel {...resizableLeftPanelProps}>
|
||||
<SidePanelWithServices
|
||||
side="left"
|
||||
isExpanded={!leftPanelClosedState}
|
||||
servicesManager={servicesManager}
|
||||
{...leftPanelProps}
|
||||
/>
|
||||
<div ref={leftPanelRef}>
|
||||
<SidePanelWithServices
|
||||
side="left"
|
||||
isExpanded={!leftPanelClosedState}
|
||||
servicesManager={servicesManager}
|
||||
{...leftPanelProps}
|
||||
/>
|
||||
</div>
|
||||
</ResizablePanel>
|
||||
<ResizableHandle
|
||||
onDragging={onHandleDragging}
|
||||
@@ -171,7 +184,10 @@ function ViewerLayout({
|
||||
{/* TOOLBAR + GRID */}
|
||||
<ResizablePanel {...resizableViewportGridPanelProps}>
|
||||
<div className="flex h-full flex-1 flex-col">
|
||||
<div className="relative flex h-full flex-1 items-center justify-center overflow-hidden bg-black">
|
||||
<div
|
||||
className="relative flex h-full flex-1 items-center justify-center overflow-hidden bg-black"
|
||||
onMouseEnter={handleMouseEnter}
|
||||
>
|
||||
<ViewportGridComp
|
||||
servicesManager={servicesManager}
|
||||
viewportComponents={viewportComponents}
|
||||
@@ -188,12 +204,14 @@ function ViewerLayout({
|
||||
className={resizableHandleClassName}
|
||||
/>
|
||||
<ResizablePanel {...resizableRightPanelProps}>
|
||||
<SidePanelWithServices
|
||||
side="right"
|
||||
isExpanded={!rightPanelClosedState}
|
||||
servicesManager={servicesManager}
|
||||
{...rightPanelProps}
|
||||
/>
|
||||
<div ref={rightPanelRef}>
|
||||
<SidePanelWithServices
|
||||
side="right"
|
||||
isExpanded={!rightPanelClosedState}
|
||||
servicesManager={servicesManager}
|
||||
{...rightPanelProps}
|
||||
/>
|
||||
</div>
|
||||
</ResizablePanel>
|
||||
</>
|
||||
) : null}
|
||||
|
||||
@@ -95,7 +95,7 @@ export function Toolbox({ buttonSectionId, title }: { buttonSectionId: string; t
|
||||
)}
|
||||
</PanelSection.Header>
|
||||
|
||||
<PanelSection.Content className="flex-shrink-0 border-none">
|
||||
<PanelSection.Content className="bg-muted flex-shrink-0 border-none">
|
||||
{showConfig && <CustomConfigComponent />}
|
||||
{toolboxSections.map(section => {
|
||||
const sectionId = section.componentProps.buttonSection;
|
||||
@@ -131,7 +131,7 @@ export function Toolbox({ buttonSectionId, title }: { buttonSectionId: string; t
|
||||
);
|
||||
})}
|
||||
{activeToolOptions && (
|
||||
<div className="bg-primary-dark h-auto px-2">
|
||||
<div className="bg-primary-dark mt-1 h-auto px-2">
|
||||
<ToolSettings options={activeToolOptions} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-microscopy",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/i18n": "3.10.0-beta.141",
|
||||
"@ohif/ui": "3.10.0-beta.141",
|
||||
"@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",
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-pdf
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-pdf
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-pdf
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-pdf",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/ui": "3.10.0-beta.141",
|
||||
"@ohif/core": "3.10.0-beta.144",
|
||||
"@ohif/ui": "3.10.0-beta.144",
|
||||
"dcmjs": "*",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-video
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-video
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-video
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-video",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/ui": "3.10.0-beta.141",
|
||||
"@ohif/core": "3.10.0-beta.144",
|
||||
"@ohif/ui": "3.10.0-beta.144",
|
||||
"dcmjs": "*",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-measurement-tracking
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-measurement-tracking
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-measurement-tracking",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.7.17",
|
||||
"@cornerstonejs/tools": "^3.7.17",
|
||||
"@ohif/core": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/ui": "3.10.0-beta.141",
|
||||
"@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",
|
||||
"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.141",
|
||||
"@ohif/ui": "3.10.0-beta.144",
|
||||
"@xstate/react": "^3.2.2",
|
||||
"xstate": "^4.10.0"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-test
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-test
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-test
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-test",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/ui": "3.10.0-beta.141",
|
||||
"@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",
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-tmtv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-tmtv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-tmtv
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-tmtv",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/ui": "3.10.0-beta.141",
|
||||
"@ohif/core": "3.10.0-beta.144",
|
||||
"@ohif/ui": "3.10.0-beta.144",
|
||||
"dcmjs": "*",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"packages": ["extensions/*", "platform/*", "modes/*", "addOns/externals/*"],
|
||||
"npmClient": "yarn"
|
||||
}
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-basic-dev-mode",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-pdf": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-video": "3.10.0-beta.141"
|
||||
"@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"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-test
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-test
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-test
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-test",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-pdf": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-video": "3.10.0-beta.141",
|
||||
"@ohif/extension-measurement-tracking": "3.10.0-beta.141",
|
||||
"@ohif/extension-test": "3.10.0-beta.141"
|
||||
"@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"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
|
||||
@@ -42,8 +42,10 @@ export const setToolActiveToolbar = {
|
||||
|
||||
const ReferenceLinesListeners = [
|
||||
{
|
||||
commandName: 'setSourceViewportForReferenceLinesTool',
|
||||
context: 'CORNERSTONE',
|
||||
commandName: 'setViewportForToolConfiguration',
|
||||
commandOptions: {
|
||||
toolName: 'ReferenceLines',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-longitudinal
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-longitudinal
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-longitudinal
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-longitudinal",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-pdf": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-video": "3.10.0-beta.141",
|
||||
"@ohif/extension-measurement-tracking": "3.10.0-beta.141"
|
||||
"@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"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-microscopy
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-microscopy
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-microscopy
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-microscopy",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/extension-dicom-microscopy": "3.10.0-beta.141"
|
||||
"@ohif/core": "3.10.0-beta.144",
|
||||
"@ohif/extension-dicom-microscopy": "3.10.0-beta.144"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-preclinical-4d
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-preclinical-4d
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-preclinical-4d
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-preclinical-4d",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dynamic-volume": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/extension-tmtv": "3.10.0-beta.141"
|
||||
"@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"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-segmentation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-segmentation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-segmentation
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-segmentation",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-pdf": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-video": "3.10.0-beta.141"
|
||||
"@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"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
|
||||
@@ -92,11 +92,14 @@ function modeFactory({ modeConfiguration }) {
|
||||
'SegmentationTools',
|
||||
]);
|
||||
toolbarService.createButtonSection('segmentationToolboxUtilitySection', [
|
||||
'LabelmapSlicePropagation',
|
||||
'InterpolateLabelmap',
|
||||
'SegmentBidirectional',
|
||||
]);
|
||||
toolbarService.createButtonSection('segmentationToolboxToolsSection', [
|
||||
'BrushTools',
|
||||
'MarkerLabelmap',
|
||||
'RegionSegmentPlus',
|
||||
'Shapes',
|
||||
]);
|
||||
toolbarService.createButtonSection('brushToolsSection', ['Brush', 'Eraser', 'Threshold']);
|
||||
|
||||
@@ -27,6 +27,15 @@ function createTools(utilityModule) {
|
||||
activeStrategy: 'FILL_INSIDE_CIRCLE',
|
||||
},
|
||||
},
|
||||
{
|
||||
toolName: toolNames.LabelmapSlicePropagation,
|
||||
},
|
||||
{
|
||||
toolName: toolNames.MarkerLabelmap,
|
||||
},
|
||||
{
|
||||
toolName: toolNames.RegionSegmentPlus,
|
||||
},
|
||||
{
|
||||
toolName: 'CircularEraser',
|
||||
parentTool: 'Brush',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Button } from '@ohif/core/types';
|
||||
import { ViewportGridService } from '@ohif/core';
|
||||
|
||||
const setToolActiveToolbar = {
|
||||
commandName: 'setToolActiveToolbar',
|
||||
@@ -7,6 +8,15 @@ const setToolActiveToolbar = {
|
||||
},
|
||||
};
|
||||
|
||||
const callbacks = (toolName: string) => [
|
||||
{
|
||||
commandName: 'setViewportForToolConfiguration',
|
||||
commandOptions: {
|
||||
toolName,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const toolbarButtons: Button[] = [
|
||||
// sections
|
||||
{
|
||||
@@ -322,6 +332,94 @@ const toolbarButtons: Button[] = [
|
||||
commands: 'runSegmentBidirectional',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'RegionSegmentPlus',
|
||||
uiType: 'ohif.toolBoxButton',
|
||||
props: {
|
||||
icon: 'icon-tool-click-segment',
|
||||
label: 'One Click Segment',
|
||||
tooltip: 'One Click Segment',
|
||||
evaluate: {
|
||||
name: 'evaluate.cornerstone.segmentation',
|
||||
toolNames: ['RegionSegmentPlus'],
|
||||
disabledText: 'Create new segmentation to enable this tool.',
|
||||
},
|
||||
commands: 'setToolActiveToolbar',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'LabelmapSlicePropagation',
|
||||
uiType: 'ohif.toolBoxButton',
|
||||
props: {
|
||||
icon: 'icon-labelmap-slice-propagation',
|
||||
label: 'Labelmap Assist',
|
||||
tooltip: 'Labelmap Assist Based on Previous / Next Slice Data',
|
||||
evaluate: [
|
||||
'evaluate.cornerstoneTool.toggle',
|
||||
{
|
||||
name: 'evaluate.cornerstone.hasSegmentation',
|
||||
},
|
||||
],
|
||||
listeners: {
|
||||
[ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks(
|
||||
'LabelmapSlicePropagation'
|
||||
),
|
||||
[ViewportGridService.EVENTS.VIEWPORTS_READY]: callbacks('LabelmapSlicePropagation'),
|
||||
},
|
||||
commands: 'toggleEnabledDisabledToolbar',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'MarkerLabelmap',
|
||||
uiType: 'ohif.toolBoxButton',
|
||||
props: {
|
||||
icon: 'icon-marker-labelmap',
|
||||
label: 'Marker Guided Labelmap',
|
||||
tooltip:
|
||||
'Use Positive and Negative Points to Guide Labelmap Creation, hit N to move to next slice',
|
||||
evaluate: [
|
||||
{
|
||||
name: 'evaluate.cornerstone.segmentation',
|
||||
toolNames: ['MarkerLabelmap', 'MarkerInclude', 'MarkerExclude'],
|
||||
},
|
||||
],
|
||||
commands: 'setToolActiveToolbar',
|
||||
listeners: {
|
||||
[ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks('MarkerLabelmap'),
|
||||
[ViewportGridService.EVENTS.VIEWPORTS_READY]: callbacks('MarkerLabelmap'),
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Clear Markers',
|
||||
type: 'button',
|
||||
id: 'clear-markers',
|
||||
commands: 'clearMarkersForMarkerLabelmap',
|
||||
},
|
||||
{
|
||||
name: 'Marker Mode',
|
||||
type: 'radio',
|
||||
id: 'marker-mode',
|
||||
value: 'markerInclude',
|
||||
values: [
|
||||
{ value: 'markerInclude', label: 'Include' },
|
||||
{ value: 'markerExclude', label: 'Exclude' },
|
||||
],
|
||||
commands: ({ commandsManager, options }) => {
|
||||
const markerModeOption = options.find(option => option.id === 'marker-mode');
|
||||
if (markerModeOption.value === 'markerInclude') {
|
||||
commandsManager.run('setToolActive', {
|
||||
toolName: 'MarkerInclude',
|
||||
});
|
||||
} else {
|
||||
commandsManager.run('setToolActive', {
|
||||
toolName: 'MarkerExclude',
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'Eraser',
|
||||
uiType: 'ohif.toolBoxButton',
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-tmtv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-tmtv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/mode-tmtv
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/mode-tmtv",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-pdf": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-video": "3.10.0-beta.141",
|
||||
"@ohif/extension-measurement-tracking": "3.10.0-beta.141"
|
||||
"@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"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
|
||||
@@ -100,6 +100,10 @@ module.exports = (env, argv) => {
|
||||
ignore: ['**/config/**', '**/html-templates/**', '.DS_Store'],
|
||||
},
|
||||
},
|
||||
{
|
||||
from: '../../../node_modules/onnxruntime-web/dist',
|
||||
to: `${DIST_DIR}/ort`,
|
||||
},
|
||||
// Short term solution to make sure GCloud config is available in output
|
||||
// for our docker implementation
|
||||
{
|
||||
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/app
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/app
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
+19
-19
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/app",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.7.17",
|
||||
"@cornerstonejs/dicom-image-loader": "^3.8.2",
|
||||
"@emotion/serialize": "^1.1.3",
|
||||
"@ohif/core": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.141",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.141",
|
||||
"@ohif/extension-default": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-microscopy": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-pdf": "3.10.0-beta.141",
|
||||
"@ohif/extension-dicom-video": "3.10.0-beta.141",
|
||||
"@ohif/extension-test": "3.10.0-beta.141",
|
||||
"@ohif/i18n": "3.10.0-beta.141",
|
||||
"@ohif/mode-basic-dev-mode": "3.10.0-beta.141",
|
||||
"@ohif/mode-longitudinal": "3.10.0-beta.141",
|
||||
"@ohif/mode-microscopy": "3.10.0-beta.141",
|
||||
"@ohif/mode-test": "3.10.0-beta.141",
|
||||
"@ohif/ui": "3.10.0-beta.141",
|
||||
"@ohif/ui-next": "3.10.0-beta.141",
|
||||
"@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",
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/cli
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/cli
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/cli
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/cli",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"description": "A CLI to bootstrap new OHIF extension or mode",
|
||||
"type": "module",
|
||||
"main": "src/index.js",
|
||||
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/core",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"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.4",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.5",
|
||||
"@cornerstonejs/dicom-image-loader": "^3.7.17",
|
||||
"@ohif/ui": "3.10.0-beta.141",
|
||||
"@cornerstonejs/dicom-image-loader": "^3.8.2",
|
||||
"@ohif/ui": "3.10.0-beta.144",
|
||||
"cornerstone-math": "0.1.9",
|
||||
"dicom-parser": "^1.8.21"
|
||||
},
|
||||
|
||||
@@ -177,19 +177,24 @@ const bindings = [
|
||||
label: 'Reject Preview',
|
||||
keys: ['esc'],
|
||||
},
|
||||
// after we have the ui for undo/redo, we can add these back in
|
||||
// {
|
||||
// commandName: 'undo',
|
||||
// label: 'Undo',
|
||||
// keys: ['ctrl+z'],
|
||||
// isEditable: true,
|
||||
// },
|
||||
// {
|
||||
// commandName: 'redo',
|
||||
// label: 'Redo',
|
||||
// keys: ['ctrl+y'],
|
||||
// isEditable: true,
|
||||
// },
|
||||
{
|
||||
commandName: 'undo',
|
||||
label: 'Undo',
|
||||
keys: ['ctrl+z'],
|
||||
isEditable: true,
|
||||
},
|
||||
{
|
||||
commandName: 'redo',
|
||||
label: 'Redo',
|
||||
keys: ['ctrl+y'],
|
||||
isEditable: true,
|
||||
},
|
||||
{
|
||||
commandName: 'interpolateScrollForMarkerLabelmap',
|
||||
label: 'Interpolate Scroll',
|
||||
keys: ['n'],
|
||||
isEditable: true,
|
||||
},
|
||||
];
|
||||
|
||||
export default bindings;
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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-docs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package ohif-docs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package ohif-docs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package ohif-docs
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ohif-docs",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
@@ -48,6 +48,7 @@
|
||||
"@radix-ui/react-checkbox": "^1.1.1",
|
||||
"@radix-ui/react-dialog": "^1.1.1",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.1",
|
||||
"@radix-ui/react-hover-card": "^1.1.6",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"@radix-ui/react-label": "^2.1.0",
|
||||
"@radix-ui/react-popover": "^1.0.7",
|
||||
|
||||
@@ -9,6 +9,7 @@ import ShowcaseRow from './ShowcaseRow';
|
||||
export default function NumericShowcase() {
|
||||
const [controlledValue, setControlledValue] = useState(0);
|
||||
const [controlledValues, setControlledValues] = useState([0, 100] as [number, number]);
|
||||
const [dimensionGroupNumber, setDimensionGroupNumber] = useState(1);
|
||||
|
||||
return (
|
||||
<div className="space-y-8">
|
||||
@@ -87,6 +88,108 @@ export default function NumericShowcase() {
|
||||
</div>
|
||||
</ShowcaseRow>
|
||||
|
||||
{/* Stepper Controls */}
|
||||
<ShowcaseRow
|
||||
title="Numeric - Stepper Controls"
|
||||
description="Number input with increment/decrement controls in horizontal or vertical layout"
|
||||
code={`
|
||||
// For controlled component
|
||||
const [dimensionGroupNumber, setDimensionGroupNumber] = useState(1);
|
||||
|
||||
<Numeric.Container
|
||||
mode="stepper"
|
||||
value={dimensionGroupNumber}
|
||||
onChange={val => setDimensionGroupNumber(val as number)}
|
||||
min={1}
|
||||
max={5}
|
||||
step={1}
|
||||
>
|
||||
<div className="flex flex-col items-center">
|
||||
<Numeric.NumberStepper className="w-[58px]" direction="horizontal"/>
|
||||
<Numeric.Label className="mt-1">Frame</Numeric.Label>
|
||||
</div>
|
||||
</Numeric.Container>
|
||||
|
||||
<Numeric.Container
|
||||
mode="stepper"
|
||||
min={0}
|
||||
max={100}
|
||||
step={1}
|
||||
defaultValue={50}
|
||||
>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Numeric.Label>Opacity</Numeric.Label>
|
||||
<Numeric.NumberStepper className="w-[58px]" direction="horizontal"/>
|
||||
</div>
|
||||
</Numeric.Container>
|
||||
|
||||
<Numeric.Container
|
||||
mode="stepper"
|
||||
min={-10}
|
||||
max={10}
|
||||
step={0.1}
|
||||
defaultValue={0}
|
||||
>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Numeric.Label>Zoom:</Numeric.Label>
|
||||
<Numeric.NumberStepper className="w-[65px]" direction="vertical"/>
|
||||
</div>
|
||||
</Numeric.Container>`}
|
||||
>
|
||||
<div className="bg-popover flex w-[300px] flex-col space-y-4 rounded p-4">
|
||||
<Numeric.Container
|
||||
mode="stepper"
|
||||
value={dimensionGroupNumber}
|
||||
onChange={val => setDimensionGroupNumber(val as number)}
|
||||
min={1}
|
||||
max={5}
|
||||
step={1}
|
||||
>
|
||||
<div className="flex flex-col items-center">
|
||||
<Numeric.NumberStepper
|
||||
className="flex w-[78px]"
|
||||
direction="horizontal"
|
||||
>
|
||||
<span className="text-muted-foreground text-xs">FPS</span>
|
||||
</Numeric.NumberStepper>
|
||||
<Numeric.Label className="mt-1">Frame</Numeric.Label>
|
||||
</div>
|
||||
</Numeric.Container>
|
||||
|
||||
<Numeric.Container
|
||||
mode="stepper"
|
||||
min={0}
|
||||
max={100}
|
||||
step={1}
|
||||
defaultValue={50}
|
||||
>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Numeric.Label>Opacity</Numeric.Label>
|
||||
<Numeric.NumberStepper
|
||||
className="w-[58px]"
|
||||
direction="horizontal"
|
||||
/>
|
||||
</div>
|
||||
</Numeric.Container>
|
||||
|
||||
<Numeric.Container
|
||||
mode="stepper"
|
||||
min={-10}
|
||||
max={10}
|
||||
step={0.1}
|
||||
defaultValue={0}
|
||||
>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Numeric.NumberStepper
|
||||
className="w-[65px]"
|
||||
direction="vertical"
|
||||
/>
|
||||
<Numeric.Label>Zoom</Numeric.Label>
|
||||
</div>
|
||||
</Numeric.Container>
|
||||
</div>
|
||||
</ShowcaseRow>
|
||||
|
||||
{/* Single Range Slider */}
|
||||
<ShowcaseRow
|
||||
title="Numeric - Single Range"
|
||||
@@ -268,6 +371,20 @@ const [controlledValues, setControlledValues] = useState<[number, number]>([0, 1
|
||||
<Numeric.NumberInput />
|
||||
</Numeric.Container>
|
||||
|
||||
<Numeric.Container
|
||||
mode="stepper"
|
||||
min={-5}
|
||||
max={5}
|
||||
step={0.5}
|
||||
defaultValue={0}
|
||||
>
|
||||
<div className="flex items-center justify-between">
|
||||
<Numeric.Label>Offset</Numeric.Label>
|
||||
<Numeric.NumberStepper className="w-[58px]">
|
||||
</Numeric.NumberStepper>
|
||||
</div>
|
||||
</Numeric.Container>
|
||||
|
||||
<Numeric.Container
|
||||
mode="singleRange"
|
||||
min={0}
|
||||
@@ -302,6 +419,22 @@ const [controlledValues, setControlledValues] = useState<[number, number]>([0, 1
|
||||
<Numeric.NumberInput />
|
||||
</Numeric.Container>
|
||||
|
||||
<Numeric.Container
|
||||
mode="stepper"
|
||||
min={-5}
|
||||
max={5}
|
||||
step={0.5}
|
||||
defaultValue={0}
|
||||
>
|
||||
<div className="flex items-center justify-between">
|
||||
<Numeric.Label>Offset</Numeric.Label>
|
||||
<Numeric.NumberStepper
|
||||
className="w-[58px]"
|
||||
direction="horizontal"
|
||||
/>
|
||||
</div>
|
||||
</Numeric.Container>
|
||||
|
||||
<Numeric.Container
|
||||
mode="singleRange"
|
||||
min={0}
|
||||
|
||||
@@ -2527,6 +2527,13 @@
|
||||
dependencies:
|
||||
"@radix-ui/react-primitive" "2.0.1"
|
||||
|
||||
"@radix-ui/react-arrow@1.1.2":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-arrow/-/react-arrow-1.1.2.tgz#30c0d574d7bb10eed55cd7007b92d38b03c6b2ab"
|
||||
integrity sha512-G+KcpzXHq24iH0uGG/pF8LyzpFJYGD4RfLjCIBfGdSLXvjLHST31RUiRVrupIBMvIppMgSzQ6l66iAxl03tdlg==
|
||||
dependencies:
|
||||
"@radix-ui/react-primitive" "2.0.2"
|
||||
|
||||
"@radix-ui/react-checkbox@^1.1.1":
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-checkbox/-/react-checkbox-1.1.3.tgz#0e2ab913fddf3c88603625f7a9457d73882c8a32"
|
||||
@@ -2611,6 +2618,17 @@
|
||||
"@radix-ui/react-use-callback-ref" "1.1.0"
|
||||
"@radix-ui/react-use-escape-keydown" "1.1.0"
|
||||
|
||||
"@radix-ui/react-dismissable-layer@1.1.5":
|
||||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.5.tgz#96dde2be078c694a621e55e047406c58cd5fe774"
|
||||
integrity sha512-E4TywXY6UsXNRhFrECa5HAvE5/4BFcGyfTyK36gP+pAW1ed7UTK4vKwdr53gAJYwqbfCWC6ATvJa3J3R/9+Qrg==
|
||||
dependencies:
|
||||
"@radix-ui/primitive" "1.1.1"
|
||||
"@radix-ui/react-compose-refs" "1.1.1"
|
||||
"@radix-ui/react-primitive" "2.0.2"
|
||||
"@radix-ui/react-use-callback-ref" "1.1.0"
|
||||
"@radix-ui/react-use-escape-keydown" "1.1.0"
|
||||
|
||||
"@radix-ui/react-dropdown-menu@^2.1.1":
|
||||
version "2.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.4.tgz#5e1f453296dd9ae99224a26c36851832d26cf507"
|
||||
@@ -2638,6 +2656,21 @@
|
||||
"@radix-ui/react-primitive" "2.0.1"
|
||||
"@radix-ui/react-use-callback-ref" "1.1.0"
|
||||
|
||||
"@radix-ui/react-hover-card@^1.1.6":
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-hover-card/-/react-hover-card-1.1.6.tgz#94fb87c047e1bb3bfd70439cf7ee48165ea4efa5"
|
||||
integrity sha512-E4ozl35jq0VRlrdc4dhHrNSV0JqBb4Jy73WAhBEK7JoYnQ83ED5r0Rb/XdVKw89ReAJN38N492BAPBZQ57VmqQ==
|
||||
dependencies:
|
||||
"@radix-ui/primitive" "1.1.1"
|
||||
"@radix-ui/react-compose-refs" "1.1.1"
|
||||
"@radix-ui/react-context" "1.1.1"
|
||||
"@radix-ui/react-dismissable-layer" "1.1.5"
|
||||
"@radix-ui/react-popper" "1.2.2"
|
||||
"@radix-ui/react-portal" "1.1.4"
|
||||
"@radix-ui/react-presence" "1.1.2"
|
||||
"@radix-ui/react-primitive" "2.0.2"
|
||||
"@radix-ui/react-use-controllable-state" "1.1.0"
|
||||
|
||||
"@radix-ui/react-icons@^1.3.0":
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-icons/-/react-icons-1.3.2.tgz#09be63d178262181aeca5fb7f7bc944b10a7f441"
|
||||
@@ -2718,6 +2751,22 @@
|
||||
"@radix-ui/react-use-size" "1.1.0"
|
||||
"@radix-ui/rect" "1.1.0"
|
||||
|
||||
"@radix-ui/react-popper@1.2.2":
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-popper/-/react-popper-1.2.2.tgz#d2e1ee5a9b24419c5936a1b7f6f472b7b412b029"
|
||||
integrity sha512-Rvqc3nOpwseCyj/rgjlJDYAgyfw7OC1tTkKn2ivhaMGcYt8FSBlahHOZak2i3QwkRXUXgGgzeEe2RuqeEHuHgA==
|
||||
dependencies:
|
||||
"@floating-ui/react-dom" "^2.0.0"
|
||||
"@radix-ui/react-arrow" "1.1.2"
|
||||
"@radix-ui/react-compose-refs" "1.1.1"
|
||||
"@radix-ui/react-context" "1.1.1"
|
||||
"@radix-ui/react-primitive" "2.0.2"
|
||||
"@radix-ui/react-use-callback-ref" "1.1.0"
|
||||
"@radix-ui/react-use-layout-effect" "1.1.0"
|
||||
"@radix-ui/react-use-rect" "1.1.0"
|
||||
"@radix-ui/react-use-size" "1.1.0"
|
||||
"@radix-ui/rect" "1.1.0"
|
||||
|
||||
"@radix-ui/react-portal@1.1.3":
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.1.3.tgz#b0ea5141103a1671b715481b13440763d2ac4440"
|
||||
@@ -2726,6 +2775,14 @@
|
||||
"@radix-ui/react-primitive" "2.0.1"
|
||||
"@radix-ui/react-use-layout-effect" "1.1.0"
|
||||
|
||||
"@radix-ui/react-portal@1.1.4":
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.1.4.tgz#ff5401ff63c8a825c46eea96d3aef66074b8c0c8"
|
||||
integrity sha512-sn2O9k1rPFYVyKd5LAJfo96JlSGVFpa1fS6UuBJfrZadudiw5tAmru+n1x7aMRQ84qDM71Zh1+SzK5QwU0tJfA==
|
||||
dependencies:
|
||||
"@radix-ui/react-primitive" "2.0.2"
|
||||
"@radix-ui/react-use-layout-effect" "1.1.0"
|
||||
|
||||
"@radix-ui/react-presence@1.1.2":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.2.tgz#bb764ed8a9118b7ec4512da5ece306ded8703cdc"
|
||||
@@ -2741,6 +2798,13 @@
|
||||
dependencies:
|
||||
"@radix-ui/react-slot" "1.1.1"
|
||||
|
||||
"@radix-ui/react-primitive@2.0.2":
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz#ac8b7854d87b0d7af388d058268d9a7eb64ca8ef"
|
||||
integrity sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==
|
||||
dependencies:
|
||||
"@radix-ui/react-slot" "1.1.2"
|
||||
|
||||
"@radix-ui/react-roving-focus@1.1.1":
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.1.tgz#3b3abb1e03646937f28d9ab25e96343667ca6520"
|
||||
@@ -2829,6 +2893,13 @@
|
||||
dependencies:
|
||||
"@radix-ui/react-compose-refs" "1.1.1"
|
||||
|
||||
"@radix-ui/react-slot@1.1.2":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.1.2.tgz#daffff7b2bfe99ade63b5168407680b93c00e1c6"
|
||||
integrity sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==
|
||||
dependencies:
|
||||
"@radix-ui/react-compose-refs" "1.1.1"
|
||||
|
||||
"@radix-ui/react-switch@^1.1.0":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/react-switch/-/react-switch-1.1.2.tgz#61323f4cccf25bf56c95fceb3b56ce1407bc9aec"
|
||||
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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/i18n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/i18n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/i18n
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/i18n
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/i18n",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"description": "Internationalization library for The OHIF Viewer",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -3,6 +3,33 @@
|
||||
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.144](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.143...v3.10.0-beta.144) (2025-04-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **segmentation:** Enhance Segmentation with New AI and Once Click Tools ([#4910](https://github.com/OHIF/Viewers/issues/4910)) ([c75a3f3](https://github.com/OHIF/Viewers/commit/c75a3f3af58c4cd29c349338e4065269d8d9f387))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui-next
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui-next
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/ui-next",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"description": "Next version of OHIF Viewers UI, more customizable using shadcn/ui",
|
||||
"main": "dist/ohif-ui-next.umd.js",
|
||||
"module": "src/index.ts",
|
||||
|
||||
@@ -132,6 +132,7 @@ import {
|
||||
ToolSegmentAnything,
|
||||
ToolContract,
|
||||
ToolExpand,
|
||||
ToolClickSegment,
|
||||
} from './Sources/Tools';
|
||||
import ActionNewDialog from './Sources/ActionNewDialog';
|
||||
import NotificationInfo from './Sources/NotificationInfo';
|
||||
@@ -597,9 +598,10 @@ export const Icons = {
|
||||
'checkbox-active': (props: IconProps) => CheckBoxChecked(props),
|
||||
'icon-tool-eraser': (props: IconProps) => ToolEraser(props),
|
||||
'icon-tool-brush': (props: IconProps) => ToolBrush(props),
|
||||
'icon-tool-labelmap-assist': (props: IconProps) => ToolLabelmapAssist(props),
|
||||
'icon-tool-segment-anything': (props: IconProps) => ToolSegmentAnything(props),
|
||||
'icon-labelmap-slice-propagation': (props: IconProps) => ToolLabelmapAssist(props),
|
||||
'icon-marker-labelmap': (props: IconProps) => ToolSegmentAnything(props),
|
||||
'icon-tool-threshold': (props: IconProps) => ToolThreshold(props),
|
||||
'icon-tool-click-segment': (props: IconProps) => ToolClickSegment(props),
|
||||
'icon-tool-pet-segment': (props: IconProps) => ToolPETSegment(props),
|
||||
'icon-tool-interpolation': (props: IconProps) => ToolInterpolation(props),
|
||||
'icon-tool-bidirectional-segment': (props: IconProps) => ToolBidirectionalSegment(props),
|
||||
|
||||
@@ -97,6 +97,27 @@ export const ToolLayout = (props: IconProps) => (
|
||||
</svg>
|
||||
);
|
||||
|
||||
export const ToolClickSegment = (props: IconProps) => (
|
||||
<svg
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
d="M18.7855 10.7063C19.0677 8.68223 18.754 6.39013 17.3334 4.86666C15.7881 3.20953 13.3171 2.78346 11.098 3.09398C9.51269 3.31581 7.93737 4.03721 6.63198 5.25454C5.24718 6.54592 4.39791 8.17926 4.11016 9.84527C3.74697 11.9481 4.27832 14.1031 5.75643 15.6882C7.30168 17.3453 9.54033 18.0136 11.7594 17.7031"
|
||||
stroke="currentColor"
|
||||
strokeWidth="1.5"
|
||||
strokeLinecap="round"
|
||||
/>
|
||||
<path
|
||||
d="M15.0003 18.562L15.0714 12.3038C15.0714 12.1629 15.1293 12.0689 15.2452 12.0219C15.3663 11.9749 15.4769 12.0036 15.577 12.108L19.8981 16.502C20.0034 16.6169 20.0271 16.7318 19.9692 16.8467C19.9165 16.9615 19.8164 17.0216 19.669 17.0268L17.9627 17.0973L19.353 20.2929C19.3899 20.366 19.3951 20.4391 19.3688 20.5123C19.3477 20.5854 19.303 20.6376 19.2345 20.6689L18.4445 20.9822C18.3708 21.0083 18.2997 21.0057 18.2312 20.9744C18.1628 20.943 18.1128 20.8908 18.0812 20.8177L16.754 17.5673L15.5533 18.7656C15.4532 18.8648 15.3347 18.8935 15.1978 18.8518C15.0609 18.81 14.995 18.7134 15.0003 18.562Z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
|
||||
export const ToolLength = (props: IconProps) => (
|
||||
<svg
|
||||
width="28px"
|
||||
|
||||
@@ -0,0 +1,405 @@
|
||||
import * as React from 'react';
|
||||
import { cn } from '../../lib/utils';
|
||||
import { Input } from '../Input/Input';
|
||||
import { Button } from '../Button/Button';
|
||||
import { ChevronUp, ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';
|
||||
|
||||
// Calculate decimal places based on step
|
||||
const getDecimalPlaces = (step: number): number => {
|
||||
if (Number.isInteger(step)) {
|
||||
return 0;
|
||||
}
|
||||
const stepStr = step.toString();
|
||||
if (stepStr.includes('.')) {
|
||||
return stepStr.split('.')[1].length;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
// Enhanced context type - includes shared constraints
|
||||
type InputNumberContextType = {
|
||||
value: number | string;
|
||||
setValue: React.Dispatch<React.SetStateAction<number | string>>;
|
||||
onChange: (value: number) => void;
|
||||
// Shared constraints that can be used by subcomponents
|
||||
constraints?: {
|
||||
min?: number;
|
||||
max?: number;
|
||||
step?: number;
|
||||
disabled?: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
// Create context
|
||||
const InputNumberContext = React.createContext<InputNumberContextType | undefined>(undefined);
|
||||
|
||||
// Hook to use context
|
||||
const useInputNumber = () => {
|
||||
const context = React.useContext(InputNumberContext);
|
||||
if (!context) {
|
||||
throw new Error('useInputNumber must be used within an <InputNumber> component');
|
||||
}
|
||||
return context;
|
||||
};
|
||||
|
||||
// Simplified root component props
|
||||
export interface InputNumberProps {
|
||||
value: number;
|
||||
onChange: (value: number) => void;
|
||||
className?: string;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
// The single top-level InputNumber component - much simpler now
|
||||
const InputNumber = React.forwardRef<HTMLDivElement, InputNumberProps>(
|
||||
({ value, onChange, className, children, ...props }, ref) => {
|
||||
const [inputValue, setInputValue] = React.useState<number | string>(value);
|
||||
|
||||
// Update internal state when prop changes
|
||||
React.useEffect(() => {
|
||||
setInputValue(value);
|
||||
}, [value]);
|
||||
|
||||
// Context value - only core state
|
||||
const contextValue = React.useMemo(
|
||||
() => ({
|
||||
value: inputValue,
|
||||
setValue: setInputValue,
|
||||
onChange,
|
||||
}),
|
||||
[inputValue, onChange]
|
||||
);
|
||||
|
||||
return (
|
||||
<InputNumberContext.Provider value={contextValue}>
|
||||
<div
|
||||
ref={ref}
|
||||
className={cn('flex', className)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
</InputNumberContext.Provider>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
InputNumber.displayName = 'InputNumber';
|
||||
|
||||
// Input component with its own constraints
|
||||
export interface InputNumberInputProps
|
||||
extends Omit<React.ComponentPropsWithoutRef<typeof Input>, 'onChange'> {
|
||||
min?: number;
|
||||
max?: number;
|
||||
step?: number;
|
||||
}
|
||||
|
||||
const InputNumberInput = React.forwardRef<HTMLInputElement, InputNumberInputProps>(
|
||||
({ className, min, max, step, ...props }, ref) => {
|
||||
// Get context which may include constraints from parent
|
||||
const { value, setValue, onChange, constraints = {} } = useInputNumber();
|
||||
|
||||
// Use provided props or fall back to parent constraints or defaults
|
||||
const effectiveMin = min ?? constraints.min ?? 0;
|
||||
const effectiveMax = max ?? constraints.max ?? 100;
|
||||
const effectiveStep = step ?? constraints.step ?? 1;
|
||||
const decimalPlaces = getDecimalPlaces(effectiveStep);
|
||||
|
||||
// Format displayed value with proper decimal places
|
||||
const displayValue = React.useMemo(() => {
|
||||
if (typeof value === 'string') {
|
||||
return value;
|
||||
}
|
||||
return decimalPlaces > 0 ? value.toFixed(decimalPlaces) : value.toString();
|
||||
}, [value, decimalPlaces]);
|
||||
|
||||
// Handle input change with constraint awareness
|
||||
const handleInputChange = React.useCallback(
|
||||
(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const val = e.target.value;
|
||||
|
||||
// Allow empty string, minus sign, or decimal point for flexibility
|
||||
if (val === '' || val === '-' || val === '.') {
|
||||
setValue(val);
|
||||
return;
|
||||
}
|
||||
|
||||
const numValue = Number(val);
|
||||
if (!isNaN(numValue)) {
|
||||
setValue(numValue);
|
||||
// Only call onChange if value is within boundaries
|
||||
if (numValue >= effectiveMin && numValue <= effectiveMax) {
|
||||
onChange(numValue);
|
||||
}
|
||||
}
|
||||
},
|
||||
[effectiveMin, effectiveMax, onChange, setValue]
|
||||
);
|
||||
|
||||
// Handle blur to format and validate
|
||||
const handleBlur = React.useCallback(() => {
|
||||
if (typeof value === 'string') {
|
||||
// Handle empty or partial inputs
|
||||
if (value === '' || value === '-' || value === '.') {
|
||||
setValue(effectiveMin);
|
||||
onChange(effectiveMin);
|
||||
return;
|
||||
}
|
||||
|
||||
const numValue = parseFloat(value);
|
||||
if (isNaN(numValue)) {
|
||||
setValue(effectiveMin);
|
||||
onChange(effectiveMin);
|
||||
return;
|
||||
}
|
||||
|
||||
// Constrain value to min/max
|
||||
const boundedValue = Math.max(effectiveMin, Math.min(effectiveMax, numValue));
|
||||
setValue(boundedValue);
|
||||
onChange(boundedValue);
|
||||
}
|
||||
}, [value, effectiveMin, effectiveMax, onChange, setValue]);
|
||||
|
||||
return (
|
||||
<Input
|
||||
ref={ref}
|
||||
type="text"
|
||||
value={displayValue}
|
||||
onChange={handleInputChange}
|
||||
onBlur={handleBlur}
|
||||
className={cn(
|
||||
'h-6 appearance-none border-none p-0 text-center shadow-none focus:border-none focus:outline-none',
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
InputNumberInput.displayName = 'InputNumber.Input';
|
||||
|
||||
// Label component with position prop
|
||||
export interface InputNumberLabelProps extends React.HTMLAttributes<HTMLLabelElement> {
|
||||
position?: 'left' | 'right' | 'top' | 'bottom';
|
||||
}
|
||||
|
||||
const InputNumberLabel = React.forwardRef<HTMLLabelElement, InputNumberLabelProps>(
|
||||
({ className, position = 'left', children, ...props }, ref) => {
|
||||
const positionClasses = {
|
||||
left: 'mr-2',
|
||||
right: 'ml-2',
|
||||
top: 'mb-1',
|
||||
bottom: 'mt-1',
|
||||
};
|
||||
|
||||
return (
|
||||
<label
|
||||
ref={ref}
|
||||
className={cn('text-muted-foreground text-xs', positionClasses[position], className)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</label>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
InputNumberLabel.displayName = 'InputNumber.Label';
|
||||
|
||||
// Container for horizontal button layout with constraints that are shared via context
|
||||
export interface InputNumberHorizontalControlsProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
min?: number;
|
||||
max?: number;
|
||||
step?: number;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
const InputNumberHorizontalControls = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
InputNumberHorizontalControlsProps
|
||||
>(({ className, children, min = 0, max = 100, step = 1, disabled = false, ...props }, ref) => {
|
||||
// Get existing context and enhance it with constraints
|
||||
const context = useInputNumber();
|
||||
const { value, onChange } = context;
|
||||
|
||||
// Set constraints in context for child components to use
|
||||
React.useEffect(() => {
|
||||
context.constraints = { min, max, step, disabled };
|
||||
}, [context, min, max, step, disabled]);
|
||||
|
||||
// Increment function with local constraints
|
||||
const increment = React.useCallback(() => {
|
||||
if (disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
const currentValue = typeof value === 'string' ? parseFloat(value) || min : value;
|
||||
const newValue = Math.min(currentValue + step, max);
|
||||
onChange(newValue);
|
||||
}, [value, min, max, step, onChange, disabled]);
|
||||
|
||||
// Decrement function with local constraints
|
||||
const decrement = React.useCallback(() => {
|
||||
if (disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
const currentValue = typeof value === 'string' ? parseFloat(value) || min : value;
|
||||
const newValue = Math.max(currentValue - step, min);
|
||||
onChange(newValue);
|
||||
}, [value, min, max, step, onChange, disabled]);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={cn('flex flex-row items-center', className)}
|
||||
{...props}
|
||||
>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={decrement}
|
||||
disabled={disabled}
|
||||
className="text-primary h-6 w-4 cursor-pointer p-0"
|
||||
>
|
||||
<ChevronLeft className="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
{children}
|
||||
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={increment}
|
||||
disabled={disabled}
|
||||
className="text-primary h-6 w-4 cursor-pointer p-0"
|
||||
>
|
||||
<ChevronRight className="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
InputNumberHorizontalControls.displayName = 'InputNumber.HorizontalControls';
|
||||
|
||||
// Vertical controls with its own constraints
|
||||
export interface InputNumberVerticalControlsProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
min?: number;
|
||||
max?: number;
|
||||
step?: number;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
const InputNumberVerticalControls = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
InputNumberVerticalControlsProps
|
||||
>(({ className, children, min = 0, max = 100, step = 1, disabled = false, ...props }, ref) => {
|
||||
// Get existing context and enhance it with constraints
|
||||
const context = useInputNumber();
|
||||
const { value, onChange } = context;
|
||||
|
||||
// Set constraints in context for child components to use
|
||||
React.useEffect(() => {
|
||||
context.constraints = { min, max, step, disabled };
|
||||
}, [context, min, max, step, disabled]);
|
||||
|
||||
// Increment function with local constraints
|
||||
const increment = React.useCallback(() => {
|
||||
if (disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
const currentValue = typeof value === 'string' ? parseFloat(value) || min : value;
|
||||
const newValue = Math.min(currentValue + step, max);
|
||||
onChange(newValue);
|
||||
}, [value, min, max, step, onChange, disabled]);
|
||||
|
||||
// Decrement function with local constraints
|
||||
const decrement = React.useCallback(() => {
|
||||
if (disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
const currentValue = typeof value === 'string' ? parseFloat(value) || min : value;
|
||||
const newValue = Math.max(currentValue - step, min);
|
||||
onChange(newValue);
|
||||
}, [value, min, max, step, onChange, disabled]);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={cn('flex items-center', className)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
<div className="ml-1 flex flex-col">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={increment}
|
||||
disabled={disabled}
|
||||
className="text-primary h-3 w-5 pr-px"
|
||||
>
|
||||
<ChevronUp className="h-3 w-3" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={decrement}
|
||||
disabled={disabled}
|
||||
className="text-primary h-3 w-5 pr-px"
|
||||
>
|
||||
<ChevronDown className="h-3 w-3" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
InputNumberVerticalControls.displayName = 'InputNumber.VerticalControls';
|
||||
|
||||
// Container with size prop
|
||||
const sizesClasses = {
|
||||
sm: 'w-[45px] h-[28px]',
|
||||
md: 'w-[58px] h-[28px]',
|
||||
lg: 'w-[206px] h-[35px]',
|
||||
};
|
||||
|
||||
export interface InputNumberContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
size?: 'sm' | 'md' | 'lg';
|
||||
sizeClassName?: string;
|
||||
}
|
||||
|
||||
const InputNumberContainer = React.forwardRef<HTMLDivElement, InputNumberContainerProps>(
|
||||
({ className, size = 'md', sizeClassName, children, ...props }, ref) => {
|
||||
const sizeToUse = sizeClassName || sizesClasses[size];
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={cn(
|
||||
'bg-background border-input flex items-center rounded-md border',
|
||||
sizeToUse,
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
InputNumberContainer.displayName = 'InputNumber.Container';
|
||||
|
||||
// Attach subcomponents
|
||||
Object.assign(InputNumber, {
|
||||
Input: InputNumberInput,
|
||||
Label: InputNumberLabel,
|
||||
Container: InputNumberContainer,
|
||||
HorizontalControls: InputNumberHorizontalControls,
|
||||
VerticalControls: InputNumberVerticalControls,
|
||||
});
|
||||
|
||||
export { InputNumber };
|
||||
@@ -0,0 +1,3 @@
|
||||
import { InputNumber } from './InputNumber';
|
||||
export { InputNumber };
|
||||
export type { InputNumberProps } from './InputNumber';
|
||||
@@ -5,9 +5,23 @@ import { cn } from '../../lib/utils';
|
||||
import { Input } from '../Input/Input';
|
||||
import { Slider } from '../Slider/Slider';
|
||||
import { DoubleSlider } from '../DoubleSlider/DoubleSlider';
|
||||
import { Button } from '../Button/Button';
|
||||
import { ChevronUp, ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';
|
||||
|
||||
// Calculate decimal places based on step
|
||||
const getDecimalPlaces = (step: number): number => {
|
||||
if (Number.isInteger(step)) {
|
||||
return 0;
|
||||
}
|
||||
const stepStr = step.toString();
|
||||
if (stepStr.includes('.')) {
|
||||
return stepStr.split('.')[1].length;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
interface NumericMetaContextValue {
|
||||
mode: 'number' | 'singleRange' | 'doubleRange';
|
||||
mode: 'number' | 'singleRange' | 'doubleRange' | 'stepper';
|
||||
singleValue: number;
|
||||
doubleValue: [number, number];
|
||||
setSingleValue: (val: number) => void;
|
||||
@@ -23,7 +37,7 @@ const NumericMetaContext = createContext<NumericMetaContextValue | null>(null);
|
||||
1) Container
|
||||
---------------------------------------------------------------------------*/
|
||||
interface NumericMetaContainerProps {
|
||||
mode: 'number' | 'singleRange' | 'doubleRange';
|
||||
mode: 'number' | 'singleRange' | 'doubleRange' | 'stepper';
|
||||
value?: number; // for controlled single-value usage from parent
|
||||
defaultValue?: number; // for uncontrolled single-value usage
|
||||
values?: [number, number]; // for controlled double-range usage from parent
|
||||
@@ -57,10 +71,10 @@ function NumericMetaContainer({
|
||||
|
||||
// Use useControllableState for both single and double values
|
||||
const [internalSingleValue, setInternalSingleValue] = useControllableState({
|
||||
prop: mode === 'number' || mode === 'singleRange' ? value : undefined,
|
||||
prop: mode === 'number' || mode === 'singleRange' || mode === 'stepper' ? value : undefined,
|
||||
defaultProp: calculatedDefaultValue,
|
||||
onChange: newVal => {
|
||||
if (mode === 'number' || mode === 'singleRange') {
|
||||
if (mode === 'number' || mode === 'singleRange' || mode === 'stepper') {
|
||||
onChange?.(newVal);
|
||||
}
|
||||
},
|
||||
@@ -127,7 +141,7 @@ function NumericMetaLabel({ children, showValue, className }: NumericMetaLabelPr
|
||||
|
||||
let displayedValue = '';
|
||||
let valueClasses = '';
|
||||
if (mode === 'number' || mode === 'singleRange') {
|
||||
if (mode === 'number' || mode === 'singleRange' || mode === 'stepper') {
|
||||
displayedValue = singleValue.toString();
|
||||
valueClasses = 'w-10';
|
||||
} else if (mode === 'doubleRange') {
|
||||
@@ -291,12 +305,177 @@ function NumberInput({ className }: NumberInputProps) {
|
||||
);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
6) NumberStepper sub-component
|
||||
---------------------------------------------------------------------------*/
|
||||
interface NumberStepperProps {
|
||||
className?: string;
|
||||
children?: React.ReactNode;
|
||||
direction?: 'horizontal' | 'vertical';
|
||||
}
|
||||
|
||||
// Modified NumberStepper component to properly position left/right controls
|
||||
function NumberStepper({ className, children, direction }: NumberStepperProps) {
|
||||
const ctx = useContext(NumericMetaContext);
|
||||
if (!ctx) {
|
||||
throw new Error('NumberStepper must be used inside <Numeric.Container>.');
|
||||
}
|
||||
|
||||
const { mode, singleValue, setSingleValue, min, max, step } = ctx;
|
||||
if (mode !== 'stepper') {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Calculate decimal places based on step
|
||||
const decimalPlaces = getDecimalPlaces(step);
|
||||
|
||||
// Format displayed value with proper decimal places
|
||||
const displayValue = React.useMemo(() => {
|
||||
return decimalPlaces > 0 ? singleValue.toFixed(decimalPlaces) : singleValue.toString();
|
||||
}, [singleValue, decimalPlaces]);
|
||||
|
||||
const handleInputChange = (evt: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const val = evt.target.value;
|
||||
|
||||
// Allow empty string, minus sign, or decimal point for flexibility
|
||||
if (val === '' || val === '-' || val === '.') {
|
||||
return;
|
||||
}
|
||||
|
||||
const numValue = Number(val);
|
||||
if (!isNaN(numValue)) {
|
||||
setSingleValue(Math.max(min, Math.min(numValue, max)));
|
||||
}
|
||||
};
|
||||
|
||||
const handleBlur = () => {
|
||||
// Ensure value is within constraints when input loses focus
|
||||
const boundedValue = Math.max(min, Math.min(singleValue, max));
|
||||
if (boundedValue !== singleValue) {
|
||||
setSingleValue(boundedValue);
|
||||
}
|
||||
};
|
||||
|
||||
// Check if children is HorizontalControls component
|
||||
const hasHorizontalControls = direction === 'horizontal';
|
||||
|
||||
if (hasHorizontalControls) {
|
||||
// We'll handle the control positioning ourselves
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'bg-background border-input flex h-[28px] items-center overflow-hidden rounded-md border',
|
||||
className
|
||||
)}
|
||||
>
|
||||
<LeftControl
|
||||
min={min}
|
||||
step={step}
|
||||
value={singleValue}
|
||||
setValue={setSingleValue}
|
||||
/>
|
||||
<Input
|
||||
type="text"
|
||||
value={displayValue}
|
||||
onChange={handleInputChange}
|
||||
onBlur={handleBlur}
|
||||
className="h-6 flex-1 appearance-none border-none p-0 text-center shadow-none focus:border-none focus:outline-none"
|
||||
/>
|
||||
{children}
|
||||
<RightControl
|
||||
max={max}
|
||||
step={step}
|
||||
value={singleValue}
|
||||
setValue={setSingleValue}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'bg-background border-input flex items-center overflow-hidden rounded-md border',
|
||||
className
|
||||
)}
|
||||
>
|
||||
<Input
|
||||
type="text"
|
||||
value={displayValue}
|
||||
onChange={handleInputChange}
|
||||
onBlur={handleBlur}
|
||||
className={cn(
|
||||
'h-6 flex-1 appearance-none border-none p-0 text-center shadow-none focus:border-none focus:outline-none'
|
||||
)}
|
||||
/>
|
||||
<div className="ml-1 flex flex-col">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() => setSingleValue(singleValue + step)}
|
||||
disabled={singleValue >= max}
|
||||
className="text-primary h-3 w-5 pr-px"
|
||||
>
|
||||
<ChevronUp className="h-3 w-3" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() => setSingleValue(singleValue - step)}
|
||||
disabled={singleValue <= min}
|
||||
className="text-primary h-3 w-5 pr-px"
|
||||
>
|
||||
<ChevronDown className="h-3 w-3" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// New components for left and right controls
|
||||
function LeftControl({ min, step, value, setValue }) {
|
||||
const decrement = useCallback(() => {
|
||||
const newValue = Math.max(value - step, min);
|
||||
setValue(newValue);
|
||||
}, [value, min, step, setValue]);
|
||||
|
||||
return (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={decrement}
|
||||
className="text-primary h-full w-4 cursor-pointer p-0"
|
||||
>
|
||||
<ChevronLeft className="h-4 w-4" />
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
function RightControl({ max, step, value, setValue }) {
|
||||
const increment = useCallback(() => {
|
||||
const newValue = Math.min(value + step, max);
|
||||
setValue(newValue);
|
||||
}, [value, max, step, setValue]);
|
||||
|
||||
return (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={increment}
|
||||
className="text-primary h-full w-4 cursor-pointer p-0"
|
||||
>
|
||||
<ChevronRight className="h-4 w-4" />
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
export const Numeric = {
|
||||
Container: NumericMetaContainer,
|
||||
Label: NumericMetaLabel,
|
||||
SingleRange,
|
||||
DoubleRange,
|
||||
NumberInput,
|
||||
NumberStepper,
|
||||
};
|
||||
|
||||
export default Numeric;
|
||||
export default Numeric;
|
||||
@@ -0,0 +1,162 @@
|
||||
import React, { useEffect, useState, useMemo } from 'react';
|
||||
import { Numeric } from '../Numeric/Numeric';
|
||||
import WindowLevelHistogram from './WindowLevelHistogram';
|
||||
import { VOI, VOIRange, Histogram, Colormap } from './types';
|
||||
|
||||
interface WindowLevelProps {
|
||||
title?: string;
|
||||
step?: number;
|
||||
histogram: Histogram;
|
||||
voi: VOI;
|
||||
opacity?: number;
|
||||
showOpacitySlider?: boolean;
|
||||
colormap?: Colormap;
|
||||
style?: 'polygon' | 'bars';
|
||||
fillColor?: string;
|
||||
lineColor?: string;
|
||||
containerClassName?: string;
|
||||
onVOIChange?: (voi: VOI) => void;
|
||||
onOpacityChange?: (opacity: number) => void;
|
||||
}
|
||||
|
||||
const convertVOItoVOIRange = (voi: VOI): VOIRange => {
|
||||
return {
|
||||
min: voi.windowCenter - voi.windowWidth / 2,
|
||||
max: voi.windowCenter + voi.windowWidth / 2,
|
||||
};
|
||||
};
|
||||
|
||||
const WindowLevel = ({
|
||||
title,
|
||||
step = 1,
|
||||
histogram,
|
||||
voi: voiProp,
|
||||
opacity: opacityProp = 1,
|
||||
showOpacitySlider = false,
|
||||
colormap,
|
||||
style = 'polygon',
|
||||
fillColor = '#3f3f3f',
|
||||
lineColor = '#707070',
|
||||
containerClassName,
|
||||
onVOIChange,
|
||||
onOpacityChange,
|
||||
}: WindowLevelProps) => {
|
||||
// Define range from histogram
|
||||
const range = useMemo(
|
||||
() => ({
|
||||
min: histogram.range.min,
|
||||
max: histogram.range.max,
|
||||
}),
|
||||
[histogram]
|
||||
);
|
||||
|
||||
// Initialize VOI range from props
|
||||
const [voiRange, setVOIRange] = useState<VOIRange>(
|
||||
voiProp
|
||||
? convertVOItoVOIRange(voiProp)
|
||||
: {
|
||||
min: range.min,
|
||||
max: range.max,
|
||||
}
|
||||
);
|
||||
|
||||
// Update VOI range when props change
|
||||
useEffect(() => {
|
||||
if (voiProp) {
|
||||
setVOIRange(convertVOItoVOIRange(voiProp));
|
||||
}
|
||||
}, [voiProp]);
|
||||
|
||||
// Handle VOI range changes (from slider)
|
||||
const handleVOIRangeChange = (newValues: [number, number]) => {
|
||||
const [min, max] = newValues;
|
||||
if (min === voiRange.min && max === voiRange.max) {
|
||||
return;
|
||||
}
|
||||
|
||||
const windowWidth = max - min;
|
||||
const windowCenter = min + windowWidth / 2;
|
||||
|
||||
setVOIRange({
|
||||
min,
|
||||
max,
|
||||
});
|
||||
|
||||
if (onVOIChange) {
|
||||
onVOIChange({ windowWidth, windowCenter });
|
||||
}
|
||||
};
|
||||
|
||||
// Handle opacity changes
|
||||
const handleOpacityChange = (value: number) => {
|
||||
if (onOpacityChange) {
|
||||
onOpacityChange(value);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={`text-foreground max-w-sm p-1 ${containerClassName || ''}`}>
|
||||
{title && <div className="text-muted-foreground mb-1 text-sm">{title}</div>}
|
||||
|
||||
<div className="space-y-2 px-2">
|
||||
{/* Range Labels */}
|
||||
<div className="text-muted-foreground flex h-4 text-sm">
|
||||
<div className="relative h-fit grow">
|
||||
<span className="absolute left-0 bottom-px leading-3">{range.min}</span>
|
||||
</div>
|
||||
<div className="relative h-fit grow text-right">
|
||||
<span className="absolute right-0 bottom-px leading-3">{range.max}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Histogram Visualization */}
|
||||
<div className="bg-foreground h-11">
|
||||
<WindowLevelHistogram
|
||||
range={range}
|
||||
voiRange={voiRange}
|
||||
histogram={histogram}
|
||||
colormap={colormap}
|
||||
style={style}
|
||||
fillColor={fillColor}
|
||||
lineColor={lineColor}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Window Level Range Slider */}
|
||||
<Numeric.Container
|
||||
mode="doubleRange"
|
||||
min={range.min}
|
||||
max={range.max}
|
||||
values={[voiRange.min, voiRange.max]}
|
||||
step={step}
|
||||
onChange={values => handleVOIRangeChange(values as [number, number])}
|
||||
>
|
||||
<Numeric.DoubleRange showNumberInputs />
|
||||
</Numeric.Container>
|
||||
|
||||
{/* Opacity Slider (optional) */}
|
||||
{showOpacitySlider && (
|
||||
<div className="mt-2">
|
||||
<div className="flex items-center justify-between gap-2 text-base">
|
||||
<div className="text-xs text-white">Opacity</div>
|
||||
<div className="flex-1">
|
||||
<Numeric.Container
|
||||
mode="singleRange"
|
||||
min={0}
|
||||
max={1}
|
||||
step={0.05}
|
||||
value={opacityProp}
|
||||
onChange={value => handleOpacityChange(value as number)}
|
||||
>
|
||||
<Numeric.SingleRange showNumberInput />
|
||||
</Numeric.Container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default WindowLevel;
|
||||
@@ -0,0 +1,237 @@
|
||||
import React, { useLayoutEffect, useEffect, useRef } from 'react';
|
||||
import { Range, VOIRange, Histogram, Colormap } from './types';
|
||||
|
||||
const DEFAULT_COLORMAP = {
|
||||
Name: 'Grayscale',
|
||||
RGBPoints: [0, 0, 0, 0, 1, 1, 1, 1],
|
||||
};
|
||||
|
||||
const clamp = (value: number, min: number, max: number) => Math.min(Math.max(min, value), max);
|
||||
|
||||
const interpolateVec3 = (a: number[], b: number[], t: number) => {
|
||||
return [a[0] * (1 - t) + b[0] * t, a[1] * (1 - t) + b[1] * t, a[2] * (1 - t) + b[2] * t];
|
||||
};
|
||||
|
||||
const drawBackground = (canvas: HTMLCanvasElement, range: Range, voiRange: VOIRange, colormap: Colormap) => {
|
||||
const context = canvas.getContext('2d');
|
||||
if (!context) return;
|
||||
|
||||
const { width, height } = canvas;
|
||||
const windowWidth = voiRange.max - voiRange.min;
|
||||
const rgbPoints = colormap.RGBPoints;
|
||||
const colorsCount = rgbPoints.length / 4;
|
||||
|
||||
const getColorPoint = (index: number) => {
|
||||
const offset = 4 * index;
|
||||
|
||||
return index < colorsCount
|
||||
? {
|
||||
index,
|
||||
position: rgbPoints[offset],
|
||||
color: [rgbPoints[offset + 1], rgbPoints[offset + 2], rgbPoints[offset + 3]],
|
||||
}
|
||||
: undefined;
|
||||
};
|
||||
|
||||
let leftColorPoint = undefined;
|
||||
let rightColorPoint = getColorPoint(0);
|
||||
|
||||
const incRawPixelValue = (range.max - range.min) / (width - 1);
|
||||
let rawPixelValue = range.min;
|
||||
|
||||
for (let x = 0; x < width; x++) {
|
||||
const tVoiRange = (rawPixelValue - voiRange.min) / windowWidth;
|
||||
|
||||
// Find the color in a linear way (O(n) complexity)
|
||||
if (rightColorPoint) {
|
||||
for (let i = rightColorPoint.index; i < colorsCount; i++) {
|
||||
if (tVoiRange <= rightColorPoint.position) {
|
||||
break;
|
||||
}
|
||||
|
||||
leftColorPoint = rightColorPoint;
|
||||
rightColorPoint = getColorPoint(i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
let normColor;
|
||||
|
||||
if (!leftColorPoint) {
|
||||
normColor = [...rightColorPoint!.color];
|
||||
} else if (!rightColorPoint) {
|
||||
normColor = [...leftColorPoint.color];
|
||||
} else {
|
||||
const tColorRange =
|
||||
(tVoiRange - leftColorPoint.position) /
|
||||
(rightColorPoint.position - leftColorPoint.position);
|
||||
|
||||
normColor = interpolateVec3(leftColorPoint.color, rightColorPoint.color, tColorRange);
|
||||
}
|
||||
|
||||
const color = normColor.map(color => clamp(Math.round(color * 255), 0, 255));
|
||||
|
||||
context.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
|
||||
context.fillRect(x, 0, 1, height);
|
||||
|
||||
rawPixelValue += incRawPixelValue;
|
||||
}
|
||||
};
|
||||
|
||||
/* plots the histogram bins as a polygon that traces the centers of each bin */
|
||||
const drawPolygonHistogram = (
|
||||
canvas: HTMLCanvasElement,
|
||||
context: CanvasRenderingContext2D,
|
||||
histogram: Histogram,
|
||||
options: { scale: (val: number) => number, fillColor: string, lineColor: string }
|
||||
) => {
|
||||
const xScale = canvas.width / histogram.numBins;
|
||||
const { scale } = options;
|
||||
const maxVal = scale(histogram.maxBinValue);
|
||||
|
||||
context.beginPath();
|
||||
context.moveTo(0, canvas.height);
|
||||
context.lineTo(0, canvas.height - (canvas.height * scale(histogram.bins[0])) / maxVal);
|
||||
|
||||
let x = xScale / 2;
|
||||
for (let bin = 0; bin < histogram.numBins; bin++) {
|
||||
context.lineTo(x, canvas.height - (canvas.height * scale(histogram.bins[bin])) / maxVal);
|
||||
x += xScale;
|
||||
}
|
||||
context.lineTo(
|
||||
canvas.width,
|
||||
canvas.height - (canvas.height * scale(histogram.bins[histogram.numBins - 1])) / maxVal
|
||||
);
|
||||
context.lineTo(canvas.width, canvas.height);
|
||||
context.lineTo(0, canvas.height);
|
||||
|
||||
context.closePath();
|
||||
context.fill();
|
||||
context.stroke();
|
||||
};
|
||||
|
||||
/* plots the histogram bins as a series of n vertical bars (n = number of bins) */
|
||||
const drawBarHistogram = (
|
||||
canvas: HTMLCanvasElement,
|
||||
context: CanvasRenderingContext2D,
|
||||
histogram: Histogram,
|
||||
options: { scale: (val: number) => number, fillColor: string, lineColor: string }
|
||||
) => {
|
||||
const xScale = canvas.width / histogram.numBins;
|
||||
const { scale } = options;
|
||||
const maxVal = scale(histogram.maxBinValue);
|
||||
|
||||
context.beginPath();
|
||||
|
||||
for (let bin = 0; bin < histogram.numBins; bin++) {
|
||||
context.moveTo(xScale * bin, canvas.height);
|
||||
context.lineTo(
|
||||
xScale * bin,
|
||||
canvas.height - (canvas.height * scale(histogram.bins[bin])) / maxVal
|
||||
);
|
||||
}
|
||||
|
||||
context.closePath();
|
||||
context.strokeStyle = options.fillColor;
|
||||
context.lineWidth = xScale;
|
||||
context.stroke();
|
||||
};
|
||||
|
||||
const drawHistogram = (
|
||||
canvas: HTMLCanvasElement,
|
||||
histogram: Histogram,
|
||||
options: {
|
||||
style: 'polygon' | 'bars',
|
||||
fillColor: string,
|
||||
lineColor: string,
|
||||
scale: (val: number) => number
|
||||
}
|
||||
) => {
|
||||
const context = canvas.getContext('2d');
|
||||
if (!context) return;
|
||||
|
||||
context.fillStyle = options.fillColor;
|
||||
context.strokeStyle = options.lineColor;
|
||||
|
||||
if (options.style === 'polygon') {
|
||||
drawPolygonHistogram(canvas, context, histogram, options);
|
||||
} else if (options.style === 'bars') {
|
||||
drawBarHistogram(canvas, context, histogram, options);
|
||||
} else {
|
||||
throw new Error(`Invalid style (${options.style})`);
|
||||
}
|
||||
};
|
||||
|
||||
interface WindowLevelHistogramProps {
|
||||
range: Range;
|
||||
voiRange: VOIRange;
|
||||
histogram: Histogram;
|
||||
colormap?: Colormap;
|
||||
style?: 'polygon' | 'bars';
|
||||
fillColor?: string;
|
||||
lineColor?: string;
|
||||
}
|
||||
|
||||
const WindowLevelHistogram = ({
|
||||
range,
|
||||
voiRange,
|
||||
histogram,
|
||||
colormap = DEFAULT_COLORMAP,
|
||||
style = 'polygon',
|
||||
fillColor = '#3f3f3f',
|
||||
lineColor = '#707070',
|
||||
}: WindowLevelHistogramProps) => {
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const canvasRef = useRef<HTMLCanvasElement>(null);
|
||||
const minVOIPercent = ((voiRange.min - range.min) / (range.max - range.min)) * 100;
|
||||
const maxVoiPercent = (1 - (range.max - voiRange.max) / (range.max - range.min)) * 100;
|
||||
const background =
|
||||
colormap.Name !== 'Grayscale'
|
||||
? undefined
|
||||
: `linear-gradient(to right, #000 0%, #000 ${minVOIPercent}%, #fff ${maxVoiPercent}%, #fff 100%)`;
|
||||
|
||||
useLayoutEffect(() => {
|
||||
const container = containerRef.current;
|
||||
const canvas = canvasRef.current;
|
||||
if (!container || !canvas) return;
|
||||
|
||||
canvas.width = container.offsetWidth;
|
||||
canvas.height = container.offsetHeight;
|
||||
}, [containerRef, canvasRef]);
|
||||
|
||||
useEffect(() => {
|
||||
const canvas = canvasRef.current;
|
||||
if (!canvas) return;
|
||||
|
||||
const context = canvas.getContext('2d');
|
||||
if (!context) return;
|
||||
|
||||
const fnIdentity = (x: number) => x;
|
||||
const options = {
|
||||
style,
|
||||
fillColor,
|
||||
lineColor,
|
||||
scale: fnIdentity,
|
||||
};
|
||||
|
||||
context.clearRect(0, 0, canvas.width, canvas.height);
|
||||
|
||||
drawBackground(canvas, range, voiRange, colormap);
|
||||
drawHistogram(canvas, histogram, options);
|
||||
}, [range, voiRange, histogram, colormap, style, fillColor, lineColor]);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={containerRef}
|
||||
className="h-full"
|
||||
style={{ background }}
|
||||
>
|
||||
<canvas
|
||||
ref={canvasRef}
|
||||
width="1"
|
||||
height="1"
|
||||
></canvas>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default WindowLevelHistogram;
|
||||
@@ -0,0 +1,3 @@
|
||||
export { default as WindowLevel } from './WindowLevel';
|
||||
export { default as WindowLevelHistogram } from './WindowLevelHistogram';
|
||||
export * from './types';
|
||||
@@ -0,0 +1,41 @@
|
||||
// Window-level related types
|
||||
|
||||
export interface Range {
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
|
||||
export interface VOIRange {
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
|
||||
export interface VOI {
|
||||
windowWidth: number;
|
||||
windowCenter: number;
|
||||
}
|
||||
|
||||
export interface Histogram {
|
||||
bins: number[] | Int32Array;
|
||||
numBins: number;
|
||||
maxBin: number;
|
||||
maxBinValue: number;
|
||||
range: Range;
|
||||
}
|
||||
|
||||
export interface Colormap {
|
||||
Name: string;
|
||||
RGBPoints: number[];
|
||||
}
|
||||
|
||||
export interface WindowLevelData {
|
||||
volumeId: string;
|
||||
viewportId: string;
|
||||
modality: string;
|
||||
voi: VOI;
|
||||
step: number;
|
||||
histogram: Histogram;
|
||||
showOpacitySlider: boolean;
|
||||
opacity?: number;
|
||||
colormap?: Colormap;
|
||||
}
|
||||
@@ -2,12 +2,14 @@ import React from 'react';
|
||||
import RowInputRange from './RowInputRange';
|
||||
import RowSegmentedControl from './RowSegmentedControl';
|
||||
import RowDoubleRange from './RowDoubleRange';
|
||||
import { Button } from '../Button';
|
||||
|
||||
const SETTING_TYPES = {
|
||||
RANGE: 'range',
|
||||
RADIO: 'radio',
|
||||
CUSTOM: 'custom',
|
||||
DOUBLE_RANGE: 'double-range',
|
||||
BUTTON: 'button',
|
||||
};
|
||||
|
||||
function ToolSettings({ options }) {
|
||||
@@ -35,6 +37,8 @@ function ToolSettings({ options }) {
|
||||
return renderDoubleRangeSetting(option);
|
||||
case SETTING_TYPES.CUSTOM:
|
||||
return renderCustomSetting(option);
|
||||
case SETTING_TYPES.BUTTON:
|
||||
return renderButtonSetting(option);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -97,4 +101,16 @@ const renderCustomSetting = option => {
|
||||
);
|
||||
};
|
||||
|
||||
const renderButtonSetting = option => {
|
||||
return (
|
||||
<Button
|
||||
className="bg-primary"
|
||||
key={option.id}
|
||||
onClick={() => option.onChange()}
|
||||
>
|
||||
{option.name}
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
||||
export default ToolSettings;
|
||||
@@ -35,6 +35,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from './Tabs';
|
||||
import { Toggle, toggleVariants } from './Toggle';
|
||||
import { ToggleGroup, ToggleGroupItem } from './ToggleGroup';
|
||||
import { Input } from './Input';
|
||||
import { InputNumber } from './InputNumber';
|
||||
import { Label } from './Label';
|
||||
import { Switch } from './Switch';
|
||||
import { Checkbox } from './Checkbox';
|
||||
@@ -59,6 +60,7 @@ import { AboutModal, ImageModal, UserPreferencesModal } from './OHIFModals';
|
||||
import Modal from './Modal/Modal';
|
||||
import { FooterAction } from './FooterAction';
|
||||
import { InputFilter } from './InputFilter';
|
||||
import { WindowLevel, WindowLevelHistogram } from './OHIFPanels';
|
||||
|
||||
import {
|
||||
DropdownMenu,
|
||||
@@ -154,11 +156,12 @@ export {
|
||||
Calendar,
|
||||
DatePickerWithRange,
|
||||
Input,
|
||||
InputNumber,
|
||||
Label,
|
||||
Tabs,
|
||||
TabsContent,
|
||||
TabsList,
|
||||
TabsTrigger,
|
||||
TabsContent,
|
||||
Separator,
|
||||
Switch,
|
||||
Checkbox,
|
||||
@@ -245,4 +248,6 @@ export {
|
||||
FooterAction,
|
||||
ToolSettings,
|
||||
InputFilter,
|
||||
WindowLevel,
|
||||
WindowLevelHistogram,
|
||||
};
|
||||
@@ -1,6 +1,5 @@
|
||||
import * as utils from './utils';
|
||||
export * from './components';
|
||||
export * from './contextProviders';
|
||||
|
||||
import * as utils from './utils';
|
||||
|
||||
export { utils };
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [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/ui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.143](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.142...v3.10.0-beta.143) (2025-04-01)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.142](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.141...v3.10.0-beta.142) (2025-03-31)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.10.0-beta.141](https://github.com/OHIF/Viewers/compare/v3.10.0-beta.140...v3.10.0-beta.141) (2025-03-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/ui",
|
||||
"version": "3.10.0-beta.141",
|
||||
"version": "3.10.0-beta.144",
|
||||
"description": "A set of React components for Medical Imaging Viewers",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -102,6 +102,11 @@ export default defineConfig({
|
||||
// Copy plugin files (handled by writePluginImportsFile)
|
||||
...(writePluginImportsFile(SRC_DIR, DIST_DIR) || []),
|
||||
// Copy public directory except config and html-templates
|
||||
{
|
||||
from: path.resolve(__dirname, 'node_modules/onnxruntime-web/dist'),
|
||||
to: DIST_DIR,
|
||||
force: true,
|
||||
},
|
||||
{
|
||||
from: PUBLIC_DIR,
|
||||
to: DIST_DIR,
|
||||
|
||||
@@ -9,15 +9,16 @@ import {
|
||||
test.skip('pets where SUV cannot be calculated should show same unit in TMTV as in Basic Viewer.', async ({
|
||||
page,
|
||||
}) => {
|
||||
const studyInstanceUID = '1.3.6.1.4.1.14519.5.2.1.7009.2403.871108593056125491804754960339';
|
||||
const studyInstanceUID = '1.2.840.113619.2.290.3.3767434740.226.1600859119.501';
|
||||
const mode = 'tmtv';
|
||||
await visitStudy(page, studyInstanceUID, mode, 10000);
|
||||
|
||||
// Change to image where SUV cannot be calculated
|
||||
// Show sidebar
|
||||
await page.getByTestId('side-panel-header-left').click();
|
||||
await page
|
||||
.getByRole('button', { name: 'S: 2 311 PET NAC' })
|
||||
.dragTo(page.getByTestId('viewport-grid').locator('canvas').nth(3));
|
||||
|
||||
// Change to image where SUV cannot be calculated
|
||||
await page.getByTestId('viewport-grid').locator('canvas').nth(3).click();
|
||||
await page.getByRole('button', { name: 'NAC' }).nth(1).dblclick();
|
||||
|
||||
// Wait for the new series to load
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
@@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
|
||||
import { visitStudy, simulateClicksOnElement, getSUV, clearAllAnnotations } from './utils/index';
|
||||
|
||||
test.skip('should update SUV values correctly.', async ({ page }) => {
|
||||
const studyInstanceUID = '1.3.6.1.4.1.14519.5.2.1.7009.2403.871108593056125491804754960339';
|
||||
const studyInstanceUID = '1.2.840.113619.2.290.3.3767434740.226.1600859119.501';
|
||||
const mode = 'tmtv';
|
||||
await visitStudy(page, studyInstanceUID, mode, 10000);
|
||||
|
||||
@@ -31,7 +31,7 @@ test.skip('should update SUV values correctly.', async ({ page }) => {
|
||||
let oldSUV = await getSUV(page);
|
||||
|
||||
// Change PT Weight
|
||||
await page.getByTestId('input-weight-input').fill('31');
|
||||
await page.locator('#weight-input').fill('31');
|
||||
await page.getByText('Reload Data').click();
|
||||
await page.waitForLoadState('networkidle');
|
||||
// Get new SUV text
|
||||
@@ -43,10 +43,9 @@ test.skip('should update SUV values correctly.', async ({ page }) => {
|
||||
|
||||
// Change total dose
|
||||
await page
|
||||
.getByText('Patient SexWeight kgTotal')
|
||||
.locator('div')
|
||||
.filter({ hasText: /^Total Dose bq$/ })
|
||||
.getByTestId('input-undefined')
|
||||
.getByRole('textbox')
|
||||
.fill('1888020304');
|
||||
await page.getByText('Reload Data').click();
|
||||
await page.waitForLoadState('networkidle');
|
||||
@@ -60,10 +59,9 @@ test.skip('should update SUV values correctly.', async ({ page }) => {
|
||||
|
||||
// Change injection time
|
||||
await page
|
||||
.getByText('Patient SexWeight kgTotal')
|
||||
.locator('div')
|
||||
.filter({ hasText: /^Injection Time s$/ })
|
||||
.getByTestId('input-undefined')
|
||||
.getByRole('textbox')
|
||||
.fill('060000');
|
||||
await page.getByText('Reload Data').click();
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
@@ -2,7 +2,7 @@ import { test } from '@playwright/test';
|
||||
import { visitStudy, checkForScreenshot, screenShotPaths } from './utils/index.js';
|
||||
|
||||
test.skip('should render TMTV correctly.', async ({ page }) => {
|
||||
const studyInstanceUID = '1.3.6.1.4.1.14519.5.2.1.7009.2403.871108593056125491804754960339';
|
||||
const studyInstanceUID = '1.2.840.113619.2.290.3.3767434740.226.1600859119.501';
|
||||
const mode = 'tmtv';
|
||||
await visitStudy(page, studyInstanceUID, mode, 10000);
|
||||
await checkForScreenshot(page, page, screenShotPaths.tmtvRendering.tmtvDisplayedCorrectly, 100);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 99 KiB |
+2
-2
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"version": "3.10.0-beta.141",
|
||||
"commit": "d7bd36544a039deae30e179404452cde738b8b03"
|
||||
"version": "3.10.0-beta.144",
|
||||
"commit": "c75a3f3af58c4cd29c349338e4065269d8d9f387"
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
3.10.0-beta.141
|
||||
3.10.0-beta.144
|
||||
Loaded 100 of 101 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user