I have tried Calling Weka from an ImageJ(Fiji) macro:
run("Trainable Weka Segmentation", "open=C:\\input\\test.tif inputfile=C:\input\test.tif path=[Ljava.lang.String;@77e655d8");
But when I run that I get an error message: 'path' is required but unset
This line is exactly the line I get when recording a macro and opening test.tif when the Trainable Weka Segmentation dialog starts. I have also tried without the inputfile and/or path variables.
How should I call "Trainable Weka Segmentation"?
The Trainable Weka Segmentation plugin doesn't adhere to the macro recording conventions of ImageJ, mainly because of its complex structure.
However, the correct way to interact with the plugin by macro scripting is described extensively in its documentation on the Fiji wiki. In summary, you need to something like: