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

ENH: Use ANTs DenoiseImage before conforming anatomical images #337

Merged
merged 1 commit into from
May 12, 2023

Conversation

effigies
Copy link
Member

Closes #22.

@effigies effigies requested a review from mgxd May 11, 2023 18:56
@effigies effigies changed the title ENH: Denoise anatomical images before further processing ENH: Use ANTs DenoiseImage before conforming anatomical images May 11, 2023
Copy link
Collaborator

@mgxd mgxd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think overall this is a nice addition.

I don't suspect it will add too much (in nibabies it takes about ~4mins) but have you tried to see how it affects the runtime of any test data?

One conceptual question - will this have any effect on confounds?

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 50.00% and project coverage change: -0.03 ⚠️

Comparison is base (b6c4365) 28.49% compared to head (a8c70ae) 28.47%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #337      +/-   ##
==========================================
- Coverage   28.49%   28.47%   -0.03%     
==========================================
  Files          19       19              
  Lines        1351     1352       +1     
  Branches      196      196              
==========================================
  Hits          385      385              
- Misses        952      953       +1     
  Partials       14       14              
Impacted Files Coverage Δ
smriprep/workflows/anatomical.py 16.66% <50.00%> (-0.10%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@effigies
Copy link
Member Author

The impact on confounds would be in the definition of white matter/CSF ROIs, if those change. In subjects where the segmentations are kind of salt-and-pepper, we might end up with larger ROIs for those and CompCor.

I did run on some test data and it took ~40sec on 16 cores. So should be <3min on 4 cores.

@effigies effigies merged commit fe17d3a into nipreps:master May 12, 2023
@effigies effigies deleted the enh/denoise_image branch May 12, 2023 20:31
@effigies effigies added this to the 0.12.0 milestone Jun 2, 2023
@diramigo
Copy link

diramigo commented Sep 1, 2023

So the output of ANTs DenoiseImage is used for recon-all, right? does this mean that using an existing output of recon-all for smriprep could lead to a very different result? is this version of smriprep already in fmriprep?

@effigies
Copy link
Member Author

effigies commented Sep 1, 2023

This is in 23.1.x. fMRIPrep has always done FreeSurfer a little differently. We have passed INU-corrected T1w images and BOLD masks pre-computed by antsBrainExtraction.sh (or, now, a rewrite of that script as a nipype workflow). And for quite some time we've been pre-merging multiple T1w images, rather than leaving that to FreeSurfer.

If you would like to use vanilla FreeSurfer, pre-run it and pass it to fMRIPrep with --fs-subjects-dir.

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.

Noisy T1w leads to poor tissue segmentation
4 participants