JIPipe Help

External parameters

External parameters are used if you want to run a node for multiple parameter sets. For example, you want to run a Median filter 2D with radii 3, 5, 7, and 12 without creating four copies of the node. As the feature was designed to handle parameter set, you even make more advanced arrangements of multiple parameter combinations to be tested.

Enabling external parameters

External parameters are deactivated by default and must be enabled by selecting External | Enable external parameters from within the parameter editor.

Screenshot

You will notice that the node gains an additional slot Parameters that has a different coloring, indicating that the received data is used for parameter operations.

Node with external parameters slot

The node now expects that you provide it with parameter sets.

Creating parameter sets

JIPipe handles parameter sets just like any other data, meaning that you can create, merge, and process them using the nodes available through the Add nodes panel.

The easiest way of creating a new parameter set can be accessed by right-clicking an empty space within the pipeline and selecting the Add parameter sets here ... or by pressing Ctrl+Shift+A.

Screenshot

You will be prompted with a dialog that contains all existing and available nodes. Select the node of interest and select the parameters that should be controlled via external parameters.

Screenshot

In this example, we selected only Radius.

After confirming by clicking Select, a new Define multiple parameters node will appear in the pipeline. Connect it to the Parameters input of the Median filter 2D.

Screenshot

Then the Define multiple parameters must be configured with the desired parameter sets by selecting the node and navigating to the Parameters tab and clicking the Edit parameters button.

Screenshot

Parameter set editor interface

The parameter editor interface allows you to add/remove parameter sets (rows) and determine which parameters should be controlled via external parameters (columns).

Parameter set editor

The editor has three main interface components:

➊ Toolbar

The toolbar/ribbon contains all functions needed to modify the structure of the parameter set table.

It has two categories:

  1. Targeted parameters (columns): functions for modifying which parameters are overwritten by an external parameter.

  2. Parameter sets (rows): the parameter sets themselves (adding/removing parameter sets).

➋ Parameter set table

A table that contains all parameter sets. Each column represents a parameter to be overwritten by the parameter set, while a row represents one parameter set.

➌ Parameter editor

On selecting a cell in the parameter set table, you will be able to edit its value via an interface that appears in the Edit value sidebar.

Adding and editing parameter sets

To add more parameter sets, click the Parameter sets (rows) | Add parameter set button, which will add one additional row into the table. Then you will be able to one-by-one edit the values.

For certain parameter types, you can also generate values by selecting one cell and clicking the Parameter sets (rows) | Generate rows button.

Adding parameter overrides

To include another parameter into the parameter set table, navigate to Targeted parameters (columns) | Add from node, select the node and parameter(s), and confirm the selection.

Multiplying parameter sets

Often it is necessary to test all possible parameter combinations. And while it is possible to use the parameter set editor to manually define the parameter sets, this process can be very cumbersome with an increasing number of parameters.

An example is the testing of the r1 and r2 parameters of the Morphological Feature Contrast (MFC) 2D algorithm, where the filter response is greatly influenced by the combination of the parameters. For example, one wants to test all 49 combinations of r1 [1,3,5,7,11,15,21] and r2 [1,3,5,7,11,15,21].

To make the setup easier, one can make use of the Multiply parameters node that receives two or more inputs and generates the combinations of all parameter sets. In our case, we would create one Define multiple parameters node for only the r1 values and another node only for the r2 values. Then the two parameter sets are combined with Multiply parameters.

Screenshot

Download example project

Last modified: 19 September 2024