def apply_roi(self, roi): if len(self.layers) > 0: cmd = command.ApplyROI(data_collection=self._data, roi=roi, apply_func=self._apply_roi) self._session.command_stack.do(cmd) else: # Make sure we force a redraw to get rid of the ROI self.axes.figure.canvas.draw()
def apply_roi(self, roi): """ Apply an ROI to the client Parameters ---------- roi : :class:`~glue.core.roi.Roi` The ROI to apply. """ cmd = command.ApplyROI(client=self.client, roi=roi) self._session.command_stack.do(cmd)
def apply_roi(self, roi): cmd = command.ApplyROI(data_collection=self._data, roi=roi, apply_func=self._apply_roi) self._session.command_stack.do(cmd)