population_template initialisation and drift correction fixes#2471
population_template initialisation and drift correction fixes#2471jdtournier merged 2 commits intodevfrom
Conversation
- use it in first registration level - fix stabilisation #2467 - also added option to delete intermediate templates if storage space in scratch is an issue
Given #2467 states that use of an existing command-line option resolves the issue for problematic data, I would tend to think no? But I don't have a sense of the prevalence or magnitude of the problem to make a confident call. |
…n.command force=True
Don't think there is a way to fix it via command-line options, setting |
|
Given the discussion above, I reckon this needs to merge to |
... and then changed it back to |
|
oops, sorry - turns out changing the base to |
For context regarding 1.:
The initial template space is computed after the initial trafos
R_i(default: translations to centre of mass) are applied to the input images.The drift correction is supposed to prevent changes in appearance to the template over template levels and used the average transformation
A = E [T_i ]across the image trafosT_iwhich include the initialisation. Hence for large "outliers" in the initialisation (i.e. one subject is far form the others in scanner space), the initial drift correction moves the template content out of the template FOV (as reported in #2467). The proposed fix computesE [R_i ]and corrects drift viaT_i <- T_i E [R_i ] (E [T_i ])^{-1}. This approximately preserves the size and shape of the image relative to the (average) original input images. Suggestions on how to improve drift correction are very welcome.BTW, on my test data (neonatal FA maps), deactivating drift correction via
-linear_no_drift_correctionleads to visible distortion in the affine levels that increase with the number of levels iterations. It's also worth thinking about implementing some form of (approximate) average shape preservation for the nonlinear registration.This PR alters the behaviour and output of
population_templatefor all types or registration except fornonlinearso we'd need to tag it. Test data needs to be updated as well. Should this go to master?