Problem batch processing using the moco_ plugin

Hey guys,

I’ve got an issue using a motion correction plugin within a batch processing macro I am trying to write. I’m using the moco_ plugin and have used the “record” feature of imageJ to generate the script for this operation:

run("moco ", "value=217 downsample_value=1 template=[AVG_whole_cortex_10s_50Hz_10_2019-11-29-160231-0000.avi #2] stack=[whole_cortex_10s_50Hz_10_2019-11-29-160231-0000.avi #2] log=None plot=[No plot]");

unfortunately I want to change the file names to a variable that will change for each file in the batch - like this:

run("moco ", "value=217 downsample_value=1 template=["AVG_"+title+" #2"] stack=["title+" #2"] log=None plot=[No plot]"); 

where “title” is the filename that I generate using getTitle(); from the source image.

I’ve tried so many different types of syntax but it always says its expecting a ‘)’ somewhere in the line.

I know its a mundane problem but I’m new to imageJ - any advice??

Joe

I suppose you’re using this plugin:

(It’s always a good idea to provide links to the resources you’re using, so others can quickly find what you’re talking about.)


Judging quickly from the syntax highlighting (which you also get when using the script editor in ImageJ), I’d suggest you’ll have to fix a problem with quotes in your option string. Try removing the quotes before AVG_.