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

Sulcal depth as background on nilearn.plotting.plot_surf (by using neuromaps.plotting.plot_surf_template) #195

Open
1 task done
enicolaisen opened this issue Feb 19, 2025 · 2 comments

Comments

@enicolaisen
Copy link

Description of issue

Hi!

I am having an issue when plotting the sulcal depth as background in both hemispheres. I am using the argument bg_map=sulc_LR with the correct dimensions ((20484,) for the case of two hemispheres) as confirmed in issue #5167 by the nilearn team. However, when I introduce sulcal depth data for both hemispheres I get an error regarding dimensionality, and when I introduce sulcal depth for only one hemisphere both hemispheres are plotted though incorrectly (for instance, L hemisphere is plotted in both hemispheres). I explained the issue with more detail on the linked issue, so I believe it is not helpful to write it again here, I hope that is fine.

It seems like neuromaps.plotting.plot_surf_template is not passing the bg_map argument correctly to nilearn.plotting.plot_surf? Or could you help me find out what I am doing wrong?

Thanks a lot for your help!

Best regards,
Eliana

Code of Conduct

  • I agree to follow the neuromaps Code of Conduct
@Remi-Gau
Copy link

not sure of the internals of plot_surf_template but it seems that using some of the SurfaceImage support that was added in nilearn 0.11 could help with this

@Remi-Gau
Copy link

Remi-Gau commented Feb 19, 2025

@enicolaisen
had a look at the doc string from plot_surf_template and it seems it is not intended to plot both hemispheres (so far) as far as I can tell
so maybe what you intend to do is not (yet) possible

EDIT: I misread the doc string: you passed your data as a tuple and hence both hemisphere should be plotted

it seems the function does not bg_map properly in that case though

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

No branches or pull requests

2 participants