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: integrate left-right flip detection #3313

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

celprov
Copy link
Contributor

@celprov celprov commented Jun 20, 2024

The left-right flip detection runs the alignment algorithm after flipping the BOLD image and compares the costs of aligning the T1w with the flipped BOLD and with the original BOLD. In the summary of the visual report, we emit a warning if the cost related to the flipped image is lower than the cost related to the original image. We also report the two costs and provide the visualization of the flipped alignment.

Strongly inspired by the AFNI implementation of the left-right detection tool (Glen et al. 2020)

celprov and others added 4 commits May 16, 2024 21:13
enh: rerun registration using this flipped functional image
…on with original and flipped functional image to detect left-right flip

enh: propagate the flip_info through the workflow so it can be integrated into the visual report
…ithin visual report

enh: report costs in registration with original and flipped functional image
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 61.90476% with 8 lines in your changes missing coverage. Please review.

Project coverage is 56.86%. Comparing base (ff1b199) to head (7a976df).

Files Patch % Lines
fmriprep/workflows/bold/registration.py 37.50% 5 Missing ⚠️
fmriprep/interfaces/reports.py 76.92% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3313       +/-   ##
===========================================
- Coverage   73.79%   56.86%   -16.94%     
===========================================
  Files          56       56               
  Lines        4263     4284       +21     
===========================================
- Hits         3146     2436      -710     
- Misses       1117     1848      +731     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

celprov added 2 commits June 20, 2024 07:43
…of the workflow initialisation fails complaining this connection does not exist. The output is the dictionary with the same keys as the flip_info for the bbr_wf except the value associated with the keys are empty.
enh: point to new branch of niworkflows that implement AxisFlip
@celprov celprov force-pushed the enh/left-right-flip-detection branch from 94ac539 to 4232b3a Compare June 20, 2024 06:26
celprov added 3 commits June 22, 2024 08:08
…to avoid duplicating this part of the code when additionally outputting the transform betweeen the flipped bold and the t1w.
…T1w image when I was actually flipping the BOLD, any previous commit that states the T1w was flipped is a mistake.

enh: plot the alignment between the flipped BOLD and T1w as a complement to left-right flip check through cost comparison. The plot is hidden in a drop down section.
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