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

INU correction gone wrong #125

Closed
oesteban opened this issue Oct 17, 2019 · 8 comments
Closed

INU correction gone wrong #125

oesteban opened this issue Oct 17, 2019 · 8 comments
Assignees
Labels
bug Something isn't working effort:high Estimated high effort task impact:low Estimated low impact task
Milestone

Comments

@oesteban
Copy link
Member

oesteban commented Oct 17, 2019

ds005-sub-08-biasfield

fmriprep-1.5.1rc1 - ds005/sub-08

@oesteban oesteban added bug Something isn't working effort:high Estimated high effort task impact:low Estimated low impact task labels Oct 17, 2019
@oesteban oesteban changed the title INU correction gone wrong (ds005/sub-08) INU correction gone wrong Oct 17, 2019
@oesteban
Copy link
Member Author

ds051/sub-06

ds051-sub-06-biasfield

@oesteban
Copy link
Member Author

Possibly duplicate of #127

@oesteban
Copy link
Member Author

oesteban commented May 8, 2020

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 oesteban added this to the 0.7.0 milestone May 28, 2020
@oesteban oesteban self-assigned this Jun 11, 2020
@oesteban
Copy link
Member Author

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

oesteban added a commit to oesteban/niworkflows that referenced this issue Sep 16, 2020
This commit:

  - [x] Updates the nodes with pure python interfaces based on nibabel,
    minimizing the need for the new ``copy_header`` of ANTs' nipype
    interfaces.
  - [x] Reorganizes the workflow so that the Atropos refinement is
    completely self contained.

These are the first two steps to address nipreps/smriprep#125.
oesteban added a commit to oesteban/niworkflows that referenced this issue Sep 16, 2020
This commit:

  - [x] Updates the nodes with pure python interfaces based on nibabel,
    minimizing the need for the new ``copy_header`` of ANTs' nipype
    interfaces.
  - [x] Reorganizes the workflow so that the Atropos refinement is
    completely self contained.

These are the first two steps to address nipreps/smriprep#125.
oesteban added a commit to oesteban/niworkflows that referenced this issue Sep 16, 2020
This commit:

  - [x] Updates the nodes with pure python interfaces based on nibabel,
    minimizing the need for the new ``copy_header`` of ANTs' nipype
    interfaces.
  - [x] Reorganizes the workflow so that the Atropos refinement is
    completely self contained.

These are the first two steps to address nipreps/smriprep#125.
oesteban added a commit to oesteban/niworkflows that referenced this issue Sep 16, 2020
This commit:

  - [x] Updates the nodes with pure python interfaces based on nibabel,
    minimizing the need for the new ``copy_header`` of ANTs' nipype
    interfaces.
  - [x] Reorganizes the workflow so that the Atropos refinement is
    completely self contained.

These are the first two steps to address nipreps/smriprep#125.
oesteban added a commit to oesteban/niworkflows that referenced this issue Sep 16, 2020
This commit introduces two changes:

  - [x] If a WM prior is found within the template's structure, then it
    is mapped on to the individual's brain and fed as ``weight_image``
    in the N4 correction.
  - [x] Adds regularization of the WM posterior estimated with ATROPOS,
    by multiplying with the WM prior mapped from the template.
    In the future, an easy check could be implemented here to dismiss
    the ATROPOS refinement if the prior and the posterior do not overlap
    sufficiently (i.e., the WM was not correctly labeled or segmented)

Resolves: nipreps/smriprep#125 (at least for ds005/sub-08).
oesteban added a commit that referenced this issue Sep 16, 2020
@oesteban
Copy link
Member Author

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
Copy link
Member Author

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 - #125 (comment)), 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
Copy link
Member Author

oesteban commented Sep 17, 2020

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 - #125 (comment)

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
Copy link
Collaborator

mgxd commented Sep 17, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working effort:high Estimated high effort task impact:low Estimated low impact task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants