neuralib.atlas.brainrender.core.BrainRenderCLI

class neuralib.atlas.brainrender.core.BrainRenderCLI[source]

Bases: AbstractParser

Reconstruct a 3D brain view used brainrender module

__init__()

Methods

__init__()

export(reconstructor[, output, areas, alpha])

Export reconstruction as html

get_atlas_brain_globe([check_latest])

main([args, parse_only, system_exit])

parsing the commandline input args and call run().

new_parser(**kwargs)

create an ArgumentParser.

post_parsing()

render()

brainrender interactive

render_output()

io handling.

run()

called after main().

video_maker(output_file)

generate video

Attributes

DEFAULT_REGION_COLORS

DESCRIPTION

parser description.

EPILOG

parser epilog.

GROUP_OPTIONAL

GROUP_OUTPUT

GROUP_REGION

GROUP_SETTINGS

USAGE

parser usage.

annotation

whether draw point annotation.

background

background color (default: 'white')

camera_angle

camera angle (default: 'three_quarters')

coordinate_space

which coordinate space, by default ccf (default: 'ccf')

hemisphere

which hemisphere for rendering the region (default: 'both')

logger

no_root

render without root(brain) mesh (default: False)

output

output path for the html, if None, preview (default: None)

print_name

print acronym and the corresponding name (default: False)

print_tree

print tree for the available regions for the given source (default: False)

region_colors

region(s) color (default: None)

regions

region(s) name (default: ())

regions_alpha

region alpha value (default: 0.35)

root_alpha

root alpha (default: 0.35)

shader_style

Shader style to use (default: 'plastic')

source

atlas source name.

title

title added to the top of the window (default: None)

tree_init

init region for the tree print (default: None)

video_output

video output path (default: None)

scene

DESCRIPTION: str | None = 'Reconstruct a 3D brain view used brainrender module'

parser description. Could be override as a method if its content is dynamic-generated.

DEFAULT_REGION_COLORS = ['lightblue', 'pink', 'turquoise']
GROUP_SETTINGS = 'Basic Settings Option'
camera_angle: Literal['sagittal', 'sagittal2', 'frontal', 'top', 'top_side', 'three_quarters']

camera angle (default: ‘three_quarters’)

shader_style: Literal['metallic', 'cartoon', 'plastic', 'shiny', 'glossy']

Shader style to use (default: ‘plastic’)

title: str | None

title added to the top of the window (default: None)

source: Literal['allen_mouse_10um', 'allen_mouse_25um', 'allen_mouse_50um', 'allen_mouse_100um', 'kim_mouse_10um', 'kim_mouse_25um', 'kim_mouse_50um', 'kim_mouse_100um', 'perens_lsfm_mouse_20um', 'perens_stereotaxic_mouse_mri_25um', 'princeton_mouse_20um']

atlas source name. allen_human_500um as human (default: ‘allen_mouse_10um’)

root_alpha: float

root alpha (default: 0.35)

no_root: bool

render without root(brain) mesh (default: False)

background: Literal['white', 'black']

background color (default: ‘white’)

coordinate_space: Literal['ccf', 'brainrender']

which coordinate space, by default ccf (default: ‘ccf’)

GROUP_OPTIONAL = 'Optional Option'
annotation: tuple[str, ...] | None

whether draw point annotation. e.g., 1.5:1:0.4,-3.2:0.8:0.4 for two points (default: None)

GROUP_REGION = 'Region Option'
regions: str | tuple[str, ...]

region(s) name (default: ())

region_colors: str | tuple[str, ...] | None

region(s) color (default: None)

regions_alpha: float

region alpha value (default: 0.35)

hemisphere: Literal['right', 'left', 'both']

which hemisphere for rendering the region (default: ‘both’)

print_tree: bool

print tree for the available regions for the given source (default: False)

tree_init: str | None

init region for the tree print (default: None)

print_name: bool

print acronym and the corresponding name (default: False)

GROUP_OUTPUT = 'Output Option'
video_output: Path | None

video output path (default: None)

output: Path | None

output path for the html, if None, preview (default: None)

scene: Scene
logger = <RootLogger root (IO)>
post_parsing()[source]
run()[source]

called after main(). Used for runs the main execution logic of the object

render()[source]

brainrender interactive

render_output()[source]

io handling. i.e., video, html output

classmethod export(reconstructor, output=None, areas=None, alpha=0.15)[source]

Export reconstruction as html

Parameters:
  • reconstructor (Self | None) – BrainRenderReconstructor if use the current scene, and –output cli. Otherwise, general func usage

  • output (Path | None) – output file path

  • areas (list[str] | None) – list of area(s)

  • alpha (float) – brain region alpha

video_maker(output_file)[source]

generate video

Parameters:

output_file (Path) – video output path

get_atlas_brain_globe(check_latest=False)[source]
Return type:

BrainGlobeAtlas