Arbitrary shape
- simtissue.arbitrary_shape.checkerboard_mask(shape=[54, 1000, 1100], cube_square_size=100)
Generate checkerboard cell mask
- Parameters:
shape (list[int]) – dimension of the mask [z,y,x]
cube_square_size – size of the cube in pixel
- Returns:
checkerboard mask
- simtissue.arbitrary_shape.generate_ellipse(masks: ndarray, cell_id: int, radius_zyx: list = None, rad_min: float = 0.5, rad_max: float = 2)
generate nuclei as ellipse in the chosen cell
- Parameters:
masks (np.ndarray) – cell mask
cell_id (int) – index of the chosen cell
radius_zyx – list [Rz, Ry, Rx] of the fix parameter of the elipse leave it None to choose these parameter randomly between rad_min and rad_max
rad_min (float) – Min value of the radius if radius_zyx is None
rad_max – Max value of the radius if radius_zyx is None
- Returns:
ellipse mask , ellipse parameter
- simtissue.arbitrary_shape.add_sphere_nuclei(mask_cyto: ndarray, cube_square_size: int = 100, nuclei_radius: int = 25, list_nuclei: list = [])
add nuclei as sphere in the chosen cell
- Parameters:
mask_cyto (np.ndarray) – cell mask
cube_square_size (int) – size of the cube in pixel
nuclei_radius (float) – radius of the nuclei in pixel in pourcentage of the cube_square_size
list_nuclei (list) – list of nuclei to add
- Returns:
mask of the nuclei
- simtissue.arbitrary_shape.remove_nuclei(mask_nuclei: ndarray, percent_to_remove: float = 0.5, list_nuc_to_keep: list = None)
remove nuclei from the existing nuclei mask to generate cell without nuclei like in smFISH experiment
- Parameters:
mask_nuclei (np.ndarray) – nuclei mask
percent_to_remove (float) – percent of nuclei to remove
list_nuc_to_keep (list) – list of nuclei to keep
- Returns:
mask of the nuclei without some nuclei
- simtissue.arbitrary_shape.elbow_grid_cube()
Function to generate grid of elbow shape. the size of the cell mask is hard coded to 1800x1600 and the size square cell is 100 pixel, the size of nuclei is 25 pixel
- Returns:
mask_cyto, mask_nuclei