wanderine / BROCCOLI

BROCCOLI: Software for Fast fMRI Analysis on Many-Core CPUs and GPUs
GNU General Public License v3.0
113 stars 38 forks source link

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

Open mmbannert opened 3 years ago

mmbannert commented 3 years ago

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 commented 3 years ago

Hi Michael,

no one has worked on the Python wrapper for 5 years, and I dont have much time for Broccoli now when I have my own research group.

Den mån 19 okt. 2020 16:23Michael Bannert notifications@github.com skrev:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wanderine/BROCCOLI/issues/56, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABA2XSFTA6GYHO7XG25PD5TSLRDX5ANCNFSM4SWHAZDQ .