JIPipe Help

ImageJ macro support

JIPipe supports the execution of most ImageJ macros through a node:

Run ImageJ macro

Executes the macro for each iteration step. Each slot receives exactly one data item per step.

Background

The integration works by first making the incoming data available as objects (images, tables, etc.) that can be accessed through standard ImageJ macros. See the ImageJ scripting documentation for more details. After the execution of the macro, JIPipe gathers outputs and converts them back into JIPipe-accessible data.

Due to the limited set of data types supported by ImageJ, JIPipe will apply the following operations depending on the data type:

Data type

To ImageJ

From ImageJ

Image (ImageJ image etc.)

Will open the image in an ImageJ image window that is named after the input slot

Will look for an ImageJ image window named after the output slot

Table (ImageJ table etc.)

Will store the table data into an ImageJ table window. To write into the standard ImageJ results table, name the input Results.

Will look for an ImageJ table that is named after the output slot. To extract the standard ImageJ results table, name the output Results.

Paths (Files/Folders/Paths)

Will create a table with one row and a single column Path that contains the path. Will then apply the same operation as for tables.

Will look for an ImageJ table named the output slot, take the first column and assume that the rows of that column contain the paths to be put into the output.

While other data types are technically supported, they may behave unexpectedly.

Writing ImageJ macros

You will need to adapt your macro code to work with how JIPipe interacts with ImageJ. A good way to get started is the following code that applies a Gaussian blur macro to each image received by the input Input and returns the resulting image back to JIPipe by renaming the output image Output (the name of the output slot):

// Each input image slot creates a window with its name. // You have to select it, first selectWindow("Input"); // Apply Gaussian on image "Input" run("Gaussian Blur...", "sigma=2"); // JIPipe extracts output images based on their window name rename("Output");

Passing parameters

You can create macro parameters that will be automatically injected into the macro code by JIPipe. To do this, click the Edit button within the Macro parameters category and create a new parameter. The key will be used as a variable name in the macro code.

01 December 2025