population_template: Fix linear drift correction#2802
Conversation
Transforms purportedly averaged across the cohort were erroneously equivalent to the transform of the last input.
|
clang-tidy review says "All clean, LGTM! 👍" |
|
@daljit46: There's a MacOSX CI failure on this one related to cmake that's unrelated to the changeset. |
|
This looks like a symlinks issue, but unfortunately I still haven't gotten my Macbook yet so I'm unable to test it. Perhaps @bjeurissen could take a look and see what's going on? |
- Only compute the reference transform for linear drift correction once, rather than overwriting it every linear iteration. - If performing linear drift correction, but no initial alignment was performed, then use the mean of the first linear iteration as the drift correction reference.
|
clang-tidy review says "All clean, LGTM! 👍" |
|
I have ensured that |
Found this one while porting code for #2678.
Problem appears to have been introduced here in 5ad072f as part of #2471.
It does not affect
master, as the drift correction functionality does not yet exist there.I'm posting as a draft for now, as currently the average transformation is recomputed at every linear registration iteration, whereas it should only need to be done once; but I'll want to test a little more before committing that.
@maxpietsch: Do you have any good exemplar data with a clear drift?