squidpy.im.ImageContainer.features_histogram
- ImageContainer.features_histogram(layer, library_id=None, feature_name='histogram', channels=None, bins=10, v_range=None)
Compute histogram counts of color channel values.
Returns one feature per bin and channel.
- Parameters:
layer (
str) – Image layer inimgthat should be processed. If None and only 1 layer is present, it will be selected.library_id (
str|None) – Name of the Z-dimension that this function should be applied to.feature_name (
str) – Base name of feature in resulting feature valuesdict.channels (
int|Sequence[int] |None) – Channels for this feature is computed. If None, use all channels.bins (
int) – Number of binned value intervals.v_range (
tuple[int,int] |None) – Range on which values are binned. If None, use the whole image range.
- Return type:
- Returns:
Returns features with the following keys for each channel c in
channels:'{feature_name}_ch-{c}_bin-{i}'- the histogram counts for each bin i inbins.