-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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: Add simple multi-monitor support #4178
Conversation
✅ Deploy Preview for ohif-platform-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
You can then navigate either window from the 'all' studies in the study browser tab. Study navigation currently refreshes the page, which loses the position on that page, plus any markup/annotations you have created. This is a temporary issue while the navigation is updated to use internal navigation to preserve data. |
Viewers
|
Project |
Viewers
|
Branch Review |
feat/multi-monitor-take2
|
Run status |
|
Run duration | 02m 06s |
Commit |
|
Committer | sedghi |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
2
|
|
0
|
|
44
|
View all changes introduced in this branch ↗︎ |
Means that the study change doesn't have to occur by updating the URL, which clears all the internal data.
} | ||
|
||
public run(screenDelta = 1, commands, options) { | ||
const screenNumber = (this.screenNumber + (screenDelta ?? 1)) % this.numberOfScreens; |
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.
Using negative delta to run commands from window 2 into window 1 feels a bit weird I think. I could see explicit screen id being more intuitive. Or what's the use case with delta?
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.
The use case is really left/right windows or "other window" for the two window use case.
this.isMultimonitor = false; | ||
} | ||
|
||
public run(screenDelta = 1, commands, options) { |
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.
Thoughts about a function that would run commands and options in all windows except the origin from which it was called?
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.
Yes, future enhancement. This is baby steps to get started.
platform/core/src/services/HangingProtocolService/HangingProtocolService.ts
Outdated
Show resolved
Hide resolved
platform/core/src/services/HangingProtocolService/HangingProtocolService.ts
Outdated
Show resolved
Hide resolved
platform/core/src/services/HangingProtocolService/HangingProtocolService.ts
Outdated
Show resolved
Hide resolved
platform/core/src/services/HangingProtocolService/HangingProtocolService.ts
Outdated
Show resolved
Hide resolved
…atus only when a target annotation ID is present
Co-authored-by: Bill Wallace <[email protected]>
extensions/default/src/Panels/StudyBrowser/PanelStudyBrowser.tsx
Outdated
Show resolved
Hide resolved
…ommand execution - Added a new type `RunInput` to enhance input flexibility for the `run` and `runAsync` methods. - Implemented a private `validate` method to check and convert input commands, improving error handling and logging. - Simplified the `run` and `runAsync` methods to utilize the new validation logic, ensuring consistent command execution and returning results as arrays. - Enhanced code readability and maintainability by reducing redundancy in command processing. Co-authored-by: Bill Wallace <[email protected]>
- Added a note indicating future enhancements for the Multi Monitor Service. - Clarified the current capabilities of the service, emphasizing its basic implementation of multi-monitor support. - Improved overall documentation clarity and user guidance. This update aims to inform users about the service's limitations and upcoming features.
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.
Thanks a lot
@salkz I added some notes to the documentation of the service we're just starting. It's not a complete multi-monitor implementation, but I believe it's good enough to be merged.
Note
We plan to enhance this service in the future. Currently, it offers a basic implementation of multi-monitor support, allowing you to manually open multiple windows on the same monitor or separate monitor. It is not yet a full multi-monitor solution!
The multi-monitor service provides detection, launch, and communication support for multiple monitors or windows/screens within a single monitor.
Note
The multi-monitor service is currently applied via a configuration file.
Configurations
The service supports two predefined configurations:
Split Screen (
multimonitor=split
)Splits the primary monitor into two windows.
Multi-Monitor (
multimonitor=2
)Opens windows across separate physical monitors.
Launch Methods
&screenNumber=0
to designate the first window explicitly.screenNumber
to let the service handle window assignments dynamically.launchAll
in the query parameters to launch all configured screens simultaneously.Example URLs:
Split Screen:
http://viewer.ohif.org/.....&multimonitor=split
Splits the primary monitor into two windows when a study is viewed.
Multi-Monitor with All Screens:
http://viewer.ohif.org/.....&multimonitor=2&screenNumber=0&launchAll
Launches two monitors and opens all configured screens.
Behavior
Refresh, Close and Open
If you refresh the base/original window, then all the other windows will also
refresh. However, you can safely refresh any single other window, and on the next
command to the other windows, it will re-create the other window links without
losing content in the other windows. You can also close any other window and
it will be reopened the next time you try to call to it.
Executing Commands
The MultiMonitorService adds the ability to run commands on other specified windows.
This allows opening up a study on another window without needing to refresh
it's contents. The command below shows an example of how this can be done: