Commands running do not belong in HPService. But Protocol has a callback which can store onProtocolExit and onProtocolEnter.
Run chooses the best protocol to apply. It is used on mode enter setProtocol sets a protocol/stage explicitly (e.g., MPR)
Final comments and we can merge
This is a very complex topic. You can take a look at the following links for more information:
https://www.youtube.com/watch?v=xmvVyftgNjY https://segment-anything.com/demo# https://www.cornerstonejs.org/live-examples/labelmapsegmentationtools
https://docs.google.com/document/d/16JzYi6E_cjhrZer3OJuBu--uyLKuvGDels7SxgRJ-4M/edit