Output class for imagestats() stats metric.
This class represents the combined outputs of various stats functions against a
single dataset, such that each index across all stat outputs are representative
of the same source image. Modifying or mixing outputs will result in inaccurate
outlier calculations if not created correctly.
The attributes and methods are a superset of PixelStatsOutput and
VisualStatsOutput.
-
data()
The output data as a dictionary.
- Return type:
dict[str, Any]
-
factors(filter=
None, exclude_constant=False)
Returns all 1-dimensional data as a dictionary of numpy arrays.
- Parameters:
- filter : str, Sequence[str] or None, default None:
If provided, only returns keys that match the filter.
- exclude_constant : bool, default False
If True, exclude arrays that contain only a single unique value.
- Return type:
Mapping[str, NDArray[Any]]
-
get_channel_mask(channel_index, channel_count=
None)
Boolean mask for results filtered to specified channel index and optionally the count
of the channels per image.
- Parameters:
- channel_index : int | Iterable[int] | None
Index or indices of channel(s) to filter for
- channel_count : int | Iterable[int] | None
Optional count(s) of channels to filter for
- Return type:
collections.abc.Sequence[bool]
-
meta()
Metadata about the execution of the function or method for the Output class.
- Return type:
ExecutionMetadata
-
plot(log, channel_limit=
None, channel_index=None)
Plots the statistics as a set of histograms.
- Parameters:
- log : bool
If True, plots the histograms on a logarithmic scale.
- channel_limit : int or None
The maximum number of channels to plot. If None, all channels are plotted.
- channel_index : int, Iterable[int] or None
The index or indices of the channels to plot. If None, all channels are plotted.
- Return type:
matplotlib.Figure
-
to_dataframe()
Returns the processed factors a polars dataframe of shape (factors, samples)
- Return type:
polars.DataFrame