scallops.features.generate.label_features

scallops.features.generate.label_features(objects_df, label_image, intensity_image, features, channel_names=None, normalize=True, bounding_box_columns=None, overlap=None)

Extract features from labeled regions in the image.

Parameters:
  • objects_df (DataFrame) – Data frame containing labeled regions from find_objects.

  • label_image (Array | Array) – Labeled regions.

  • intensity_image (Array | Array | Sequence[Array] | None) – Intensity image with dimensions (y, x, c) or zarr array(s) with dimensions with leading dimensions unrolled to channel dimension

  • features (Iterable[str]) – Features to extract.

  • channel_names (dict[int | str, str] | None) – Dictionary mapping channel index to channel names.

  • normalize (bool) – Whether to normalize image.

  • bounding_box_columns (Sequence[str] | None) – Columns to use for BoundingBoxMinimum_Y, BoundingBoxMinimum_X, BoundingBoxMaximum_Y, and BoundingBoxMaximum_X

  • overlap (int | None) – Chunk overlap.

Returns:

DataFrame with extracted features.

Return type:

DataFrame | DataFrame