brainrender icon indicating copy to clipboard operation
brainrender copied to clipboard

kim_mouse atlas plots only one hemisphere

Open alowet opened this issue 2 years ago • 6 comments

Using kim_mouse_50um, for which scaling issues have been solved (see https://github.com/brainglobe/bg-atlasapi/issues/94), 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 avatar May 24 '22 20:05 alowet

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

adamltyson avatar May 25 '22 13:05 adamltyson

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?

FedeClaudi avatar May 25 '22 14:05 FedeClaudi

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

alowet avatar May 25 '22 14:05 alowet

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 avatar May 25 '22 15:05 FedeClaudi

@alowet is this still an issue?

FedeClaudi avatar Jul 04 '22 08:07 FedeClaudi

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

alowet avatar Jul 04 '22 12:07 alowet

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

alowet avatar Oct 01 '22 18:10 alowet

No sorry, I can't figure it out

FedeClaudi avatar Oct 01 '22 21:10 FedeClaudi

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

IgorTatarnikov avatar Nov 01 '23 17:11 IgorTatarnikov

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

alessandrofelder avatar Nov 28 '23 16:11 alessandrofelder