livecellx.track.classify_utils.video_frames_and_masks_from_sample

livecellx.track.classify_utils.video_frames_and_masks_from_sample(sample, padding_pixels=0)[source]

Given a sample of SingleCell objects, returns a list of video frames and a list of video frame masks. Each video frame is a numpy array representing an RGB image of the cells in the sample at a particular timepoint. Each video frame mask is a numpy array representing a grayscale image of the cells in the sample at a particular timepoint, where each cell is labeled with a unique integer value.

Args: - sample: a list of SingleCell objects representing a sample of cells to be included in the video.

Returns: - video_frames: a list of numpy arrays representing RGB images of the cells in the sample at each timepoint. - video_frame_masks: a list of numpy arrays representing grayscale images of the cells in the sample at each timepoint, where each cell is labeled with a unique integer value.

Return type:

Tuple[List[ndarray], List[ndarray]]