clearex.plot.data
Functions
|
Plot comparable histograms for one or more images. |
- clearex.plot.data.histograms(*images, bins=256, sample=200_000, labels=None)
Plot comparable histograms for one or more images.
- Parameters:
*images (array_like or ants.core.ants_image.ANTsImage) – One or more 2-D / 3-D images (or already-flat arrays) to visualise. Each input is converted to a 1-D
float32NumPy vector. ANTsImages are handled transparently via their.numpy()method.bins (int, default=256) – Number of equally spaced histogram bins shared by all inputs.
sample (int, default=200000) – Maximum number of pixels sampled per image before plotting.
labels (list of str, optional) – Titles for the per-image subplots. If omitted, generic labels are used.
- Returns:
Displays the histogram figure using Matplotlib.
- Return type:
None
Notes
Each histogram uses identical bin edges computed from the global intensity range across all provided images.
Examples
>>> histograms(img_raw, img_flat, img_matched, ... bins=256, ... labels=['Raw', 'Bias-corrected', 'Histogram-matched'])