Tissue simulation

simtissue.tissue.simulate_single_cell_mask(mask_nuclei: ndarray, cyto: ndarray = None, scale: ndarray = array([3., 1.03, 1.03]), intervals_speed: list = [[0.5, 0.8], [1.3, 4]], median_kernel=7, random_seed=None)
generate a single cell mask from a nuclei. Individual cytoplasms are defined by growing cells from segmented nuclei.

Each cell grows at random speed to add irregularity in the cell size.

Parameters:
  • masks_nuclei (np.ndarray) – nuclei segmentation mask

  • cyto (np.ndarray) – (Optional), cytoplasm segmentation mask to simulate area without cell

:param scale : scale of the image in z,y,x :type scale : np.ndarray :param speed_range: speed range of the cell growth :type speed_range: list :param median_kernel: median kernel size to smooth the cell mask :return: cell mask