nipype icon indicating copy to clipboard operation
nipype copied to clipboard

fsl.FNIRT does not generate fieldcoeff_file when it is an output connection

Open mwaskom opened this issue 8 years ago • 8 comments

Summary

When using fsl.FNIRT you have to set fieldcoeff_file=True in the inputs even when the fieldcoeff_file output is connected to a downstream node.

Actual behavior

No fieldcoeff_file is written and the downstream node errors out.

Expected behavior

Shouldn't there be an association between the input and output traits fieldcoeff_file be written with a default filename and passed to the downstream node? It's been so long that I've dealt with the Interface guts that I forget how this works ...

mwaskom avatar Jun 26 '17 16:06 mwaskom

@mwaskom looks like there is no default value for fieldcoeff_file - thus it doesn't get extracted for the outputs dict unless explicitly specified since it's left Undefined

mgxd avatar Jun 26 '17 16:06 mgxd

So remind me, to fix this I need to add genfile=True in the input spec and then add fieldcoeff_file to this list?

mwaskom avatar Jun 26 '17 17:06 mwaskom

If fieldcoeff_file can always be created, just adding default=True should suffice. If not, then this is intended behavior, as I don't believe interfaces' outputs can be dependent on workflow connections with this current engine

mgxd avatar Jun 26 '17 18:06 mgxd

By "can always be created" you mean can be created by an interface with only the mandatory inputs set?

How is the suffix determined with default=True? Is there an example Interface you can point me to?

mwaskom avatar Jun 26 '17 18:06 mwaskom

By "can always be created" you mean can be created by an interface with only the mandatory inputs set?

Yes, that's a better way to say it :+1:

How is the suffix determined with default=True? Is there an example Interface you can point me to?

By setting default=True, I believe it'll go down this path by default and automatically generate the file. The suffix is determined from a hardcoded dict filemap

mgxd avatar Jun 26 '17 18:06 mgxd

@mwaskom is this all set?

mgxd avatar Jul 11 '17 19:07 mgxd

No, it needs a PR, I just haven't had time for it.

mwaskom avatar Jul 11 '17 19:07 mwaskom

i did like to help

Dhananjay4yu avatar Jun 01 '25 14:06 Dhananjay4yu