neuralib.atlas.view.SlicePlane
- class neuralib.atlas.view.SlicePlane[source]
Bases:
object2D Wrapper for a specific plane
- slice_index: int
anchor index
- ax: int
anchor x
- ay: int
anchor y
- __init__(slice_index, ax, ay, dw, dh, slice_view, unit='a.u.')
Method generated by attrs for class SlicePlane.
- Parameters:
slice_index (int)
ax (int)
ay (int)
dw (int)
dh (int)
slice_view (AbstractSliceView)
unit (str)
- Return type:
None
- dw: int
dw in um
- dh: int
dh in um
- slice_view: AbstractSliceView
AbstractSliceView
- unit: str
- property image: ndarray
- property plane_offset: ndarray
- property reference_value: float
relative to reference point
- with_offset(dw, dh, debug=False)[source]
- Parameters:
dw (int)
dh (int)
debug (bool)
- Return type:
Self
- with_angle_offset(deg_x=0, deg_y=0)[source]
with degree offset
- Parameters:
deg_x (float) – degree in x axis (width)
deg_y (float) – degree in y axis (height)
- Returns:
- Return type:
Self
- plot(ax=None, to_um=True, annotation_region=None, boundaries=False, with_title=False, extent=None, reference_bg_value=None, annotation_cmap='berlin', annotation_rescale=True, **kwargs)[source]
- Parameters:
ax (Axes | None) – The Axes object on which to plot. If None, a new figure and axes are created.
to_um (bool) – A boolean flag indicating whether the coordinates should be converted to micrometers. Defaults to True. Only applicable if
extentis None.annotation_region (list[str] | str | None) – The annotation region on which to plot. Defaults to None.
boundaries (bool) – A boolean indicating whether to include annotations in the plot.
with_title (bool) – A boolean indicating whether to include a title in the plot.
extent (tuple[float, float, float, float] | None) – A tuple defining the image boundaries (left, right, bottom, top). If None, boundaries are computed internally.
reference_bg_value (float | None) – If specified, remove background of its value in when view_type is reference (i.e., set as 10).
annotation_cmap (str) – Cmap for the annotation regions if specified
annotation_rescale (bool) – Rescale the image when view_type is annotation.
kwargs – Additional keyword arguments passed to
ax.imshow().
- Return type:
None