nipreps / smriprep

Structural MRI PREProcessing (sMRIPrep) workflows for NIPreps (NeuroImaging PREProcessing tools)
https://nipreps.github.io/smriprep
Apache License 2.0
133 stars 39 forks source link

INU correction gone wrong #125

Closed oesteban closed 4 years ago

oesteban commented 5 years ago

ds005-sub-08-biasfield

fmriprep-1.5.1rc1 - ds005/sub-08

oesteban commented 5 years ago

ds051/sub-06

ds051-sub-06-biasfield

oesteban commented 5 years ago

Possibly duplicate of #127

oesteban commented 4 years ago

At least for the first case, the problem stems from a poor Atropos segmentation (ref. #109, as we will need to check Atropos' segmentation before forwarding it).

WM (necessary for the subsequent N4 step) is label 3 (the red spots):

Screen Shot 2020-05-08 at 1 39 14 PM
oesteban commented 4 years ago

Because this one will rely on nipreps/niworkflows#506, I'm not marking this as a bugfix to the maintenance of old series.

oesteban commented 4 years ago

For ds005/sub-08, this revision of the workflow actually made ATROPOS work better, and find a decent segmentation.

ds051/sub-06 is a case with hyper-intense vessels that still confuse ATROPOS (even with the better INU correction). However, with the multiplication of the WM posterior from ATROPOS with the WM prior from the template, the INU correction is not so horrible after all:

Screen Shot 2020-09-17 at 6 54 55 PM

left is the segmentation from ATROPOS showing how it picks only the brightest spots as WM (white color), right is the weights image for N4 (i.e., product of the WM posterior and the WM prior) and middle is the final, INU-corrected image.

oesteban commented 4 years ago

This is to say that I would keep working on PR to get it to work on ds005/sub-08 (meaning, the ATROPOS segmentation should not look like above - https://github.com/nipreps/smriprep/issues/125#issuecomment-626011343), and then address ds051/sub-06 on a different PR, including the idea of estimating the overlap of the different posteriors from ATROPOS and the WM prior from the template

oesteban commented 4 years ago

Sorry for the multiple posting - the reportlet from ds051/sub-06 just came out:

Screen Shot 2020-09-17 at 7 05 27 PM

It indeed seems fixed (although the ATROPOS refinement did not). See before above - https://github.com/nipreps/smriprep/issues/125#issuecomment-543289418

Please let me know if you agree with the proposed plan:

1 - finish this PR (address comments, test on more data, etc.) 2 - iterate to improve the ATROPOS refinement.

mgxd commented 4 years ago

a definite improvement, though not the best brain mask. plan sounds good to me 👍