it's Pablo!
I'm trying to make a script for DTI. I already have it with functions and nipype but now I'm trying with nodes yet there is one node which needs a list of two inputs -Merge()- to merge both images. However, it only accepts one input and connect() does not allow to input several inputs at a time. In this function, it neither lets me do it separately and trying util.merge rises an error.
I'm wondering if I can take two inputs from the outputs of two different nodes each, and join them into a list with another node maybe and feed it into the node that takes the list as input. Or maybe there is another way to define a node that allows this?
Does anyone knows anything at all?
Thank you so much in advance
If I understood well, you just want to merge two items in a list.
This is what the merge interface is made for. You just need to provide the number of inputs upon initialization, as described in the doc. The
no_flatten
andravel_input
options will help you is the inputs are lists, which can often happen.EDIT: a small example:
RESULT:
Note that our lists are correctly merged. To check it for yourself, you can create to other printer nodes, and connecte them to the outputs of sourceA and sourceB