You can’t easily achieve this with OHIF, as it’s a front-end application that doesn’t expose such functionalities. Consider exploring other solutions that have attempted similar tasks. Essentially, you need to work with events - firing an event from outside while listening for it inside the application.
Could I write an extension that would provide such interface for me easily. I mean, could I write an extension that would have access to this functionality from within the viewer react application?
I know my way around the web stack. But before diving in to deep it might be good to have an educated guess.
I see that some service components inside the viewer provides event subscriptions. Maybe I could hook into those, proxy them and provide some outside-in way to call internal service functions?