Skip to content

Conversation

@wayfarer3130
Copy link
Contributor

Context

The navigate to contour segmentation only worked for rehydrated contours or for any labelmap/volumes.

This PR adds code to navigate to the next contour. This requires that the viewport already display the right orientation viewport

Changes & Results

Added jumpToSegmentNext that differentiates between labelmaps and contours, using the existing logic for labelmaps.

Added a _getContourViewReferences that gets an array of view references indexed by slice index.

Added logic to get the closest view reference, or the next view reference if there isn't a closest.

Updated docs for SegmentationService

Testing

Load segmentation mode

Create a contour segmentation on a volume (should also test with a stack viewport that isn't a volume)

Draw several contours on several slices - you can vary the segment index if you want

Click on the segment index in the right hand panel to navigate to the "next" contour index for that segment.

Try the same thing with labelmaps - which will always navigate to center (might be a TODO to implement for labelmap to allow navigation to "next".

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • [] My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] OS:
  • [] Node version:
  • [] Browser:

@wayfarer3130 wayfarer3130 requested a review from sedghi January 15, 2026 21:36
@netlify
Copy link

netlify bot commented Jan 15, 2026

Deploy Preview for ohif-dev canceled.

Name Link
🔨 Latest commit 0e19678
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/69695e4c7437d80008807ca7

@cypress
Copy link

cypress bot commented Jan 15, 2026

Viewers    Run #5865

Run Properties:  status check passed Passed #5865  •  git commit 0e19678cec: Switched back to jump to segment center for hte unit tests
Project Viewers
Branch Review fix/navigate-to-contour
Run status status check passed Passed #5865
Run duration 02m 19s
Commit git commit 0e19678cec: Switched back to jump to segment center for hte unit tests
Committer Bill Wallace
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 37
View all changes introduced in this branch ↗︎

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