You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I want to create screenshots using consistent camera settings. I have a number of sets of points I would like to plot onto the mouse Nucleus Accumbens, and to make the images comparable would like to use the same camera settings to take a screenshot for each point set.
I use Shift-C to display the camera settings after adjusting to the angle that I would like to use. I then close the window, set the camera, and render the scene again. However, the brain is not displayed in the angle and orientation that I previously set up, and when checking the coordinates again using Shift-C, it returns coordinates that do not correspond to those that I set up, specifically pos, focal_point, viewup and clipping_range.
To Reproduce
`import brainrender as br
import vedo, os
vedo.settings.default_backend= 'vtk'
Expected behaviour
The camera settings in the camera dictionary should be applied when rendering the scene.
Screenshots
Expected plot:
Plot received:
Computer used:
OS: macOS, M3Pro
Version 14.2.1
Hardware specs 18GB RAM
Additional context
I have set the following settings at the beginning of my script:
br.settings.SHOW_AXES = False
br.settings.ROOT_ALPHA = 0
The behavior persists even when not setting these variables. I also tried plotting a single hemisphere, and the behavior persists. It also persists whether I add my points or not, so for simplicity I shared the code without adding the points / points density. It also happens whether or not I use a notebook.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this @heike-s. It should now be fixed. You can install from github with pip install git+https://github.com/brainglobe/brainrender, but a new version of brainrender should be released with this fix by the end of the week.
Describe the bug
I want to create screenshots using consistent camera settings. I have a number of sets of points I would like to plot onto the mouse Nucleus Accumbens, and to make the images comparable would like to use the same camera settings to take a screenshot for each point set.
I use Shift-C to display the camera settings after adjusting to the angle that I would like to use. I then close the window, set the camera, and render the scene again. However, the brain is not displayed in the angle and orientation that I previously set up, and when checking the coordinates again using Shift-C, it returns coordinates that do not correspond to those that I set up, specifically pos, focal_point, viewup and clipping_range.
To Reproduce
`import brainrender as br
import vedo, os
vedo.settings.default_backend= 'vtk'
br.settings.SHOW_AXES = False
br.settings.ROOT_ALPHA = 0
popup_scene = br.Scene(atlas_name='allen_mouse_50um', title='Cluster 0')
front_camera = dict(
pos=(-25916.9, 6755.20, 8425.36),
focal_point=(6754.35, 5532.25, -5444.33),
viewup=(4.47401e-3, -0.995148, 0.0982831),
roll=174.709,
distance=35514.4,
clipping_range=(18770.4, 56677.3),
)
popup_scene.add_brain_region('ACB', alpha = 0.1, color = 'grey')
popup_scene.render(camera = front_camera, zoom = 5) `
Returned coordinates from Shift-C:
###################################################
Template python code to position this camera:
cam = dict(
position=(-26114.1, 5270.48, 8090.03),
focal_point=(6587.84, 3849.09, -5688.16),
viewup=(-8.83828e-4, -0.994932, 0.100542),
roll=174.703,
distance=35514.4,
clipping_range=(18744.5, 56710.0),
)
show(mymeshes, camera=cam)
###################################################
Expected behaviour
The camera settings in the camera dictionary should be applied when rendering the scene.
Screenshots
Expected plot:
Plot received:
Computer used:
Additional context
I have set the following settings at the beginning of my script:
br.settings.SHOW_AXES = False
br.settings.ROOT_ALPHA = 0
The behavior persists even when not setting these variables. I also tried plotting a single hemisphere, and the behavior persists. It also persists whether I add my points or not, so for simplicity I shared the code without adding the points / points density. It also happens whether or not I use a notebook.
The text was updated successfully, but these errors were encountered: