Headlessly calling Fiji to execute script

I’m calling Fiji from my KNIME workflow to run a modified beanshell script that applies a classifier on images via Trainable Weka Segmentation plugin. It works via External Tool (Labs) node - but this node is a bit cumbersome to use. Is there a more elegant solution for this?

I know about pointing to the ImageJ1 plugin directory via Preferences and using the ImageJ macro node - but I need to make this more portable (and user friendly) if possible - so all settings should be packaged with the workflow.

@gabriel.einsdorf - thoughts?

3 Likes

Hi Ellen

I have some ideas for you:

  1. To make the workflow more user friendly, try wrapping the External Tools node into a wrapped metanode and use quickform nodes to expose only the settings that are relevant to your users via the dialog of the metanode. We are extending the capabilities of these nodes in the next release of the Ananlytics Platform, so this will be even easier in the near future.

https://hub.knime.com/knime/workflows/Examples/06_Control_Structures/02_Quickforms/01_Quickforms_and_Metanodes*CtMS-rLfAMteYQfV

I have made the experience that the External Tools node can be insufficient for some usecases, you can fall back to the Java Snippet node and do the call to the external process from there, I think it could make it easier for you, especially the combination with the quickform nodes.

https://hub.knime.com/knime/nodes/Java_Snippet*QNB4FsAPnEAgOMVh

You can call to an external program from java like this:

  1. To maximize portability, you could put the Fiji installation directly into the workflow. You can get the local path of the workflow using the Extract Context Properties node.

https://hub.knime.com/knime/nodes/Extract_Context_Properties*vaCOTKFPaiaqwUa8

best,
Gabriel

4 Likes