Preliminary steps
👉 This tutorial requires that you have installed node template Import images
.
If you do not have these templates, you can download them via Manage > Download more templates
or by importing the Templates.json
file that is provided in the data package. If you do not know how to download or import node templates, please check out our tutorial.
Step 1
Create a new project with one compartment.
Drag the data folder of the tutorial to the UI.
Add the Import images
template from the node templates list. Connect the output of the Folder list
node to Import images
.
Add an ImageJ Macro
node to the UI (red arrow 1).
Here you could add a new input slot (red arrow 2) and configure the node manually, but we will instead load an example for convenience reasons.
Step 3
Go back to Parameters (red arrow 1) and add the following macro code to the indicated place (red arrow 2) that needs to be executed here (red arrow 3):
run("Auto Local Threshold",
"method=[Try all] radius=5 parameter_1=0 parameter_2=0 white")
This example macro executes the 15 local thresholding methods of ImageJ on the blob image, using a radius of 5.
Step 4
Go back to Parameters (red arrow 1) and add the following macro code to the indicated place (red arrow 2) that needs to be executed here (red arrow 3):
run("Auto Local Threshold",
"method=[Try all] radius=5 parameter_1=0 parameter_2=0 white")
This example macro executes the 15 local thresholding methods of ImageJ on the blob image, using a radius of 5.
Step 5
Now we build-in another macro node, this time we will only use the Phansalkar method, as this is judged to be the most successful thresholding method after examining the output of the first macro node. The new node (red arrow 1) was set up as the first one, the macro code (red arrow 2) will run this specific method only (red arrow 3).
run("Auto Local Threshold",
"method=Phansalkar radius=5 parameter_1=0 parameter_2=0 white")