Skip to content

Conversation

@mgxd
Copy link
Collaborator

@mgxd mgxd commented Jan 18, 2024

This PR adds a new parameter use_t2w to init_bold_reg_wf, which enables/disables using a T2w reference as an intermediate for bbregister.

As long as a T2w is found in the dataset, this option is enabled, as smriprep has already preprocessed and brought the T2w to T1w space.

This PR only changes the behavior of the bbreg_wf fork, the FSL workflow remains using the T1w reference.

cc @madisoth as this was inspired based on some comparison work from him

Comment on lines 84 to 104
class MRICoregInputSpec(fs.registration.MRICoregInputSpec):
reference_file = File(
argstr="--ref %s",
desc="reference (target) file",
copyfile=False,
)
subject_id = traits.Str(
argstr="--s %s",
position=1,
requires=["subjects_dir"],
desc="freesurfer subject ID (implies ``reference_mask == "
"aparc+aseg.mgz`` unless otherwise specified)",
)


class MRICoreg(fs.MRICoreg):
"""
Patched that allows setting both a reference file and the subjects dir.
"""

input_spec = MRICoregInputSpec
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this patch is needed to include the reference file + subject dir/id information in the outputted LTA

@codecov
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (9568ccb) 72.03% compared to head (08dfd68) 72.12%.
Report is 12 commits behind head on master.

Files Patch % Lines
fmriprep/cli/parser.py 50.00% 6 Missing ⚠️
fmriprep/workflows/bold/registration.py 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3208      +/-   ##
==========================================
+ Coverage   72.03%   72.12%   +0.09%     
==========================================
  Files          55       55              
  Lines        4101     4144      +43     
==========================================
+ Hits         2954     2989      +35     
- Misses       1147     1155       +8     

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

@mgxd mgxd marked this pull request as ready for review January 18, 2024 18:16
Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

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

Overall this looks good!

mgxd and others added 2 commits January 25, 2024 08:03
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

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

LGTM. Small comments at this point.

Co-authored-by: Chris Markiewicz <effigies@gmail.com>
@mgxd mgxd merged commit 7032782 into nipreps:master Jan 25, 2024
@mgxd mgxd deleted the enh/t2-bbreg branch January 25, 2024 19:19
tsalo added a commit to tsalo/aslprep that referenced this pull request Jan 25, 2024
effigies added a commit that referenced this pull request Jun 17, 2024
24.0.0 (June 17, 2024)

New feature release in the 24.0.x series.

This release is an incremental improvement on 23.2.x, with some
fixes for bugs discovered in the updated workflow.

New features include separation of HTML reports by session for subjects
with many BOLD runs, a new ``--fs-no-resume`` option to improve interoperability
with less typical FreeSurfer directories, such as those generated by longitudinal
FreeSurfer or FastSurfer, and adoption of DatasetLinks and BIDS-URIs, to follow
the recommendations of recent versions of BIDS.

With thanks to Dimitri Papadopoulos, Basile Pinsard, Celine Provins, Taylor Salo
and Wang Hao-Ting for their contributions!

* FIX: Add "double" type to allowed DisplacementFieldTransform (#3287)
* FIX: Require recent templateflow, select correct aparc dseg.tsv (#3256)
* FIX: Ensure proper templates are retrieved with sloppy (#3251)
* FIX: Delete summary from functional report when separated by sessions (#3223)
* FIX: Support lists in bids filter file containing ``null`` or ``*`` (#3215)
* FIX: Re-enable anat fasttrack for dataset without t1w (#3202)
* ENH: Use BIDSURI in init_ds_boldmask_wf (#3297)
* ENH: Add templateflow to DatasetLinks (#3267)
* ENH: Track proximal sources of functional GIFTIs (#3263)
* ENH: Support named derivative paths (#3264)
* ENH: Track Sources for standard-space outputs (#3262)
* ENH: Add --fs-no-resume option to reuse existing FreeSurfer outputs without resuming (#3142)
* ENH: Use BIDS URIs to track Sources in sidecars (#3255)
* ENH: Ignore unselected subjects in BIDSLayoutIndexer (#3236)
* ENH: Add metadata for motion parameters (#3245)
* ENH: Separate anatomical and functional reports per session for densely sampled dataset (#3191)
* ENH: Leverage T2w if available for BOLD -> anat coregistration (#3208)
* RF: Fix ITK warp conversion to nitransforms format (#3300)
* RF: Load report assembler from nireports (#3177)
* DOC: Clarify ``--dvars-spike-threshold`` uses standardized DVARS (#3205)
* TST: Update test to reflect new report generation behavior (#3210)
* STY: Manual conversions to f-strings (#3241)
* STY: Apply ruff/pyupgrade rule UP031 (#3280)
* STY: Lint and style check full repository (#3221)
* STY: Adopt ruff for linting and formatting (#3206)
* MNT: Pin libitk 5.3 and note dependencies (#3298)
* MNT: Upgrade ruff pre-commit, add fixing checks (#3283)
* MNT: Complete transition from flake8/black to ruff (#3279)
* MNT: Apply Repo-Review suggestions (#3194)
* MNT: Verbatim copy of Apache license 2.0 (#3259)
* MNT: Bump cryptography from 41.0.7 to 42.0.4 (#3234)
* MNT: Drop copyright year, unused dunder fields (#3247)
* MNT: Update environment pins (#3226)
* MNT: Bump codecov/codecov-action from 3 to 4 (#3219)
* DOCKER: Restore mincinfo binary (#3249)
* CI: Move to new circle machine tags (#3248)
* CI: Avoid ruff warning (#3244)
* CI: Pass ruff tests (#3243)
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.

2 participants