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
[RTM] ENH: Use mri_robust_template for T1 merge #481
Conversation
1ef85f6
to
dd061fe
Compare
This is running fine for me. Do we still want to pass the pre-merged T1 to FreeSurfer? On the one hand there's no scaling issue to correct before passing it in; on the other, it's what FS will do immediately, anyway, so no need to duplicate work. Leaving it as is also puts the original T1s into the FreeSurfer directory, which is either good (for provenance sake) or bad (for taking up space), depending on your priority. I can go either way. |
dd061fe
to
79bd361
Compare
I would lean towards feeding one merged image. |
BTW - can we get a changelog entry? It would be good that now the templates are unbiased. This also closes #310 |
When you say unbiased, you mean that we're no longer aligning to the first image before taking the average? Because we're still doing that. The FreeSurfer invocation is I can play with dropping those to see what effect that has, but I think maybe that makes sense as a separate PR. This fixes #439 in the short term while keeping as close as possible to existing behavior. |
Ok then this does not close #310. Lets leave it to another PR. |
The new merge stripped original filename info from the pipeline. This should resolve that, though another option would be to pull the |
Re-ran s497 from scratch overnight. Outputs LGTM. Moving to |
We've found that FLIRT alignment can sometimes fail on T1 images. Although a 9-DOF affine registration resolves the issue, it appears to be an artifact problem, rather than a scaling issue that would require the extra 3 degrees of freedom.
This PR uses FreeSurfer's
mri_robust_template
to generate a structural reference image.mri_robust_template
throws an error on single volumes, so I subclassfreesurfer.RobustTemplate
to copy the input file in that case. (I use a hack similar to that infreesurfer.ReconAll
to fiddle with thecmdline
.)Closes: #439, #473