-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: customize cornerstone-SR-extension load toolbar #4872
base: master
Are you sure you want to change the base?
feat: customize cornerstone-SR-extension load toolbar #4872
Conversation
…cs-ext-load-toolbar
❌ Deploy Preview for ohif-platform-docs failed. Why did it fail? →
|
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be treated as a customization but rather a toolbarSection. So just assign a toolbarSectionId to it, register buttons in the toolbarButton, and make it appear in the UI in the mode.
I imagine we do this for all of the viewports.
SRViewport.mainToolbarSectionId
SEG
RT
and have toolbarButtons like
{
id: 'LoadSR',
uiType: 'ohif.toolButton',
props: {
icon: 'tool-stack-scroll',
label: 'LoadSR',
tooltip: 'LoadSR',
commands: loadSR,
evaluate: 'evaluate.cornerstoneTool',
},
},
and others for SEG and RT with separate commands
@sedghi I guess the question then is how are the developers supposed to customize this, since there are buttons already being registered in the upstream code. Suppose they want to replace the buttons entirely. Are they supposed to clear with the current toolbar values and add new ones? I believe that what you are saying is already possible. I was using this on the modeEnter callback:
And it was working, but @wayfarer3130 recommended we added an customization instead. |
@wayfarer3130 Do you think it should be a csutomization or a button section with toolbarbuttons? |
Context
Currently, there is no way to customize the buttons of the "load toolbar" of the SR viewport with the customization service.
This PR adds this ability.
Changes & Results
Before:

Uncustomizable toolbar
After:

Customized toolbar
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment