neuralib.imaging.scanbox.viewer.SBXViewer

class neuralib.imaging.scanbox.viewer.SBXViewer[source]

Bases: object

wrapper for sbxreader

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 | bytes | BinaryIO | BufferedIOBase | BufferedReader) – scanbox file (.sbx). In the same directory should contain the corresponding .mat file

sbx_map: sbx_memmap

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

info: SBXInfo

SBXInfo

property meta: dict[str, Any]
property version: int
property height: int
property width: int
property n_planes: int
property n_channels: int

sbx issue, a bit of hard-coded

property n_frames: int

number of frames/images

play(frames, plane, channel)[source]

Play the selected frames using customized CV2 player.

See SequenceLabeller

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

  • plane (int) – number of optical planes

  • channel (int) – number of PMT channel

Returns:

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 | bytes | BinaryIO | BufferedIOBase | BufferedReader) – output filename

Returns: