CategoricalROI¶
- class glue.core.roi.CategoricalROI(categories=None)[source]¶
Bases:
glue.core.roi.Roi
A ROI abstraction to represent selections of categorical data.
Methods Summary
contains
(x, y)Test whether a set categorical elements fall within the region of interest
defined
()Returns True if the ROI is defined
from_range
(categories, lo, hi)Utility function to help construct the Roi from a range.
reset
()Just not possible.
update_categories
(categories)Methods Documentation
- contains(x, y)[source]¶
Test whether a set categorical elements fall within the region of interest
- Parameters
x – Any array-like object of categories (includes CategoricalComponenets)
y – Unused but required for compatibility
Returns
A list of True/False values, for whether each x value falls within the ROI