cellcoloc.rasterize_shapes_to_labelmaskο
- cellcoloc.rasterize_shapes_to_labelmask(shapes_layer, image_shape_yx, scale_yx=(1.0, 1.0))[source]ο
Rasterize napari polygon-like shapes into a 2D label mask.
Napari stores shape coordinates in world coordinates when image layers use a physical scale. The coordinates are therefore mapped back to pixel coordinates before rasterization.
- Return type:
ndarray