smoother.simulation.histology

Extract spatial patterns from a given histology image

Attributes

ImageContainer

Functions

get_features_matrix(crop, layer)

Extract features from a given crop

extract_features_from_image(image, crop_size, layer)

Extract features from a given image

cal_membership_value(membership_mat, feature_df, ...)

Calculate fuzzy-c-means membership values

Module Contents

smoother.simulation.histology.ImageContainer = None
smoother.simulation.histology.get_features_matrix(crop: squidpy.im.ImageContainer, layer)

Extract features from a given crop

Parameters:
  • crop – crop of a image

  • layer – Image layer in crop that should be processed

Returns:

the extracted features at this crop

Return type:

df_1

smoother.simulation.histology.extract_features_from_image(image: squidpy.im.ImageContainer, crop_size, layer)

Extract features from a given image

Parameters:
  • image – squidpy ImageContainer

  • crop_size – the # of crops wanted [n_row_crops, n_col_crops]

  • layer – Image layer in image that should be processed

Returns:

the extracted features at all crops

Return type:

features_df

smoother.simulation.histology.cal_membership_value(membership_mat, feature_df, cluster_centers, m)

Calculate fuzzy-c-means membership values

Parameters:
  • membership_mat – membership matrix n_location x n_cluster

  • feature_df – features matrix n_location x n_feature

  • cluster_centers – center point for clusters n_cluster x n_feature

  • m – m value required by FCM

Returns:

updated membership matrix n_location x n_cluster

Return type:

membership_mat