neuralib.scanbox.view.ScanBoxView

class neuralib.scanbox.view.ScanBoxView[source]

Bases: object

Scanbox info and data

Dimension parameters:

F = number of frames

P = number of optical planes

C = number of PMT channels

W = FOV width

H = FOV height

__init__(directory)[source]
Parameters:

directory (str | Path | PathLike[str]) – directory contain .sbx & .mat files

Methods

__init__(directory)

show(frames, plane, channel)

play the selected frames using customized CV2 player

to_tiff(frames, plane, channel, output)

Convert the selected frames to tiff file

Attributes

height

fov height

meta

scanbox meta information

n_channels

sbx issue, a bit of hard-coded

n_frames

number of frames per plane

n_planes

number of optical imaging planes

version

scanbox version

width

fov width

info

SBXInfo

sbx_map

Array[float, [F, P, C, W, H]]

__init__(directory)[source]
Parameters:

directory (str | Path | PathLike[str]) – directory contain .sbx & .mat files

sbx_map: sbx_memmap

Array[float, [F, P, C, W, H]]

info: SBXInfo

SBXInfo

property meta: dict[str, Any]

scanbox meta information

property version: int

scanbox version

property height: int

fov height

property width: int

fov width

property n_planes: int

number of optical imaging planes

property n_channels: int

sbx issue, a bit of hard-coded

property n_frames: int

number of frames per plane

show(frames, plane, channel)[source]

play the selected frames using customized CV2 player

Parameters:
  • frames (slice | ndarray | None) – selected frames. If None, play all sequences

  • plane (int) – number of optical planes

  • channel (int) – number of PMT channel

to_tiff(frames, plane, channel, output)[source]

Convert the selected frames to tiff file

Parameters:
  • frames (slice | ndarray | None) – selected frames. If None, convert all sequences

  • plane (int) – number of optical planes

  • channel (int) – number of PMT channel

  • output (str | Path | PathLike[str]) – output filename