Myriad might be a Java toolkit but that doesn’t mean you can’t use MATLAB, Python, R, or anything else with it for that matter. The NASA Snapshot has support for redirecting standard input and output so anything that can print to the screen and read input will work. The API entry for ExternalROIFinder has all the details but basically all you need to do is have your code print myriad: True when it finds a Region Of Interest and the library takes care of the rest.
Here’s a quick video demonstration – I trained a model in scikit-learn to detect damage in ultrasonic data and wrote a simple Python app to handle input and output.
This was done in an early build of Myriad Desktop – more recent versions include support for configuring a Python or MATLAB interpreter instead of making you browse to the binary yourself.
If your app takes a while to get started, you can either structure it as a long running app to amortize the startup cost or you can simply create many more Myriad workers to run it. That way even if each individual call to your code takes a while to complete, the rest of the data processing pipeline isn’t being held up.