ContextLab / ContextLab/supereeg

remap function

Open
#30 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
38
Forks
19
PR merge metrics
No merged PRs in 30d

Description

copying from another issue #27 -

And finally, to help with the se.save(bo2, 'bo3.bo', template='template.nii') function, it would be useful to have a helper function as part of the brain objects to do something like:
bo3 = bo2.remap('template.nii') <-- return a new brain object with locations specified in template.nii
bo4 = bo2.remap('bo2.bo') <-- return a new brain object with locations specified in bo2.bo

Also, for all of the above, it'd be useful to support both the "filename" syntax as described above, and also an alternative syntax where you just pass the (brain object or nifti) objects themselves. In other words if template is a nifti object (stored on disk as template.nii),

bo3 = bo2.remap(template) and bo3 = bo2.remap('template.nii') should do the same thing. And similarly, if template is a brain object rather than a nifti object, the code should also work.

^ from @jeremymanning

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.