diff --git a/intermediates/20241218_022831/bottom_illu/info.npy b/intermediates/20241218_022831/bottom_illu/info.npy new file mode 100644 index 0000000..ac5859f Binary files /dev/null and b/intermediates/20241218_022831/bottom_illu/info.npy differ diff --git a/intermediates/20241218_022831/top_illu/info.npy b/intermediates/20241218_022831/top_illu/info.npy new file mode 100644 index 0000000..62b4ce3 Binary files /dev/null and b/intermediates/20241218_022831/top_illu/info.npy differ diff --git a/src/lsfm_fusion_napari/_dialog.py b/src/lsfm_fusion_napari/_dialog.py index 98f0400..79e65ba 100644 --- a/src/lsfm_fusion_napari/_dialog.py +++ b/src/lsfm_fusion_napari/_dialog.py @@ -9,6 +9,12 @@ ) import napari +from PyQt5 import QtGui + +font = QtGui.QFont() +font.setFamily("Microsoft YaHei UI") +font.setPointSize(20) + class GuidedDialog(QWidget): def __init__(self, parent=None): @@ -35,6 +41,7 @@ def __init__(self, parent=None): parent.logger.debug("GuidedDialog initialized") def init_ui(self): + self.setFont(font) self.setLayout(QGridLayout()) try: self.setStyleSheet(napari.qt.get_stylesheet(theme="dark")) diff --git a/src/lsfm_fusion_napari/_widget.py b/src/lsfm_fusion_napari/_widget.py index da4b025..9d06653 100644 --- a/src/lsfm_fusion_napari/_widget.py +++ b/src/lsfm_fusion_napari/_widget.py @@ -27,6 +27,11 @@ from ._dialog import GuidedDialog from ._writer import save_dialog, write_tiff +from PyQt5 import QtGui + +font = QtGui.QFont() +font.setPointSize(20) + class RegistrationSetting(QGroupBox): # (15.11.2024) Function 1 @@ -35,9 +40,7 @@ def __init__(self, parent=None): self.setTitle("Registration settings") self.setVisible(False) self.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Maximum) - self.setStyleSheet( - "QGroupBox {background-color: blue; " "border-radius: 10px}" - ) + self.setStyleSheet("QGroupBox { " "border-radius: 10px}") self.viewer = parent.viewer self.parent = parent self.name = "" # layer.name @@ -92,9 +95,7 @@ def __init__(self, parent=None): self.setTitle("General settings") self.setVisible(False) self.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Maximum) - self.setStyleSheet( - "QGroupBox {background-color: blue; " "border-radius: 10px}" - ) + self.setStyleSheet("QGroupBox {" "border-radius: 10px}") self.viewer = parent.viewer self.parent = parent self.name = "" # layer.name @@ -139,7 +140,7 @@ def __init__(self, parent=None): sld_resample_ratio.valueChanged.connect(self.resample_ratio) vbox.addWidget(sld_resample_ratio, 4, 1, 1, 2) - self.label_n_epochs = QLabel("Iteration of smoothing: 50") + self.label_n_epochs = QLabel("Maximum iteration: 50") vbox.addWidget(self.label_n_epochs, 5, 0, 1, 2) sld_n_epochs = QSlider(Qt.Horizontal) sld_n_epochs.setRange(10, 300) @@ -152,18 +153,16 @@ def __init__(self, parent=None): self.label_kernel_size_z = QLabel("z: 5") vbox.addWidget(self.label_kernel_size_z, 6, 1, 1, 1) sld_kernel_size_z = QSlider(Qt.Horizontal) - sld_kernel_size_z.setRange(1, 49) - sld_kernel_size_z.setPageStep(2) - sld_kernel_size_z.setValue(5) + sld_kernel_size_z.setRange(0, 24) + sld_kernel_size_z.setValue(2) self.lineedit_window_size_z = 5 sld_kernel_size_z.valueChanged.connect(self.kernel_size_z) vbox.addWidget(sld_kernel_size_z, 6, 2, 1, 1) self.label_kernel_size_xy = QLabel("xy: 59") vbox.addWidget(self.label_kernel_size_xy, 7, 1, 1, 1) sld_kernel_size_xy = QSlider(Qt.Horizontal) - sld_kernel_size_xy.setRange(9, 199) - sld_kernel_size_xy.setPageStep(2) - sld_kernel_size_xy.setValue(59) + sld_kernel_size_xy.setRange(0, 95) + sld_kernel_size_xy.setValue(25) self.lineedit_window_size_xy = 59 sld_kernel_size_xy.valueChanged.connect(self.kernel_size_xy) vbox.addWidget(sld_kernel_size_xy, 7, 2, 1, 1) @@ -173,7 +172,6 @@ def __init__(self, parent=None): vbox.addWidget(self.label_porder_z, 8, 1, 1, 1) sld_porder_z = QSlider(Qt.Horizontal) sld_porder_z.setRange(1, 5) - sld_porder_z.setPageStep(1) sld_porder_z.setValue(2) self.lineedit_porder_z = 2 sld_porder_z.valueChanged.connect(self.porder_z) @@ -182,7 +180,6 @@ def __init__(self, parent=None): vbox.addWidget(self.label_porder_xy, 9, 1, 1, 1) sld_porder_xy = QSlider(Qt.Horizontal) sld_porder_xy.setRange(1, 5) - sld_porder_xy.setPageStep(1) sld_porder_xy.setValue(2) self.lineedit_porder_xy = 2 sld_porder_xy.valueChanged.connect(self.porder_xy) @@ -201,12 +198,16 @@ def porder_z(self, value: int): self.label_porder_z.setText("z: {}".format(value)) def kernel_size_xy(self, value: int): - self.lineedit_window_size_xy = value - self.label_kernel_size_xy.setText("xy: {}".format(value)) + self.lineedit_window_size_xy = value * 2 + 9 + self.label_kernel_size_xy.setText( + "xy: {}".format(self.lineedit_window_size_xy) + ) def kernel_size_z(self, value: int): - self.lineedit_window_size_z = value - self.label_kernel_size_z.setText("z: {}".format(value)) + self.lineedit_window_size_z = value * 2 + 1 + self.label_kernel_size_z.setText( + "z: {}".format(self.lineedit_window_size_z) + ) def resample_ratio(self, value: int): self.lineedit_resample_ratio = value @@ -325,7 +326,7 @@ def _initialize_ui(self): # for ease of access # QLabels - title = QLabel("