Compare commits

..
Author SHA1 Message Date
ohif-bot b7c8b865dd chore(version): Update package versions to 3.13.0-beta.104 [skip ci] 2026-06-24 19:21:51 +00:00
ee165b4d8e Fix: Segmentation Hide All fails when switching from 2D to 3D fourUp (#5995)
* Fix: Segmentation "Hide All" fails when switching from 2D to 3D four-up viewport

* Update based on the review comment on segmentation load in 3d fourup

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix: simplify the conditional logic

* fix: playwright test

* fix: playwright test

* fix: render timeout in test

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Belbin-GK <150322972+Belbin-GK@users.noreply.github.com>
Co-authored-by: Devu Jayalekshmi <devu.jayalekshmi@trenser.com>
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
2026-06-24 15:18:16 -04:00
ohif-bot 589d6a1506 chore(version): Update package versions to 3.13.0-beta.103 [skip ci] 2026-06-24 15:08:56 +00:00
diattamo 95200ec6e8 test(segmentation): switch getSegmentCount to expect(rows).toHaveCount in panel specs (#6105) 2026-06-24 11:05:27 -04:00
39 changed files with 69 additions and 65 deletions

No files matched your search

@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-pmap",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "DICOM Parametric Map read workflow",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-rt",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "DICOM RT read workflow",
"author": "OHIF",
"license": "MIT",
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-seg",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "DICOM SEG read workflow",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-sr",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "OHIF extension for an SR Cornerstone Viewport",
"author": "OHIF",
"license": "MIT",
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dynamic-volume",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "OHIF extension for 4D volumes data",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "OHIF extension for Cornerstone",
"author": "OHIF",
"license": "MIT",
@@ -88,12 +88,17 @@ const segmentationRepresentationModifiedCallback = async (
return;
}
// Ensure the segmentation representation aligns with the target viewport type.
const type: Enums.SegmentationRepresentations =
isVolume3DViewportType(viewport)
? Enums.SegmentationRepresentations.Surface
: ((segmentationRepresentationType as Enums.SegmentationRepresentations) ??
Enums.SegmentationRepresentations.Labelmap);
// Ensure the segmentation representation aligns with the target viewport type
const is3D = isVolume3DViewportType(viewport);
const requestedRepresentation =
segmentationRepresentationType as Enums.SegmentationRepresentations;
const { Surface, Labelmap } = Enums.SegmentationRepresentations;
const type: Enums.SegmentationRepresentations = is3D
? Surface
: requestedRepresentation && requestedRepresentation !== Surface
? requestedRepresentation
: Labelmap;
await segmentationService.addSegmentationRepresentation(targetViewportId, {
segmentationId,
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-default",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "Common/default features and functionality for basic image viewing",
"author": "OHIF Core Team",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-microscopy",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "OHIF extension for DICOM microscopy",
"author": "Bill Wallace, md-prog",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-pdf",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "OHIF extension for PDF display",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-video",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "OHIF extension for video display",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-measurement-tracking",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "Tracking features and functionality for basic image viewing",
"author": "OHIF Core Team",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-test",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "OHIF extension used inside e2e testing",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-tmtv",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "OHIF extension for Total Metabolic Tumor Volume",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-ultrasound-pleura-bline",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "",
"author": "Rodrigo Basilio",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-basic-dev-mode",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "Basic OHIF Viewer Using Cornerstone",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-test",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "Basic mode for testing",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-basic",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "A basic mode used to build other modes on top of",
"author": "OHIF Contributors",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-longitudinal",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "Longitudinal Workflow",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-microscopy",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "OHIF mode for DICOM microscopy",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-preclinical-4d",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "4D Workflow",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-segmentation",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "OHIF segmentation mode which enables labelmap segmentation read/edit/export",
"author": "@ohif",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-tmtv",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "Total Metabolic Tumor Volume Workflow",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-ultrasound-pleura-bline",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "Allows users to annotate ultrasound images with pleura B-line annotations.",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -124,5 +124,5 @@
"git add"
]
},
"version": "3.13.0-beta.102"
"version": "3.13.0-beta.104"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/app",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"productVersion": "3.4.0",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/cli",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "A CLI to bootstrap new OHIF extension or mode",
"type": "module",
"main": "src/index.js",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/core",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "Generic business logic for web-based medical imaging applications",
"author": "OHIF Core Team",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ohif-docs",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/i18n",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "Internationalization library for The OHIF Viewer",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/ui-next",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "Next version of OHIF Viewers UI, more customizable using shadcn/ui",
"author": "OHIF",
"license": "MIT",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/ui",
"version": "3.13.0-beta.102",
"version": "3.13.0-beta.104",
"description": "A set of React components for Medical Imaging Viewers",
"author": "OHIF Contributors",
"license": "MIT",
+1 -2
View File
@@ -152,8 +152,7 @@ test('duplicated contour will be generated with a new color', async ({
);
// duplicate the segment
const initialCount = await panel.getSegmentCount();
expect(initialCount, 'Expected to start with 4 segments').toBe(4);
await expect(panel.rows, 'Expected to start with 4 segments').toHaveCount(4);
await segment0.actions.duplicate();
await segment0.toggleVisibility(); // toggle original segment 0 visibility off to be able to grab the duplicated segment's path
+5 -10
View File
@@ -20,16 +20,14 @@ test('should delete a contour segment and remove its row from the panel', async
}) => {
const panel = rightPanelPageObject.contourSegmentationPanel.panel;
const initialCount = await panel.getSegmentCount();
expect(initialCount, 'Expected to load with 4 segments').toBe(4);
await expect(panel.rows, 'Expected to load with 4 segments').toHaveCount(4);
const segment0 = panel.nthSegment(0);
await expect(segment0.title).toHaveText(defaultSegment0Name);
await segment0.actions.delete();
const countAfterDelete = await panel.getSegmentCount();
expect(countAfterDelete, 'Expected one fewer segment row after deleting').toBe(3);
await expect(panel.rows, 'Expected one fewer segment row after deleting').toHaveCount(3);
// The deleted segment's label should no longer be present anywhere in the panel
await expect(
panel.getSegmentLabels().filter({ hasText: defaultSegment0Name }),
@@ -46,16 +44,13 @@ test('should delete a contour segment and remove its row from the panel', async
test('should delete multiple contour segments sequentially', async ({ rightPanelPageObject }) => {
const panel = rightPanelPageObject.contourSegmentationPanel.panel;
const initialCount = await panel.getSegmentCount();
expect(initialCount, 'Expected to load with 4 segments').toBe(4);
await expect(panel.rows, 'Expected to load with 4 segments').toHaveCount(4);
await panel.nthSegment(0).actions.delete();
const countAfterFirstDelete = await panel.getSegmentCount();
expect(countAfterFirstDelete, 'Expected 3 segments after first delete').toBe(3);
await expect(panel.rows, 'Expected 3 segments after first delete').toHaveCount(3);
await panel.nthSegment(0).actions.delete();
const countAfterSecondDelete = await panel.getSegmentCount();
expect(countAfterSecondDelete, 'Expected 2 segments after second delete').toBe(2);
await expect(panel.rows, 'Expected 2 segments after second delete').toHaveCount(2);
await expect(
panel.getSegmentLabels().filter({ hasText: defaultSegment0Name }),
+12 -11
View File
@@ -25,19 +25,20 @@ test('should duplicate a contour segment and add a new row to the panel', async
}) => {
const panel = rightPanelPageObject.contourSegmentationPanel.panel;
const initialCount = await panel.getSegmentCount();
expect(initialCount, 'Expected to load with 4 segments').toBe(4);
await expect(panel.rows, 'Expected to load with 4 segments').toHaveCount(4);
const segment0 = panel.nthSegment(0);
await expect(segment0.title).toHaveText(defaultSegment0Name);
await segment0.actions.duplicate();
const countAfterDuplicate = await panel.getSegmentCount();
expect(countAfterDuplicate, 'Expected one additional segment row after duplicating').toBe(5);
await expect(
panel.rows,
'Expected one additional segment row after duplicating'
).toHaveCount(5);
//New segment's default name is formatted as "Segment {segmentCount}"
const newSegmentLocator = panel.nthSegment(initialCount).title;
const newSegmentLocator = panel.nthSegment(4).title;
await expect(newSegmentLocator, 'Expected correct title for duplicated segment').toHaveText(
`Segment 5`
);
@@ -53,10 +54,10 @@ test('should duplicate the same segment multiple times', async ({ rightPanelPage
const segment0 = panel.nthSegment(0);
await segment0.actions.duplicate();
expect(
await panel.getSegmentCount(),
await expect(
panel.rows,
'Expected one additional segment row after duplicating'
).toBe(5);
).toHaveCount(5);
const firstDuplicateTitleLocator = panel.nthSegment(4).title;
await expect(
@@ -65,10 +66,10 @@ test('should duplicate the same segment multiple times', async ({ rightPanelPage
).toHaveText(`Segment 5`);
await segment0.actions.duplicate();
expect(
await panel.getSegmentCount(),
await expect(
panel.rows,
'Expected another segment row after duplicating the same segment again'
).toBe(6);
).toHaveCount(6);
const secondDuplicateTitleLocator = panel.nthSegment(5).title;
await expect(
+2 -2
View File
@@ -34,7 +34,7 @@ test('should fully remove segmentation overlay after repeated load-and-delete cy
await rightPanelPageObject.labelMapSegmentationPanel.panel.moreMenu.delete();
await viewportRenderCycle;
expect(await rightPanelPageObject.labelMapSegmentationPanel.panel.getSegmentCount()).toBe(0);
await expect(rightPanelPageObject.labelMapSegmentationPanel.panel.rows).toHaveCount(0);
// reload SEG series
viewportRenderCycle = waitForViewportRenderCycle(page);
@@ -57,7 +57,7 @@ test('should fully remove segmentation overlay after repeated load-and-delete cy
await rightPanelPageObject.labelMapSegmentationPanel.panel.moreMenu.delete();
await viewportRenderCycle;
expect(await rightPanelPageObject.labelMapSegmentationPanel.panel.getSegmentCount()).toBe(0);
await expect(rightPanelPageObject.labelMapSegmentationPanel.panel.rows).toHaveCount(0);
await checkForScreenshot(
page,
+3
View File
@@ -60,6 +60,9 @@ test.describe('3D four up SEG hydration', async () => {
// Wait until all viewports have finished rendering
await viewportRenderCycle;
// Hydration propagates labelmap volumes to MPR viewports asynchronously after the
// first render cycle resolves.
await waitForViewportsRendered(page, { timeout: 240000 });
await checkForScreenshot({
page,
+4 -3
View File
@@ -23,7 +23,8 @@ test.beforeEach(
);
test('should list segments in side panel for 3D only view', async ({ rightPanelPageObject }) => {
const numberOfSegments =
await rightPanelPageObject.labelMapSegmentationPanel.panel.getSegmentCount();
expect(numberOfSegments, 'The side panel should list 13 segments for the 3D only view.').toBe(13);
await expect(
rightPanelPageObject.labelMapSegmentationPanel.panel.rows,
'The side panel should list 13 segments for the 3D only view.'
).toHaveCount(13);
});
Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 KiB

After

Width:  |  Height:  |  Size: 538 KiB