neuralib.dashboard.view_brain.AtlasBrainView

class neuralib.dashboard.view_brain.AtlasBrainView[source]

Bases: AbstractBrainView

PLANE

alias of Literal[‘coronal’, ‘sagittal’, ‘transverse’]

__init__(source, check_latest=False, plane='coronal')[source]
Parameters:
  • source (str)

  • plane (Literal['coronal', 'sagittal', 'transverse'])

property n_ap: int
property n_dv: int
property n_ml: int
property plane: Literal['coronal', 'sagittal', 'transverse']
property n_frame: int
property width_n: int
property height_n: int
property width: float
property height: float
list_renders(pattern=None, recursive=False)

list all renders for those name contain pattern.

Parameters:
  • pattern (str | None) – str in attribute name

  • recursive (bool) – recursive find all renders from ViewComponent attributes.

Returns:

Return type:

list[GlyphRenderer]

plot(fig, palette='Greys256')

plot data in figure.

Parameters:
  • fig (figure) – Figure.

  • kwargs – plotting parameters.

set_visible(visible, pattern=None)

Set the visible state of renders for those name contain pattern. It is a recursive function that it also update the renders inside the ViewComponent attributes.

Parameters:
  • visible (bool)

  • pattern (str | None) – str in attribute name

update(x=0, y=0)

update the plot

Parameters:
  • x (float)

  • y (float)

data_brain_slice: ColumnDataSource
render_brain_slice: GlyphRenderer
property offset: int
property offset_w: int
property offset_h: int
property offset_matrix: ndarray
gen_offset_matrix(h, v)[source]
Parameters:
  • h (int) – horizontal plane diff to the center. right side positive.

  • v (int) – vertical plane diff to the center. bottom side positive.

Returns:

(H, W) array

Return type:

ndarray

brain_slice(offset)[source]
Parameters:

offset (int | ndarray)

Return type:

ndarray

property brain_image: ndarray