BROCCOLI nodes do not produce any output within workflows

Dear nipype community,

I would like to use BROCCOLI through the nipype interface. The nipype nodes provided with BROCCOLI work fine when executed on their own. Ideally, however, one would want to include them along-side with other nodes (e.g. FSL nodes) in nipype’s workflow objects. Unfortunately, running such workflows fails because any downstream nodes do not receive any input from earlier BROCCOLI nodes. For example smoothing a functional image and then performing maths on the results as described here would fail:

from nipype.interfaces import broccoli, fsl
from nipype import Node, Workflow
import os

nii_path = '/path/to/some/functional_data.nii'

sm_node = Node(broccoli.Smoothing(fwhm=8, platform=0, device=2), name='sm_node')
fslmaths_node = Node(fsl.ImageMaths(op_string='-sub .2'), name='fslmaths_node')

wf = Workflow(name='broccoli_smoothing_test')
wf.connect([(sm_node, fslmaths_node, [('smoothed_file', 'in_file')])])

wf.inputs.sm_node.in_file = nii_path
wf.base_dir = os.path.expanduser('~/broccoli_smoothing_test')

This will produce this error:

“ValueError: ImageMaths requires a value for input ‘in_file’. For a list of required inputs, see”

because the smoothed image, which the Smoothing node was supposed to create, does not exist although BROCCOLI does not report any errors.

This error exists both on macOS and Ubuntu.

Any ideas what might be causing this problem? Has anyone else experienced similar problems? I would be happy to try to fix the nipype wrappers for BROCCOLI but I would be grateful for any suggestions.

Thanks and best,