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: Add Multimodal Surface Matching #358

Merged
merged 25 commits into from
Sep 5, 2023
Merged

ENH: Add Multimodal Surface Matching #358

merged 25 commits into from
Sep 5, 2023

Conversation

mgxd
Copy link
Collaborator

@mgxd mgxd commented Aug 17, 2023

Closes #353.

@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Patch coverage: 65.97% and project coverage change: -20.37% ⚠️

Comparison is base (5e60fd8) 54.03% compared to head (536cfb4) 33.67%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #358       +/-   ##
===========================================
- Coverage   54.03%   33.67%   -20.37%     
===========================================
  Files          22       21        -1     
  Lines        1488     1574       +86     
  Branches      209      212        +3     
===========================================
- Hits          804      530      -274     
- Misses        628     1029      +401     
+ Partials       56       15       -41     
Flag Coverage Δ
ds005 ?
ds054 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
smriprep/cli/run.py 2.80% <0.00%> (-71.38%) ⬇️
smriprep/workflows/anatomical.py 16.56% <0.00%> (-29.00%) ⬇️
smriprep/workflows/base.py 30.00% <ø> (-41.67%) ⬇️
smriprep/workflows/surfaces.py 11.57% <11.53%> (-0.33%) ⬇️
smriprep/interfaces/msm.py 76.47% <76.47%> (ø)
smriprep/__about__.py 100.00% <100.00%> (ø)
smriprep/interfaces/workbench.py 100.00% <100.00%> (ø)

... and 8 files with indirect coverage changes

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

@effigies
Copy link
Member

I'm able to follow this so far. Is there more to go, or was the FNIRT stuff a red herring?

@mgxd
Copy link
Collaborator Author

mgxd commented Aug 25, 2023

No, it looks like those are still to come (see below), though I'm not sure if it should be included here or in a separate PR.

Steps
 # 4) Apply T1w-to-MNI affine and warpfield xfms (XCP-D)??
    # wb_command -surface-apply-affine \
    # /wkdir/xcpd_wf/single_subject_${SUB}_wf/postprocess_surfaces_wf/warp_surfaces_to_template_wf/lh_apply_transforms_wf/resample_to_fsLR32k/mapflow/_resample_to_fsLR32k0/resampled_sub-${SUB}_ses-${SES}_hemi-L_pial.surf.gii \
    # /wkdir/xcpd_wf/single_subject_${SUB}_wf/postprocess_surfaces_wf/warp_surfaces_to_template_wf/update_xfm_wf/convert_xfm2world/00_T1w_to_MNI152NLin6Asym_AffineTransform_MatrixOffsetTransformBase_world.nii.gz \
    # MNIAffine_resampled_sub-{SUB}_ses-${SES}_hemi-L_pial.surf.gii
    #
    # wb_command -surface-apply-warpfield \
    # /wkdir/xcpd_wf/single_subject_${SUB}_wf/postprocess_surfaces_wf/warp_surfaces_to_template_wf/lh_apply_transforms_wf/apply_affine_to_fsLR32k/mapflow/_apply_affine_to_fsLR32k0/MNIAffine_resampled_sub-${SUB}_ses-${SES}_hemi-L_pial.surf.gii \
    # /wkdir/xcpd_wf/single_subject_${SUB}_wf/postprocess_surfaces_wf/warp_surfaces_to_template_wf/update_xfm_wf/remerge_inv_warpfield/concat_4d.nii.gz \
    # MNIwarped_MNIAffine_resampled_sub-${SUB}_ses-${SES}_hemi-L_pial.surf.gii \
    # -fnirt /wkdir/xcpd_wf/single_subject_${SUB}_wf/postprocess_surfaces_wf/warp_surfaces_to_template_wf/update_xfm_wf/remerge_warpfield/concat_4d.nii.gz
    ## /wkdir is the XCP-D (0.4.x) work directory

    ## after doing both pial and white, use wb_command -surface-average to make midthickness surfs
    ## (I then copied those midthickness surfs to /hackathon_MSM/32k_MNIaligned_msm_surfs/MNIwarped_MNIAffine_resampled_sub-${SUB}_ses-${SES}_hemi-L_midthickness.surf.gii)


    # 5) Resample morphometrics from native to 32k:
    # wb_command -metric-resample \
    # /anat/sub-${SUB}_ses-${SES}_hemi-L_curv.shape.gii /hackathon_MSM/L.sphere.reg.surf.gii  \
    # ~/.cache/templateflow/tpl-fsLR/tpl-fsLR_hemi-L_den-32k_sphere.surf.gii \
    # ADAP_BARY_AREA \
    # space-fsLR_hemi-L_den-91k_curv.shape.gii \
    # -area-surfs \
    # /anat/sub-${SUB}_ses-${SES}_hemi-L_midthickness.surf.gii \
    # /hackathon_MSM/32k_MNIaligned_msm_surfs/MNIwarped_MNIAffine_resampled_sub-${SUB}_ses-${SES}_hemi-L_midthickness.surf.gii

    # 6) Resample BOLD timeseries
    # wb_command -metric-resample \
    # /wd/fmriprep_23_1_wf/single_subject_${SUB}_wf/func_preproc_ses_${SES}_task_${TASK}_run_${RUN}_echo_1_wf/bold_fsLR_resampling_wf/_hemi_L/metric_dilate/lh.midthickness_converted_mapped.func.func.gii \
    # /hackathon_MSM/L.sphere.reg.surf.gii \
    # ~/.cache/templateflow/tpl-fsLR/tpl-fsLR_hemi-L_den-32k_sphere.surf.gii \
    # ADAP_BARY_AREA \
    # /hackathon_MSM/sub-${SUB}_ses-${SES}_task-${TASK}_run-${RUN}_space-fsLR_hemi-L_den-32k_bold.func.gii \
    # -area-surfs /wd/fmriprep_23_1_wf/single_subject_${SUB}_wf/anat_preproc_wf/surface_recon_wf/gifti_surface_wf/fix_surfs/mapflow/_fix_surfs*/lh.midthickness_converted.gii \
    # /hackathon_MSM/32k_MNIaligned_msm_surfs/MNIwarped_MNIAffine_resampled_sub-${SUB}_ses-${SES}_hemi-L_midthickness.surf.gii

@mgxd mgxd marked this pull request as ready for review August 31, 2023 17:45
@mgxd mgxd requested review from effigies and oesteban August 31, 2023 17:48
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 LGTM

smriprep/__about__.py Outdated Show resolved Hide resolved
smriprep/cli/run.py Outdated Show resolved Hide resolved
smriprep/interfaces/msm.py Show resolved Hide resolved
smriprep/interfaces/workbench.py Show resolved Hide resolved
smriprep/interfaces/workbench.py Show resolved Hide resolved
smriprep/interfaces/workbench.py Show resolved Hide resolved
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.

This LGTM. One small comment.

smriprep/workflows/anatomical.py Outdated Show resolved Hide resolved
@effigies effigies merged commit 37ad1c6 into master Sep 5, 2023
11 of 12 checks passed
@effigies effigies deleted the enh/msm branch September 5, 2023 18:25
@juansanchezpena juansanchezpena mentioned this pull request Sep 6, 2023
@effigies
Copy link
Member

effigies commented Sep 6, 2023

@mgxd See fe8f7ca for the merge into next. Please let me know if you see any issues.

effigies added a commit that referenced this pull request Sep 7, 2023
Follow-up to #358 in smriprep-next. This continues to save the initial `space-fsLR_desc-reg_sphere.surf.gii` and adds `space-fsLR_desc-msm_sphere.surf.gii`.
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.

Add MSMSulc
2 participants