def apply_roi(self, roi):
        if len(self.artists) > 0:
            focus = self.artists[0].layer.data
        elif len(self.collect) > 0:
            focus = self.collect[0]
        else:
            return

        s = self._coordinator._build_subset_state(roi=roi)
        if s:
            EditSubsetMode().update(self.collect, s, focus_data=focus)
dataset/ETHPy150Open glue-viz/glue/glue/viewers/custom/qt/custom_viewer.py/CustomClient.apply_roi/original