Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nipype: BROCCOLI nodes do not produce any output within workflows #56

Open
mmbannert opened this issue Oct 19, 2020 · 1 comment
Open

Comments

@mmbannert
Copy link

Dear Anders,

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')
wf.run()
`

This will produce this error:

"ValueError: ImageMaths requires a value for input 'in_file'. For a list of required inputs, see ImageMaths.help()"

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.

What can be done about this?

Thanks and best,
Michael

@wanderine
Copy link
Owner

wanderine commented Oct 19, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants