Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"VERBOSE",
"WHOLE_SCREEN",
"WINDOW_POS",
"INTERACTIVE_MSG",
"CAMERA",
"DEFAULT_SCREENSHOT_NAME",
"DEFAULT_SCREENSHOT_TYPE",
"DEFAULT_SCREENSHOT_SCALE",
"SCREENSHOT_TRANSPARENT_BACKGROUND",
]
# -------------------------- Set vedo shaders -------------------------- #
from vedo import settings
settings.useDepthPeeling = (
True # necessary for rendering of semitransparent actors
)
settings.useFXAA = True # necessary for rendering of semitransparent actors
# ------------------------- reset default parameters file ------------------------- #
params_file = Path(os.path.expanduser("~")) / ".brainrender" / "config.yaml"
defaults = brainrender.default_variables.__dict__
comment = (
"# Rendering options. An explanation for each parameter can be found "
+ "in the documentation or in brainrender.default_variables.py\n"
)
def reset_defaults():
# Get all variables from defaults
def __init__(self, *args, **kwargs):
self.default_neuron_color = kwargs.pop(
"default_neuron_color", "darksalmon"
)
show_axes = kwargs.pop("show_axes", True)
axes_kwargs = kwargs.pop("axes_kwargs", 1)
settings.DEFAULT_NEURITE_RADIUS = ("neurite_radius", 18)
if axes_kwargs == 1:
settings.useDepthPeeling = (
False # necessary to make the axes render properly
)
settings.useFXAA = False
# Initialise scene class
Scene.__init__(
self, add_root=False, display_inset=False, *args, **kwargs
)
if show_axes:
brainrender.SHOW_AXES = True
if axes_kwargs == 1:
self.plotter.axes = self._default_axes_params
else:
self.plotter.axes = axes_kwargs
def __init__(self, *args, **kwargs):
self.default_neuron_color = kwargs.pop(
"default_neuron_color", "darksalmon"
)
show_axes = kwargs.pop("show_axes", True)
axes_kwargs = kwargs.pop("axes_kwargs", 1)
settings.DEFAULT_NEURITE_RADIUS = ("neurite_radius", 18)
if axes_kwargs == 1:
settings.useDepthPeeling = (
False # necessary to make the axes render properly
)
settings.useFXAA = False
# Initialise scene class
Scene.__init__(
self, add_root=False, display_inset=False, *args, **kwargs
)
if show_axes:
brainrender.SHOW_AXES = True
if axes_kwargs == 1:
self.plotter.axes = self._default_axes_params