Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better template + better defaults for reorienting on brain damaged patients + mutual information coregistration (and automatic AC origin placement) #1

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

lrq3000
Copy link

@lrq3000 lrq3000 commented Mar 28, 2019

Hello,

This PR adds a T1 template that is the average of 10 healthy volunteers manually reoriented and realigned using CAT12. It also increases the smoothing kernel, as this provided better results on T1 for both healthy volunteers and brain damaged patients alike. The algorithm was changed to do non-linear coregistration to template (option 'mni') as recent studies found this is more efficient than rigid-body (but the applied transform is still rigid-body, we just don't use the scaling factor).

Also update the documentation according to the latest changes in the code and more logically order the readme.

This was tested on 576 T1 (450 different subjects) with 350 being brain damaged and lots being artefacted by movement, the auto reorienting always resulted in a better head orientation although not in the optimal AC-PC alignment for several brain damaged patients (I am not sure what is the culprit, since it works pretty well even with motion artefacts and more brain damaged patients, all I can think of is maybe a weird intensity scaling of the input image, so maybe next possible enhancement would be an intensity equalization before doing the coregistration on template?). Before the changes proposed in this PR, most auto reorientation (including on healthy volunteers) failed, with the changes the enhancement has been significant (all healthy volunteers are auto reoriented to AC-PC and most brain damaged patients too).

lrq3000 added 4 commits March 28, 2019 14:32
…e of smoothing kernel + update comments and doc

Signed-off-by: Stephen L. <[email protected]>
… support for origin placement on AC)

Signed-off-by: Stephen L. <[email protected]>
@lrq3000 lrq3000 changed the title Better template + better defaults for reorienting on brain damaged patients Better template + better defaults for reorienting on brain damaged patients + mutual information coregistration (and automatic AC origin placement) Apr 12, 2019
@lrq3000
Copy link
Author

lrq3000 commented Apr 12, 2019

Update: I manually checked all the structural images, and in general the new script did a pretty good job.

I now added a new mode I did not yet test on the whole database but which shows a lot of promise: the new spm_coreg function in SPM12. The script can combine both the affine coregistration and then after the mutual information coregistration, this seems to give the best results.

A nice bonus is that spm_coreg also automatically place the origin on AC (or whatever the template has as origin).

Tested on a limited subset of brain damaged subjects, this shows very promising results.

lrq3000 added 4 commits April 13, 2019 01:29
…tion) + change ncc algo to ecc (more robust when damage or artefacts) + fix a few bugs (particularly with p_other)

Signed-off-by: Stephen L. <[email protected]>
Signed-off-by: Stephen L. <[email protected]>
@lrq3000
Copy link
Author

lrq3000 commented Apr 13, 2019

Ironed out some issues and added possibility to do automatic coregistration between modalities, a helper script is provided in spm_auto_coreg.m. Here is the result on a moderately brain damaged subject and original EPI BOLD image way off:

coreg

This was achieved in a 3 steps process:

  1. spm_auto_reorient the structural in MNI space, so that it is also matching other SPM templates
  2. coreg the functional to SPM12 EPI template (this allows a correct translation matrix and a good basis for rotation)
  3. coreg the functional onto the structural (this fine-tunes rotation to precisely match the subject's structural)

The last two steps are done in spm_auto_coreg with optimized defaults.

So far, this strategy seems to work very well. I'll now test on 450 subjects, I'll report back how good it works overall.

@lrq3000
Copy link
Author

lrq3000 commented Apr 19, 2019

This PR is now final, I do not expect to change anything else, the results are quite satisfactory with more than 95% successful coregistration on a hundred subjects :-)

Signed-off-by: Stephen L. <[email protected]>
@lrq3000
Copy link
Author

lrq3000 commented Apr 22, 2019

Tested on 434 sessions (about 410 different subjects), with most being brain damaged or artifacted, 28 only were mis-coregistered (11 really totally off, 17 slightly off but fixable with a few increments of forward/top parameters), thus 93.5% success rate on this dataset. In general, where it was slightly off, it was for healthy subjects.

Indeed, the algorithm seems to work particularly well on brain damaged subjects and artifacted images, with lesions and artifacts acting as landmarks for the algorithm (which was unexpected). For healthy volunteers, the landmarks are a lot smaller, hence some slight offset from correct coregistration (but always very close). I'll try to see if there is a way to enhance the results for these subjects.

@lrq3000
Copy link
Author

lrq3000 commented May 22, 2019

Tested both reorientation and coregistration on 5 other datasets with healthy volunteers (the case that fails the most with this algorithm), and the success rate is similar, above 90% (I don't have an exact figure here since I did not track precisely these datasets contrary to the brain damaged subjects one). These datasets were of about 20 subjects each, and 4 acquisition sessions each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant