# Update to Slicer Pipelines

**URL:** <https://discourse.slicer.org/t/update-to-slicer-pipelines/31797>\
**Category:** Support\
**Tags:** feature\
**Created:** [September 19, 2023, 8:29pm UTC](https://discourse.slicer.org/t/update-to-slicer-pipelines/31797 "2023-09-19T20:29:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harald\_Scheirich](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harald_scheirich/32/9886_2.png) [@Harald\_Scheirich](https://discourse.slicer.org/u/Harald_Scheirich)\
**Post date:** [September 19, 2023, 8:29pm UTC](https://discourse.slicer.org/t/update-to-slicer-pipelines/31797/1 "2023-09-19T20:29:11Z")

</div>

[SlicerPipelines](https://www.kitware.com/introducing-slicerpipelines-a-coding-free-way-to-create-simple-modules-in-3d-slicer/) 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](https://slicer.readthedocs.io/en/latest/developer_guide/parameter_nodes/overview.html) 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](https://github.com/KitwareMedical/SlicerPipelines/blob/main/Documentation/PipelineCreator.md) for more information on how to create pipelines.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/7/f750f69e19c3d80d72ddedd0fb9a16280a510bf9.png)

## 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](https://github.com/KitwareMedical/SlicerPipelines/blob/main/Documentation/PipelineCreator.md) for more information on how to create pipelines.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/c/9cf60c09ce43f21ee68ba0f5f55ecef619ce51e2.png)

## 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](https://github.com/KitwareMedical/SlicerPipelines/blob/main/Documentation/PipelineCreator.md#creating-a-pipeline-in-source) for more information, or check [the source](https://github.com/KitwareMedical/SlicerPipelines/tree/main/PipelineModules/_PipelineModules) of our implementations.
