Skip to content

Fix overlapping segmentation render issues - #2170

Open
rodrigobasilio2022 wants to merge 22 commits into
cornerstonejs:mainfrom
rodrigobasilio2022:fix/OverlappingSegmentationBug
Open

Fix overlapping segmentation render issues#2170
rodrigobasilio2022 wants to merge 22 commits into
cornerstonejs:mainfrom
rodrigobasilio2022:fix/OverlappingSegmentationBug

Conversation

@rodrigobasilio2022

@rodrigobasilio2022 rodrigobasilio2022 commented Jul 1, 2025

Copy link
Copy Markdown
Collaborator

This pull request introduces multi-volume support across multiple modules, refines type definitions for actors, and enhances segmentation handling. Key changes include the addition of multi-volume processing capabilities, updates to type definitions, and improvements to segmentation state management.

Multi-Volume Support Enhancements:

Type Definition Updates:

Segmentation Handling Improvements:

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR expands segmentation modules to fully support multi-volume data, updates type definitions to unify actor handling, and refines error handling and progress reporting in segmentation operations.

  • Introduce volumeIds, getVolumeIds, and getPrimaryVolumeId utilities for multi-volume support
  • Refactor core segmentation utilities and state manager to iterate over multiple volumes
  • Update type definitions in LabelmapTypes and IActor to unify single- and multi-volume actors

Reviewed Changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/core/src/types/LabelmapTypes.ts Updated segmentation data types, introduced volumeIds
packages/tools/src/utilities/segmentation/validateLabelmap.ts Enhanced validation for multi-volume & stack inputs
packages/tools/src/utilities/segmentation/getSegmentIndexAtWorldPoint.ts Iterates over volumeIds for world‐point lookup
packages/tools/src/utilities/segmentation/getSegmentIndexAtLabelmapBorder.ts Iterates over volumeIds for border‐point lookup
packages/tools/src/tools/displayTools/Labelmap/addLabelmapToElement.ts Refactored to handle multiple volume inputs
Comments suppressed due to low confidence (1)

packages/tools/src/tools/displayTools/Labelmap/addLabelmapToElement.ts:178

  • [nitpick] The function name is missing a capital 'L' in 'LabelMap' for readability and consistency (_ensureLabelMapDataVolumeHasVolumeId). Consider renaming to follow camel-case conventions.
function _ensurelabelMapDataVolumeHasVolumeId(

Comment thread packages/tools/src/utilities/segmentation/getSegmentIndexAtWorldPoint.ts Outdated
Comment thread packages/tools/src/utilities/segmentation/getSegmentIndexAtLabelmapBorder.ts Outdated
Comment thread packages/tools/src/utilities/segmentation/validateLabelmap.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants