pixviz.roi#
- pixviz.roi.RoiName#
alias of
str
- pixviz.roi.compute_pixel_intensity(image, func, debug_save=False)[source]#
Compute the selected area pixel intensity
- Parameters:
image (QImage | ndarray) – image object, either
PyQt6.QtGui.QImageor imagenumpy.arrayfunc (Literal['mean', 'median']) –
PIXEL_CAL_FUNCTION{‘mean’, ‘median’}debug_save (bool) – debug save cropped image
- Returns:
- Return type:
float
- class pixviz.roi.RoiLabelObject[source]#
-
- rect_item: QGraphicsRectItem#
set after selection
- text: QGraphicsTextItem#
set after roi dialog
- background: QGraphicsRectItem | None#
set after roi dialog
- func: Literal['mean', 'median']#
calculation func
- data: ndarray | None#
(F,)
- angle: float#
- rotation_handle: QGraphicsEllipseItem#
- property rect_repr: str#
rect coordinates
- set_name(name)[source]#
set name, text and background of the selected area
- Parameters:
name (str) – roi name
- Return type:
None
- class pixviz.roi.PixVizResult[source]#
- __init__(dat, meta)[source]#
- Parameters:
dat (Path | str) – .npy or .mat data path
meta (Path | str) – .json data path
- dat: ndarray#
- meta: dict[str, Any]#
- get_index(name)[source]#
Get index from roi name
- Parameters:
name (str) – roi name
- Returns:
roi index
- Return type:
int
- get_data(source)[source]#
Get roi data from either index or name
- Parameters:
source (int | str) – if int type, get data from index; If string type, get data from roi name
- Returns:
data (F,)
- Return type:
ndarray
- property n_rois: int#
number of roi selected
- property n_frames: int#
number of frames (sequences)