We are thrilled to introduce the latest updates to SlicerPipelines, a Slicer extension that enables the creation of sophisticated workflows by seamlessly combining functionality from multiple modules into a single, integrated module that can be run by itself or used for batch processing via the Pipeline Case Iterator. In this article, we will dive into its improved capabilities.
Parameter Nodes integration
The previous architecture of SlicerPipelines had its limitations, particularly when it came to passing module parameters from one pipeline stage to the next. However, with the recent refactoring that introduces support for Slicer Parameter Nodes, an improved way for Slicer module developers to manipulate input and output datasets, we can now pass any number of parameters and datasets through multiple stages and include these values in the result set.
Pipelines with multiple outputs
In the latest iteration of the SlicerPipelines extension, created workflows can generate any number of MRML nodes (Volumes, Segmentations, or Models for example) and scalar values as output. This expanded capability means you can not only transmit the primary output of your operation, such as a segmentation, but also pass along and reuse intermediary results like thresholds and window parameters across subsequent stages. Explore the Pipeline Creator Documentation for detailed insight into creating pipelines that harness this.
Multiple Inputs and Outputs in Pipeline Case Iterator
Thanks to recent updates to the Slicer Parameter Nodes in Slicer, the Pipeline Case Iterator now accommodates pipelines that accept a flexible number of inputs.
Here is the workflow to run a pipeline through the case iterator:
- Select the pipeline within the module.
- Select the CSV file containing the cases you want to process. If this is the first time running the pipeline, the Template Parameter File button can help you create a basic CSV file, a path should be given for dataset files.
- Specify the output directory that will contain the results.
When running your pipeline, all rows in the CSV file marked as input will be processed. Any resulting dataset will be stored in the output directory along with a CSV file. The accompanying CSV file contains not only input values but also paths to the newly generated datasets and any numerical results produced by your pipeline. For comprehensive configuration and usage details, refer to the Documentation.
Extending the Pipeline Creator
Extending the Pipeline Creator has been simplified with these updates. To add support for creating new modules using the Pipeline Creator, you only need to write a straightforward function that acts as the interface between Pipeline Creator and your module. Annotate this function using the
@slicerPipeline decorator, and your code will seamlessly be available inside the Pipeline Creator. There are implementations of pipeline functions from the surface toolbox, the segment editor, and a subset of VTK filters. For comprehensive guidance and in-depth examples, dive into the documentation sections related to creating pipelines and using them to iterate through multiple inputs or explore the source code.
Real-World Application: SlicerSALT
An example using the new Pipelines infrastructure has been deployed in SlicerSALT, a shape analysis-focused custom Slicer application. This Pipeline module combines the several distinct steps necessary to fit a skeletal shape model (s-rep) to a target shape. Previously, users had to use the SRepCreator module to create an initial fit and then used the SRepRefiner module to create the final model. Now, these steps have been consolidated into a single SRepCreateAndRefine module using the Pipeline Creator, enabling batch processing for a group of shapes via the Case Iterator. Below is an example result produced using this pipeline:
These enhancements simplify the use of these SlicerSALT modules and integrate batch processing capabilities, making them more useful to non-expert users.
We’ve included comprehensive user documentation for both the Pipeline Creator and the Pipeline Case Iterator to empower you in harnessing the full potential of the updated Pipeline framework.
How to access the extension
- Install directly from Extension Manager in 3D Slicer
- Manually download and install extension
- Build it from source
The PipelineCreator is distributed under the Apache license, while Slicer itself is distributed under the BSD-style Slicer License. Both licenses are permissive and support unrestricted commercial use, with appropriate attributions.
Kitware’s Medical Computing Capabilities
The SlicerSALT suite was developed by Kitware’s Medical Computing Team, which is composed of computer scientists, software engineers, and imaging experts. Specializing in the medical and biomedical industries, they provide collaborative research, development, and technology integration services for research centers, universities, and commercial companies. While the suite of tools is open source, you can partner with Kitware to ensure that you are effectively leveraging the technology. We can tailor the applications to meet your specific needs, including developing custom workflows, user interfaces, and more. For more information about partnering with Kitware, send us a message at firstname.lastname@example.org. You can also visit our commercial projects page.
Research reported in this publication was supported by the National Institute Of Biomedical Imaging And Bioengineering of the National Institutes of Health under Award Number R56EB021391. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.