Setting Plugin Options for Batch Macro

bonej
imagej
macro
scripting

#1

Hello everyone,

I’ve been running the boneJ plugin “Thickness” on a batch of images, using the batch macro method as such:

That seems to run fine, however, for each time the macro runs on a image, I need to specify the options over and over:
thickOpt

I’d like to find a way to set the options in the macro itself, so that I dont have to manually specify it every time it runs for each individual image (I have hundreds of images per folder, so it’s quite tedious).

Is there a way to set the options like that:

run(“Thickness”, “set options…”);

I’ve tried with things such as:

run(“Thickness”, Thickness==1, Spacing==0…);

or even

run(“Thickness”, Thickness=true, Spacing=false…);

I can’t seem to find the right documentation that would explain how to set these, so I’d be grateful if someone could point me in the right direction.

Thanks!

Shiv
University of Sheffield


#2

Use the macro recorder when running the Thickness command interactively, and it should record a command including an option string, such as:

run("Thickness", "thickness mask");

#3

Hi Jan,

Thanks a lot, that seems to work just fine!

Cheers,

Shiv