Update to Slicer Pipelines

SlicerPipelines are Slicer’s way to create workflows combining functionality from multiple modules together in one single module. The module created by SlicerPipelines can then be run by themselves or used for batch processing via the Pipeline Case Iterator. This article presents the upgraded functionality of this Slicer extension. The previous architecture allowed us to pass an exact return value from one pipeline stage to the next, and this became a limiting factor for the use of this module. By refactoring to allow for the use of Parameter Nodes we can now pass any number of parameters and nodes through any number of stages and include these values in the result set.

Multiple data for outputs

In the previous iteration the output of a pipeline was limited to a single output node. In this new version of the Slicer extension a pipeline can now output any number of nodes and/or scalar values. This means you can not only pass the main output of your operation through a pipeline i.e. a segmentation, but also pass along and reuse intermediary results like thresholds, window parameters for use in a later stage. See the Pipeline Creator Documentation for more information on how to create pipelines.

Multiple Inputs and Outputs in Pipeline Case Iterator

In the previous iteration the output of a pipeline was limited to a single output node. In this new version of the Slicer extension a pipeline can now output any number of nodes and/or scalar values. This means you can not only pass the main output of your operation through a pipeline i.e. a segmentation, but also pass along and reuse intermediary results like thresholds, window parameters for use in a later stage. See the Pipeline Creator Documentation for more information on how to create pipelines.

image

Extending the Pipeline Creator

Extending the Pipeline Creator has now become easier with the changes presented. If you want to add support for creating new modules with Pipeline Creator to your own modules you only need to write a very simple function that will be the interface between Pipeline Creator and your module. Mark up the function using the @slicerPipeline decorator and your code will automatically be usable inside of Pipeline Creator. There are implementations of pipeline functions from the surface toolbox, the segment editor, and a subset of VTK filters. See the documentation on creating pipelines for more information, or check the source of our implementations.

1 Like