smoother.simulation.histology ============================= .. py:module:: smoother.simulation.histology .. autoapi-nested-parse:: Extract spatial patterns from a given histology image Attributes ---------- .. autoapisummary:: smoother.simulation.histology.ImageContainer Functions --------- .. autoapisummary:: smoother.simulation.histology.get_features_matrix smoother.simulation.histology.extract_features_from_image smoother.simulation.histology.cal_membership_value Module Contents --------------- .. py:data:: ImageContainer :value: None .. py:function:: get_features_matrix(crop: squidpy.im.ImageContainer, layer) Extract features from a given crop :param crop: crop of a image :param layer: Image layer in crop that should be processed :returns: the extracted features at this crop :rtype: df_1 .. py:function:: extract_features_from_image(image: squidpy.im.ImageContainer, crop_size, layer) Extract features from a given image :param image: squidpy ImageContainer :param crop_size: the # of crops wanted [n_row_crops, n_col_crops] :param layer: Image layer in image that should be processed :returns: the extracted features at all crops :rtype: features_df .. py:function:: cal_membership_value(membership_mat, feature_df, cluster_centers, m) Calculate fuzzy-c-means membership values :param membership_mat: membership matrix n_location x n_cluster :param feature_df: features matrix n_location x n_feature :param cluster_centers: center point for clusters n_cluster x n_feature :param m: m value required by FCM :returns: updated membership matrix n_location x n_cluster :rtype: membership_mat