dwifslpreproc: add missing reorient_fod option#2062
Conversation
Caused mrtransform to fail when the number of se_epi images made it interpretable as SH coefficients (e.g. 6)
Lestropie
left a comment
There was a problem hiding this comment.
Downstream of #1485.
This works because specifying -reorient_fod does not currently have any consequence if the number of input volumes does not correspond to an SH series. While this behaviour is convenient in this particular circumstance, currently across the board I'm trying to prevent occurrences of command-line options that can be specified without having any effect, as it has led to usage issues not being identified; I'd prefer in general that any command-line option specified that has no effect be reported at warning level. No need to delay this fix, but it's something to think about more widely (e.g. #1975).
|
The deeper problem is that even though FOD reorientation now has to be specified explicitly, whether or not it has to be specified still depends on the number of volumes, which remains a source of unexpected behaviour. |
|
From the perspective of using the command directly, whether or not providing that option is necessary is entirely expected behaviour to me, as it only applies in cases where the command cannot unambiguously determine what the user wants it to do. It's merely an additional source of complexity for which the Let's elucidate the options fully:
At this point in time I would probably advocate for 1. in order to solve this specific issue. If at some point in the future we have some back-end mechanism for flagging command-line options that were used to no effect, this would need to be revisited. As with all such problems, we would also ideally add to the script testing suite a |
|
Slight correction to the current behaviour (1.): if I am also in favour of 1. -- 2. adds another layer of complexity and 3. makes writing scripts more painful, especially outside the MRtrix scripting library. |
|
The problem I have with the current approach is this scenario: A user develops a script or pipeline that mrtransforms an x * y * z * 5 dataset that has no bearing with FODs. This 5 can be a number of parameters or subjects or just images in general. After the parametrization or number of subjects or images changes to 6, suddenly the script breaks and the user has to supply FOD related options even though the application has nothing to do with FODs. The cleanest option on my opinion would be to merely print a warning if mrtransforming something that could be SH coefficients. |
|
This is less of an evil than the behaviour changing from pre 3.0.0 where FOD reorientation was the default to post 3.0.0 where it would be off by default. Reorientation might be easy to miss in scripts, a straight out error is easy to fix. I prefer slightly annoying syntax but easy to fix over potentially harmful behaviour. I suggest we replace the error by a warning in 3.1 or so but keep it for now. We had a discussion about this here. |
I agree completely. I wasn't implying that we change anything other than the current fix to address the bug. I was just thinking that in the long run, it would make slightly more sense to replace the error with a warning. |
Caused mrtransform to fail when the number of se_epi images made it interpretable as SH coefficients (e.g. 6)