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

kim_mouse atlas plots only one hemisphere #210

Closed
alowet opened this issue May 24, 2022 · 10 comments
Closed

kim_mouse atlas plots only one hemisphere #210

alowet opened this issue May 24, 2022 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@alowet
Copy link

alowet commented May 24, 2022

Using kim_mouse_50um, for which scaling issues have been solved (see brainglobe/brainglobe-atlasapi#247), individual brain regions plot in only one hemisphere or the other. Consider this snippet:

from brainrender import Scene

atlas = 'kim_mouse_50um'

# Create a brainrender scene
scene = Scene(screenshots_folder='.', inset=False, atlas_name=atlas)

# add actors
acb = scene.add_brain_region('Acb', alpha=0.3, color='blue', hemisphere='both')

# render
scene.render(interactive=False, zoom=1)
scene.screenshot(name='example_{}'.format(atlas))

This produces the following output:
image

As you can see, the nucleus accumbens gets plotted only in the left hemisphere. This is contrary to the behavior of allen_mouse_25um and the documented behavior of the hemisphere parameter. It doesn't appear to be a problem with kim_mouse_50um per se, as the structure_from_coords function correctly returns the same region regardless of whether the point is in the left or the right hemisphere, and visualizing the meshes directly shows that they exist for both hemispheres. I previously reported this bug on the bgatlas-api Github, but didn't have success there. Any ideas?

@alowet alowet added the bug Something isn't working label May 24, 2022
@adamltyson
Copy link
Member

@FedeClaudi do you have an idea whether this is an issue with brainrender or the atlas (or some interaction between the two)?

@FedeClaudi
Copy link
Collaborator

hi,

I can't imagine how it could be a brainrender issue. Brainrender might mess something up when one asks for just one hemisphere, but when rendering both hemisphere it just fetches the mesh file from the brainglobe atlas.

If you look at the mesh files independently (either with vedo, napari or another software) do they look fine?

@alowet
Copy link
Author

alowet commented May 25, 2022

Yes, here's what they look like (from the bg-atlasapi issue thread):
image

@FedeClaudi
Copy link
Collaborator

I see.

Indeed it seems to be the case that something's happening in BR. It's the same for the 25um and 50um versions of the atlas. I can't quite figure out what could be wrong here though, but I'll try look into it when I get a moment.

@FedeClaudi
Copy link
Collaborator

@alowet is this still an issue?

@alowet
Copy link
Author

alowet commented Jul 4, 2022

Yes, as far as I can tell this hasn't been fixed.

@alowet
Copy link
Author

alowet commented Oct 1, 2022

Hey, any chance you've been able to address this yet?

@FedeClaudi
Copy link
Collaborator

No sorry, I can't figure it out

@IgorTatarnikov
Copy link
Member

I think this may be an underlying issue with the atlas meshes themselves, see brainglobe/brainglobe-atlasapi#236

@alessandrofelder
Copy link
Member

We're confident this is a duplicate of brainglobe/brainglobe-atlasapi#236, which I've moved to the things we hope to address (in some way) soon.

@github-project-automation github-project-automation bot moved this from Planned to Done in Core development Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

5 participants