napari_prism.im.measure_tma#
- napari_prism.im.measure_tma(spatialdata, image_name, segmentation_name, output_table_name, tiling_shapes=None, extended_properties=False, intensity_mode='mean', reference_coordinate_system='global', inplace=True, scale='scale0')#
Measures the properties of the labels or cells in the image from a given labels mask. Writes the measurements as an AnnData table to the underlying sdata object.
- Parameters:
spatialdata (
SpatialData) – The spatialdata object to measure.image_name (
str) – The name of the image to measure.segmentation_name (
str) – The name of the segmentation mask.output_table_name (
str) – The name of the output table.tiling_shapes (
Optional[str] (default:None)) – The tiling shapes to use.extended_properties (
bool(default:False)) – If True, includes extended properties.intensity_mode (
Literal['mean','median'] (default:'mean')) – The intensity mode to use. Options: “mean”, “median”.reference_coordinate_system (
str(default:'global')) – The reference coordinate system to use.inplace (
bool(default:True)) – If True, modifies the spatialdata object in place. If False, returns the measurements as a tuple of DataFrames.scale (default:
'scale0') – The scale to measure.
- Return type:
- Returns:
If inplace is True, returns the modified spatialdata object. If False, returns a tuple of DataFrames containing the measurements.