feat: Add commands to load SEGs for the active viewport + new hp callback for viewport changes#106
Merged
igoroctaviano merged 13 commits intomasterfrom Feb 12, 2026
Merged
Conversation
Member
|
Igor, how could I test it using GitHub deploy workflow? Can I just pull from this repo instead of upstream, or there's more to be done? |
Collaborator
Author
Run the action ohif/deploy-v3-with-add-ons |
Collaborator
Author
|
@fedorov could you test this one? |
Member
|
I tested and it works fine - please merge! |
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.
http://localhost:3000/viewer?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.1706.8374.643249677828306008300337414785https://deploy-preview-5381--ohif-dev.netlify.appContext
Changes & Results
Load derived display sets (SEGs / RTSTRUCTs) for the active viewport
loadSegmentationsForActiveViewportSEG,RTSTRUCT) that reference the currently displayed data.Hanging Protocol: viewport data change callback
callbacks.onViewportDataChanged?: Command[]cornerstoneViewportService.EVENTS.VIEWPORT_DATA_CHANGEDfires, passing:viewportIdviewportDataprotocolstageIndexHP listener lifecycle + initialization fix
onViewportDataInitializedcallback execution so the configured command list runs correctly and the subscription is cleaned up.Docs
onViewportDataChangedin:platform/docs/docs/platform/extensions/modules/hpModule.mdplatform/docs/versioned_docs/version-3.11/platform/extensions/modules/hpModule.mdTesting
http://localhost:3000/viewer?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.1706.8374.643249677828306008300337414785https://deploy-preview-5381--ohif-dev.netlify.apploadSegmentationsForActiveViewportand verify derived SEG/RTSTRUCT overlays get loaded and applied to the active viewport.callbacks.onViewportDataChanged: [...]that runs one of the new load commands.Checklist
PR
semantic-release format and guidelines.
Suggested PR title
feat(Cornerstone): load derived display sets for active viewport(or if you want to emphasize the HP API)
feat(HangingProtocol): add onViewportDataChanged callbackCode
etc.)
Public Documentation Updates
additions or removals.
Tested Environment