Add hide/show for single ROI#229
Closed
GhadeerAlbattarni wants to merge 1 commit intoImagingDataCommons:masterfrom
Closed
Add hide/show for single ROI#229GhadeerAlbattarni wants to merge 1 commit intoImagingDataCommons:masterfrom
GhadeerAlbattarni wants to merge 1 commit intoImagingDataCommons:masterfrom
Conversation
igoroctaviano
requested changes
Feb 4, 2026
| const feature = this[_drawingSource].getFeatureById(uid) | ||
| if (!feature) return | ||
|
|
||
| feature.setStyle(_getOpenLayersStyle({})) |
Collaborator
There was a problem hiding this comment.
Hide and Show use a different approach to set the style. Can we have a consistent way?
Collaborator
There was a problem hiding this comment.
feature.setStyle vs setFeatureStyle
|
|
||
| _setFeatureStyle(feature, styleOptions) | ||
|
|
||
| this[_annotationManager].setMarkupVisibility(uid, true) |
Collaborator
There was a problem hiding this comment.
Maybe instead of setting the style, could we set the feature's visibility? then no need to change styles.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds public viewer APIs to hide/show a single ROI by UID.
Motivation
This addresses a gap in the library API where consuming applications (like OHIF Viewer) need to toggle visibility of individual measurements/annotations via UI controls (e.g., eye icons in measurement panels). Without single-ROI visibility control, users could only hide/show all annotations at once.
Changes Made
New Public Methods in VolumeImageViewer:
hideROI(uid) - Hides an individual region of interest by its unique identifier
showROI(uid) - Shows a previously hidden region of interest
Test plan