Render#
- class brainrender.render.Render(plotter=None)[source]#
Bases:
objectMethods
close()Close the vedo Plotter window.
export(savepath, **kwargs)Export the scene to a
.htmlfile for online rendering.keypress(key)Handle key presses during interactive rendering.
render([interactive, camera, zoom, resetcam])Render the scene.
screenshot([name, scale])Take a screenshot of the current view and save it to file.
Attributes
axes_indicesaxes_lookupaxes_namesis_renderedplotter- export(savepath, **kwargs)[source]#
Export the scene to a
.htmlfile for online rendering.- Parameters:
savepath (
str|Path) – Path to the output.htmlfile.**kwargs (
Any) – Additional arguments forwarded torender.
- Returns:
Absolute path of the saved file.
- Return type:
str
- Raises:
ValueError – If savepath does not have a
.htmlsuffix.
- keypress(key)[source]#
Handle key presses during interactive rendering.
s: take a screenshotq/Esc: close the windowc: print current camera parameters
- Parameters:
key (
str) – Key identifier string from vedo.- Return type:
None
- render(interactive=None, camera=None, zoom=None, resetcam=False, **kwargs)[source]#
Render the scene.
- Parameters:
interactive (
bool|None) – If None, falls back tosettings.INTERACTIVE. When True, execution pauses so the user can interact with the scene.camera (
str|dict|None) – Camera name or parameter dict. Falls back tosettings.DEFAULT_CAMERAif None.zoom (
float|None) – Camera zoom level. Falls back to the atlas default if None.resetcam (
bool) – Reset the camera between renders.**kwargs (
Any) – Additional arguments forwarded toself.plotter.show.
- Return type:
None
- screenshot(name=None, scale=None, **kwargs)[source]#
Take a screenshot of the current view and save it to file.
Screenshots are saved in
screenshots_folder(see Scene).- Parameters:
name (
str|None) – Output filename. Defaults to a timestamped.pngif None. Unsupported extensions are silently replaced with.png.scale (
float|None) – Resolution multiplier. Values above 1 increase resolution. Falls back tosettings.SCREENSHOT_SCALEif None.**kwargs (
Any) – Additional arguments forwarded torender.
- Returns:
Absolute path of the saved screenshot.
- Return type:
str