Hi Robyx,
1. list the set of process icons existing in the workspace
The following static function:
Array ProcessInstance.icons()returns an array with the identifiers of all existing process icons.
2. read/update the parameters stored inside
ProcessInstance ProcessInstance.fromIcon( String iconId )This function returns a copy of the instance being transported by a process icon with the specified identifier. Once you get the instance, you can modify it by changing its properties, just as any JavaScript object. For example:
let P = ProcessInstance.fromIcon( "Process01" );
if ( P.processId() == "ImageIntegration" )
{
P.sigmaHigh = 4.2;
P.executeGlobal();
}3. open the process dialog (like what happens by double-clicking on the icon)
void ProcessInstance.launch()Continuing with the previous example:
let P = ProcessInstance.fromIcon( "Process01" );
if ( P.processId() == "ImageIntegration" )
P.launch();
A word of caution here: This should only be done from a script that does not block the platform's event queue. This is a complex topic that I can describe in depth if necessary, but let's keep things simple for now.
4. run one instance of the selected process setting the input and output images
For example, let's suppose that we have a 'Process01' icon transporting an instance of CurvesTransformation (just to put an example of a process that can be executed on views). You can execute it on the current view very easily:
ProcessInstance.fromIcon( "Process01" ).executeOn( ImageWindow.activeWindow.currentView );I hope this helps as a starting point. Let me know if you need more information.