Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.offset = None
self.bytecode = None
self.endian = None
buttonBox = qt.QDialogButtonBox(self)
buttonBox.setGeometry(qt.QRect(50, 230, 341, 32))
buttonBox.setOrientation(qt.Qt.Horizontal)
buttonBox.setStandardButtons(qt.QDialogButtonBox.Cancel | qt.QDialogButtonBox.Ok)
groupBox = qt.QGroupBox(self)
groupBox.setGeometry(qt.QRect(10, 10, 370, 191))
groupBox.setTitle("Binary data block required informations:")
label = qt.QLabel(self)
label.setGeometry(qt.QRect(67, 48, 91, 16))
label.setText("Dimention 1:")
label_2 = qt.QLabel(self)
label_2.setGeometry(qt.QRect(66, 76, 91, 16))
label_2.setText("Dimention 2:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(185, 40, 91, 25))
self.lineEdit_2 = qt.QLineEdit(self)
self.lineEdit_2.setGeometry(qt.QRect(185, 70, 91, 25))
label_5 = qt.QLabel(self)
label_5.setGeometry(qt.QRect(105, 106, 51, 16))
label_5.setText("Offset:")
self.lineEdit_3 = qt.QLineEdit(self)
self.lineEdit_3.setGeometry(qt.QRect(184, 100, 91, 25))
self.lineEdit_3.setText('0')
label_3 = qt.QLabel(groupBox)
label_3.setGeometry(qt.QRect(70, 130, 91, 16))
label_3.setText("ByteCode:")
self.comboBox = qt.QComboBox(groupBox)
label = qt.QLabel(self)
label.setGeometry(qt.QRect(38, 63, 181, 16))
label.setText("Number of files to sum up:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(220, 58, 113, 25))
label2 = qt.QLabel(self)
label2.setGeometry(qt.QRect(90, 100, 131, 20))
label2.setText("Starting Phi angle:")
self.lineEdit2 = qt.QLineEdit(self)
self.lineEdit2.setGeometry(qt.QRect(220, 95, 113, 25))
label3 = qt.QLabel(self)
label3.setGeometry(qt.QRect(151, 133, 101, 16))
label3.setText("Phi step:")
self.lineEdit3 = qt.QLineEdit(self)
self.lineEdit3.setGeometry(qt.QRect(219, 130, 113, 25))
buttonBox.accepted.connect(self.accept)
buttonBox.rejected.connect(self.reject)
#
self.axes = self.fig.add_subplot(111)
self.axes.set_visible(False)
# Bind the 'pick' event for clicking on one of the bars
self.canvas.mpl_connect('motion_notify_event', self.on_pick)
# Create the navigation toolbar, tied to the canvas
self.mpl_toolbar = NavigationToolbar2QT(self.canvas, tab1, coordinates=False)
# Other GUI controls
selector_label = qt.QLabel('Active Image:')
self.images_list = qt.QComboBox(self)
self.images_list.activated[str].connect(self.select_new_image)
viewer_label = qt.QLabel("Images Viewer: ", self)
self.pix_coords_label = qt.QLabel("Pixel coordinates and intensity: x = None , y = None , i = None ", self)
self.mpl_toolbar.addWidget(self.pix_coords_label)
self.headerTextEdit = qt.QPlainTextEdit(tab1)
self.headerTextEdit.setReadOnly(True)
# Layout with box sizers
header_vbox = qt.QVBoxLayout()
header_label = qt.QLabel("Header Info:", self)
header_vbox.addWidget(header_label)
header_vbox.addWidget(self.headerTextEdit)
hbox = qt.QHBoxLayout()
hbox.addWidget(selector_label, alignment=qt.Qt.AlignRight)
hbox.addWidget(self.images_list)
vbox = qt.QVBoxLayout()
# Other GUI controls
selector_label = qt.QLabel('Active Image:')
self.images_list = qt.QComboBox(self)
self.images_list.activated[str].connect(self.select_new_image)
viewer_label = qt.QLabel("Images Viewer: ", self)
self.pix_coords_label = qt.QLabel("Pixel coordinates and intensity: x = None , y = None , i = None ", self)
self.mpl_toolbar.addWidget(self.pix_coords_label)
self.headerTextEdit = qt.QPlainTextEdit(tab1)
self.headerTextEdit.setReadOnly(True)
# Layout with box sizers
header_vbox = qt.QVBoxLayout()
header_label = qt.QLabel("Header Info:", self)
header_vbox.addWidget(header_label)
header_vbox.addWidget(self.headerTextEdit)
hbox = qt.QHBoxLayout()
hbox.addWidget(selector_label, alignment=qt.Qt.AlignRight)
hbox.addWidget(self.images_list)
vbox = qt.QVBoxLayout()
vbox.addWidget(viewer_label, alignment=qt.Qt.AlignVCenter)
vbox.addWidget(self.canvas, alignment=qt.Qt.AlignVCenter)
vbox.addWidget(self.mpl_toolbar, alignment=qt.Qt.AlignVCenter)
vbox.addLayout(hbox)
left = qt.QWidget()
right = qt.QWidget()
self.dim1 = None
self.dim2 = None
self.offset = None
self.bytecode = None
self.endian = None
buttonBox = qt.QDialogButtonBox(self)
buttonBox.setGeometry(qt.QRect(50, 230, 341, 32))
buttonBox.setOrientation(qt.Qt.Horizontal)
buttonBox.setStandardButtons(qt.QDialogButtonBox.Cancel | qt.QDialogButtonBox.Ok)
groupBox = qt.QGroupBox(self)
groupBox.setGeometry(qt.QRect(10, 10, 370, 191))
groupBox.setTitle("Binary data block required informations:")
label = qt.QLabel(self)
label.setGeometry(qt.QRect(67, 48, 91, 16))
label.setText("Dimention 1:")
label_2 = qt.QLabel(self)
label_2.setGeometry(qt.QRect(66, 76, 91, 16))
label_2.setText("Dimention 2:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(185, 40, 91, 25))
self.lineEdit_2 = qt.QLineEdit(self)
self.lineEdit_2.setGeometry(qt.QRect(185, 70, 91, 25))
label_5 = qt.QLabel(self)
label_5.setGeometry(qt.QRect(105, 106, 51, 16))
label_5.setText("Offset:")
self.lineEdit_3 = qt.QLineEdit(self)
self.lineEdit_3.setGeometry(qt.QRect(184, 100, 91, 25))
self.lineEdit_3.setText('0')
label_3 = qt.QLabel(groupBox)
qt.QDialog.__init__(self, parent)
self.resize(407, 250)
self.setWindowTitle('Downsampling')
buttonBox = qt.QDialogButtonBox(self)
buttonBox.setGeometry(qt.QRect(45, 200, 341, 32))
buttonBox.setOrientation(qt.Qt.Horizontal)
buttonBox.setStandardButtons(qt.QDialogButtonBox.Cancel | qt.QDialogButtonBox.Ok)
label = qt.QLabel(self)
label.setGeometry(qt.QRect(38, 63, 181, 16))
label.setText("Number of files to sum up:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(220, 58, 113, 25))
label2 = qt.QLabel(self)
label2.setGeometry(qt.QRect(90, 100, 131, 20))
label2.setText("Starting Phi angle:")
self.lineEdit2 = qt.QLineEdit(self)
self.lineEdit2.setGeometry(qt.QRect(220, 95, 113, 25))
label3 = qt.QLabel(self)
label3.setGeometry(qt.QRect(151, 133, 101, 16))
label3.setText("Phi step:")
self.lineEdit3 = qt.QLineEdit(self)
self.lineEdit3.setGeometry(qt.QRect(219, 130, 113, 25))
buttonBox.accepted.connect(self.accept)
buttonBox.rejected.connect(self.reject)
# work.
#
self.axes = self.fig.add_subplot(111)
self.axes.set_visible(False)
# Bind the 'pick' event for clicking on one of the bars
self.canvas.mpl_connect('motion_notify_event', self.on_pick)
# Create the navigation toolbar, tied to the canvas
self.mpl_toolbar = NavigationToolbar2QT(self.canvas, tab1, coordinates=False)
# Other GUI controls
selector_label = qt.QLabel('Active Image:')
self.images_list = qt.QComboBox(self)
self.images_list.activated[str].connect(self.select_new_image)
viewer_label = qt.QLabel("Images Viewer: ", self)
self.pix_coords_label = qt.QLabel("Pixel coordinates and intensity: x = None , y = None , i = None ", self)
self.mpl_toolbar.addWidget(self.pix_coords_label)
self.headerTextEdit = qt.QPlainTextEdit(tab1)
self.headerTextEdit.setReadOnly(True)
# Layout with box sizers
header_vbox = qt.QVBoxLayout()
header_label = qt.QLabel("Header Info:", self)
header_vbox.addWidget(header_label)
header_vbox.addWidget(self.headerTextEdit)
hbox = qt.QHBoxLayout()
hbox.addWidget(selector_label, alignment=qt.Qt.AlignRight)
hbox.addWidget(self.images_list)
def create_status_bar(self):
self.status_text = qt.QLabel('')
self.statusBar().addWidget(self.status_text, 1)
self.statusBar().showMessage('Thanks for using FabIO viewer.', 5000)
left.setLayout(header_vbox)
right.setLayout(vbox)
splitter = qt.QSplitter(qt.Qt.Horizontal)
splitter.addWidget(left)
splitter.addWidget(right)
Bighbox = qt.QHBoxLayout()
Bighbox.addWidget(splitter)
tab1.setLayout(Bighbox)
# Tab 2
imagelistvbox = qt.QVBoxLayout()
imagelistlabel = qt.QLabel(tab2)
imagelistlabel.setText("Images List:")
self.imagelistWidget = qt.QListWidget(tab2)
import_view_button = qt.QPushButton('Export image to View Mode', tab2)
import_view_button.clicked.connect(self.batch_to_view)
imagelistvbox.addWidget(imagelistlabel)
imagelistvbox.addWidget(self.imagelistWidget)
imagelistvbox.addWidget(import_view_button)
rightsidevbox = qt.QVBoxLayout()
optiongroupBox = qt.QGroupBox(tab2)
optiongroupBox.setTitle("File Modes:")
optionbox = qt.QVBoxLayout()