-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui_cc_calib.py
188 lines (152 loc) · 9.17 KB
/
ui_cc_calib.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'cc_calib.ui'
##
## Created by: Qt User Interface Compiler version 6.4.0
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect,
QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QFont, QFontDatabase, QGradient, QIcon,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QGroupBox, QHBoxLayout, QLabel,
QPushButton, QSizePolicy, QSlider, QSpacerItem,
QVBoxLayout, QWidget)
from rawpreviewwidget import rawPreviewWidget
class Ui_eCCM(object):
def setupUi(self, eCCM):
if not eCCM.objectName():
eCCM.setObjectName(u"eCCM")
eCCM.resize(1262, 778)
eCCM.setStyleSheet(u"")
self.horizontalLayout = QHBoxLayout(eCCM)
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalLayout.setContentsMargins(4, 4, 4, 4)
self.rawPreviewWidget = rawPreviewWidget(eCCM)
self.rawPreviewWidget.setObjectName(u"rawPreviewWidget")
self.rawPreviewWidget.setStyleSheet(u"background-color: rgb(100, 100, 100);")
self.horizontalLayout.addWidget(self.rawPreviewWidget)
self.verticalLayout = QVBoxLayout()
self.verticalLayout.setObjectName(u"verticalLayout")
self.importRawBtn = QPushButton(eCCM)
self.importRawBtn.setObjectName(u"importRawBtn")
self.importRawBtn.setStyleSheet(u"background-color: rgb(170, 170, 255);\n"
"")
self.verticalLayout.addWidget(self.importRawBtn)
self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
self.verticalLayout.addItem(self.verticalSpacer)
self.label = QLabel(eCCM)
self.label.setObjectName(u"label")
self.verticalLayout.addWidget(self.label)
self.patchSizeSlider = QSlider(eCCM)
self.patchSizeSlider.setObjectName(u"patchSizeSlider")
self.patchSizeSlider.setMaximum(80)
self.patchSizeSlider.setPageStep(5)
self.patchSizeSlider.setValue(80)
self.patchSizeSlider.setOrientation(Qt.Horizontal)
self.verticalLayout.addWidget(self.patchSizeSlider)
self.groupBox = QGroupBox(eCCM)
self.groupBox.setObjectName(u"groupBox")
self.groupBox.setMinimumSize(QSize(166, 209))
self.adjTopOuterBtn = QPushButton(self.groupBox)
self.adjTopOuterBtn.setObjectName(u"adjTopOuterBtn")
self.adjTopOuterBtn.setGeometry(QRect(40, 20, 75, 24))
self.adjTopOuterBtn.setStyleSheet(u"background-color: rgb(128, 128, 128);")
self.adjLeftOuterBtn = QPushButton(self.groupBox)
self.adjLeftOuterBtn.setObjectName(u"adjLeftOuterBtn")
self.adjLeftOuterBtn.setGeometry(QRect(0, 80, 21, 61))
self.adjLeftOuterBtn.setStyleSheet(u"background-color: rgb(128, 128, 128);")
self.adjRightOuterBtn = QPushButton(self.groupBox)
self.adjRightOuterBtn.setObjectName(u"adjRightOuterBtn")
self.adjRightOuterBtn.setGeometry(QRect(140, 80, 21, 61))
self.adjRightOuterBtn.setStyleSheet(u"background-color: rgb(128, 128, 128);")
self.adjBottomOuterBtn = QPushButton(self.groupBox)
self.adjBottomOuterBtn.setObjectName(u"adjBottomOuterBtn")
self.adjBottomOuterBtn.setGeometry(QRect(40, 180, 75, 24))
self.adjBottomOuterBtn.setStyleSheet(u"background-color: rgb(128, 128, 128);")
self.adjTopInnerBtn = QPushButton(self.groupBox)
self.adjTopInnerBtn.setObjectName(u"adjTopInnerBtn")
self.adjTopInnerBtn.setGeometry(QRect(40, 50, 75, 23))
self.adjTopInnerBtn.setStyleSheet(u"background-color: rgb(128, 128, 128);")
self.pushButton = QPushButton(self.groupBox)
self.pushButton.setObjectName(u"pushButton")
self.pushButton.setGeometry(QRect(40, 150, 75, 23))
self.pushButton.setStyleSheet(u"background-color: rgb(128, 128, 128);")
self.pushButton_2 = QPushButton(self.groupBox)
self.pushButton_2.setObjectName(u"pushButton_2")
self.pushButton_2.setGeometry(QRect(30, 80, 21, 61))
self.pushButton_2.setStyleSheet(u"background-color: rgb(128, 128, 128);")
self.pushButton_3 = QPushButton(self.groupBox)
self.pushButton_3.setObjectName(u"pushButton_3")
self.pushButton_3.setGeometry(QRect(111, 80, 20, 61))
self.pushButton_3.setStyleSheet(u"background-color: rgb(128, 128, 128);")
self.verticalLayout.addWidget(self.groupBox)
self.previewBrightLabel = QLabel(eCCM)
self.previewBrightLabel.setObjectName(u"previewBrightLabel")
self.verticalLayout.addWidget(self.previewBrightLabel)
self.previewBrightSlider = QSlider(eCCM)
self.previewBrightSlider.setObjectName(u"previewBrightSlider")
self.previewBrightSlider.setMaximum(40)
self.previewBrightSlider.setSingleStep(1)
self.previewBrightSlider.setPageStep(2)
self.previewBrightSlider.setValue(10)
self.previewBrightSlider.setOrientation(Qt.Horizontal)
self.verticalLayout.addWidget(self.previewBrightSlider)
self.verticalSpacer_4 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
self.verticalLayout.addItem(self.verticalSpacer_4)
self.importTargetBtn = QPushButton(eCCM)
self.importTargetBtn.setObjectName(u"importTargetBtn")
self.importTargetBtn.setStyleSheet(u"background-color: rgb(128, 128, 128);")
self.verticalLayout.addWidget(self.importTargetBtn)
self.verticalSpacer_3 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
self.verticalLayout.addItem(self.verticalSpacer_3)
self.calcuateCcmBtn = QPushButton(eCCM)
self.calcuateCcmBtn.setObjectName(u"calcuateCcmBtn")
self.calcuateCcmBtn.setStyleSheet(u"background-color: rgb(85, 170, 127);")
self.verticalLayout.addWidget(self.calcuateCcmBtn)
self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
self.verticalLayout.addItem(self.verticalSpacer_2)
self.verticalLayout.setStretch(1, 1)
self.verticalLayout.setStretch(4, 1)
self.verticalLayout.setStretch(9, 1)
self.verticalLayout.setStretch(11, 1)
self.horizontalLayout.addLayout(self.verticalLayout)
self.horizontalLayout.setStretch(0, 1)
self.retranslateUi(eCCM)
self.importRawBtn.clicked.connect(eCCM.import_raw_file)
self.adjTopOuterBtn.clicked.connect(self.rawPreviewWidget.adjRoiOuterTop)
self.adjBottomOuterBtn.clicked.connect(self.rawPreviewWidget.adjRoiOuterBottom)
self.adjLeftOuterBtn.clicked.connect(self.rawPreviewWidget.adjRoiOuterLeft)
self.adjRightOuterBtn.clicked.connect(self.rawPreviewWidget.adjRoiOuterRight)
self.adjTopInnerBtn.clicked.connect(self.rawPreviewWidget.adjRoiInnerTop)
self.pushButton_2.clicked.connect(self.rawPreviewWidget.adjRoiInnerLeft)
self.pushButton.clicked.connect(self.rawPreviewWidget.adjRoiInnerBottom)
self.pushButton_3.clicked.connect(self.rawPreviewWidget.adjRoiInnerRight)
self.previewBrightSlider.valueChanged.connect(self.rawPreviewWidget.previewBrightAdj)
self.previewBrightSlider.valueChanged.connect(eCCM.show_preview_bright)
self.patchSizeSlider.valueChanged.connect(self.rawPreviewWidget.patchSizeChange)
self.calcuateCcmBtn.clicked.connect(eCCM.calculate_ccm)
self.importTargetBtn.clicked.connect(eCCM.import_target_file)
QMetaObject.connectSlotsByName(eCCM)
# setupUi
def retranslateUi(self, eCCM):
eCCM.setWindowTitle(QCoreApplication.translate("eCCM", u"eCCM", None))
self.importRawBtn.setText(QCoreApplication.translate("eCCM", u"import raw", None))
self.label.setText(QCoreApplication.translate("eCCM", u"patch size:", None))
self.groupBox.setTitle(QCoreApplication.translate("eCCM", u"adjust ROI", None))
self.adjTopOuterBtn.setText(QCoreApplication.translate("eCCM", u"^", None))
self.adjLeftOuterBtn.setText(QCoreApplication.translate("eCCM", u"<", None))
self.adjRightOuterBtn.setText(QCoreApplication.translate("eCCM", u">", None))
self.adjBottomOuterBtn.setText(QCoreApplication.translate("eCCM", u"v", None))
self.adjTopInnerBtn.setText(QCoreApplication.translate("eCCM", u"v", None))
self.pushButton.setText(QCoreApplication.translate("eCCM", u"^", None))
self.pushButton_2.setText(QCoreApplication.translate("eCCM", u">", None))
self.pushButton_3.setText(QCoreApplication.translate("eCCM", u"<", None))
self.previewBrightLabel.setText(QCoreApplication.translate("eCCM", u"preview brightness:1.0", None))
self.importTargetBtn.setText(QCoreApplication.translate("eCCM", u"import target + gamma", None))
self.calcuateCcmBtn.setText(QCoreApplication.translate("eCCM", u"calculate ccm", None))
# retranslateUi