I am used to do lots of operations with
fslmaths which can do complex tasks in a one-liner. However the NiPype warper of
fslmaths seems especially difficult and cumbersome to use, but maybe i'm using it wrong.
The
fslmaths wrapper expects
in_file for the first input and
op_string for a
list of all other inputs. So even
if i can't create a node to make lists of any length with NiPype, creating fixed length nodes (makePairList, makeTripletList, ...) would not work for all my different operations because these list-making nodes could only be used once right? Then how to write
fslmaths commands with a varying number of arguments efficiently?
As an example I created a Node to encapsulate a
fslmaths command i want to run on several different inputs (in_file and op_string list, both changed for each command). This means that i would have to create a MapNode, create lists ([in_file1, op_string list1], [in_file2, op_string list2], ... ) for each inputs of this map node and inside these lists create lists for op_string (op_string1=[myFileFromNode1, myFileFromNode1], ...). This seems a nightmare to implement.
Does anyone see an easy solution to this issue? fslmaths is an extremely convenient command-line tool so having it work efficiently in NiPype would be particularly useful.