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
(self, x, y)Test whether a set categorical elements fall within the region of interest
defined
(self)Returns True if the ROI is defined
from_range
(categories, lo, hi)Utility function to help construct the Roi from a range.
reset
(self)to_polygon
(self)Just not possible.
update_categories
(self, categories)Methods Documentation
-
contains
(self, 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
-