fix(segmentation): restrict overlay segmentation menu to same frame of reference as viewport background display set (#5900)
- Add FrameOfReferenceUID to SEG and RTSTRUCT displaySet in SOP Class Handlers so the FOR is available for filtering - Sync optimisticOverlayDisplaySets when background display set changes so the overlay menu reflects the correct state after a background switch - Add FOR matching guard to the hydrate segmentation synchronizer to prevent the hydration synchronizer from blindly mirroring segmentations from a source viewport to a target viewport if their primary Frames of Reference do not align. - fix segmentation overlay order reversal on viewport re-render
This commit is contained in:
1 parent
a875d7de1f
commit
b9029ef6f8
15 files changed
+223
-56
No files matched your search
@@ -9,13 +9,16 @@ export class DataOverlayPageObject {
|
||||
this.viewportId = viewportId;
|
||||
}
|
||||
|
||||
get menu() {
|
||||
return this.page.getByTestId(`viewport-data-overlay-menu-${this.viewportId}`);
|
||||
}
|
||||
|
||||
async toggle() {
|
||||
await this.page.getByTestId(`dataOverlayMenu-${this.viewportId}-btn`).click();
|
||||
}
|
||||
|
||||
async addSegmentation(segmentation: string) {
|
||||
await this.page.getByTestId(`AddSegmentationDataOverlay-${this.viewportId}`).click();
|
||||
await this.page.getByText('SELECT A SEGMENTATION').click();
|
||||
await this.openAddSegmentationDropdown();
|
||||
await this.page.getByTestId(segmentation).click();
|
||||
}
|
||||
|
||||
@@ -28,4 +31,32 @@ export class DataOverlayPageObject {
|
||||
await this.page.getByTestId(`overlay-ds-more-button-${segmentation}`).click();
|
||||
await this.page.getByTestId(`overlay-ds-remove-button-${segmentation}`).click();
|
||||
}
|
||||
|
||||
async openAddSegmentationDropdown() {
|
||||
await this.page.getByTestId(`AddSegmentationDataOverlay-${this.viewportId}`).click();
|
||||
await this.clickSelectSegmentation();
|
||||
}
|
||||
|
||||
async clickSelectSegmentation() {
|
||||
await this.page.getByText('SELECT A SEGMENTATION').click();
|
||||
}
|
||||
|
||||
async getDropdownOptionLabels(): Promise<string[]> {
|
||||
const options = this.page.getByRole('option');
|
||||
const labels = (await options.allTextContents()).map(text => text.trim()).filter(Boolean);
|
||||
return labels;
|
||||
}
|
||||
|
||||
getOverlaySegmentationRow(label: string) {
|
||||
return this.menu.getByTestId(`overlay-ds-select-value-${label.toUpperCase()}`);
|
||||
}
|
||||
|
||||
get overlaySegmentationRows() {
|
||||
return this.menu.locator('[data-cy^="overlay-ds-select-value-"]');
|
||||
}
|
||||
|
||||
async changeBackgroundDisplaySet(backgroundLabel: string) {
|
||||
await this.page.getByTestId(`overlay-background-ds-select-${this.viewportId}`).click();
|
||||
await this.page.getByTestId(backgroundLabel).click();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user