Skip to content

Resample surfaces to any space/density using Connectome Workbench. #473

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

feilong
Copy link

@feilong feilong commented May 1, 2025

Adding init_resample_surfaces_wb_wf, which is similar to init_resample_surfaces_wf but not limited to fsLR spaces.
It can resample surfaces to the specified space and density if the corresponding files exist in TemplateFlow.

For non-fsLR templates, it needs the space-fsLR files of the template, which connects the registered sphere (fsLR space) with the template (template space).
For example, with tpl-onavg_space-fsLR_hemi-L_den-10k_sphere.surf.gii it can resample the subject's surfaces to space-onavg_hemi-L_den-10k.

The code is mostly copied and modified from init_resample_surfaces_wf.

@feilong
Copy link
Author

feilong commented May 1, 2025

I believe the failed docs check was because TemplateFlow S3 hasn't been updated.

@effigies
Copy link
Member

@feilong I think we can do this just by updating the parameterization of the existing workflow. I pushed my suggestion directly, but feel free to force-push back to yours.

Here are the diffs:

@mgxd This needs your review, since you use this function in nibabies.

@feilong
Copy link
Author

feilong commented May 22, 2025

@effigies Your suggestions make a lot of sense to me. The only reason I kept init_resample_surfaces_wf in my version was to avoid breaking workflows that depend on it.

@feilong feilong requested a review from mgxd June 10, 2025 16:54
@feilong feilong requested a review from effigies July 9, 2025 19:54
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.

Okay, I think this is in good shape. @mgxd would you mind having another look?

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.

LGTM, happy with these changes!

@effigies
Copy link
Member

@feilong The docs are failing because tf.get(template='onavg', space='fsLR') == []. Do the sphere.regs need to be uploaded still?

@feilong
Copy link
Author

feilong commented Jul 29, 2025

@effigies I believe this is due to a TemplateFlow issue: templateflow/tpl-onavg#1
Somehow AWS S3 wasn't updated properly when the template was updated.

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.

3 participants