def selection_roi_slider_changed(self, new_value): if self.ui.square_roi_radiobutton.isChecked(): mode = 'square' else: mode = 'free' o_selection = BraggEdgeSelectionTab(parent=self) o_selection.update_selection(new_value=new_value, mode=mode)
def roi_radiobuttons_changed(self): if self.ui.square_roi_radiobutton.isChecked(): slider_visible = True new_width = np.min([np.int(str(self.ui.roi_width.text())), np.int(str(self.ui.roi_height.text()))]) mode = 'square' else: slider_visible = False new_width = np.int(str(self.ui.roi_width.text())) self.selection_roi_slider_changed(new_width) mode = 'free' o_selection = BraggEdgeSelectionTab(parent=self) o_selection.update_selection(new_value=new_width, mode=mode) self.ui.roi_size_slider.setVisible(slider_visible)