Commit 88314b5c authored by Thomas Vincent's avatar Thomas Vincent

add maxipix correction option to GUI

parent 6f5f6924
......@@ -109,8 +109,13 @@ class ConversionParamsWidget(Qt.QWidget):
checkBox.setChecked(False)
return checkBox
# Maxipix correction
self.__maxipixCorrection = createCheckBox('1. Maxipix correction')
imgGboxLayout.addRow(self.__maxipixCorrection)
# Mask
self.__imgMaskCBox = createCheckBox('1. Mask')
self.__imgMaskCBox = createCheckBox('2. Mask')
self.__maskFileLineEdit = StyledLineEdit()
self.__maskFileLineEdit.setAlignment(Qt.Qt.AlignLeft)
......@@ -131,7 +136,7 @@ class ConversionParamsWidget(Qt.QWidget):
imgGboxLayout.addRow(self.__imgMaskCBox, maskLayout)
# Normalization
self.__imgNormCBox = createCheckBox('2. Normalization')
self.__imgNormCBox = createCheckBox('3. Normalization')
self.__normalizationComboBox = Qt.QComboBox()
self.__normalizationComboBox.setEnabled(False)
......@@ -235,6 +240,13 @@ class ConversionParamsWidget(Qt.QWidget):
self.__maskFileLineEdit.setText(dialog.selectedUrl())
self.__mask = dialog.selectedImage()
def isMaxipixCorrectionEnabled(self):
"""Returns whether Maxipix correction is enabled or not.
:rtype: bool
"""
return self.__maxipixCorrection.isChecked()
def getMask(self):
"""Returns the selected mask image or None if not set
......@@ -624,6 +636,7 @@ class QSpaceWidget(Qt.QDialog):
directBeam = self.__paramsWid.getDirectBeam()
channelsPerDegree = self.__paramsWid.getChannelsPerDegree()
mask = self.__paramsWid.getMask()
maxipixCorrection = self.__paramsWid.isMaxipixCorrectionEnabled()
try:
converter.normalizer = normalizer
......@@ -633,6 +646,7 @@ class QSpaceWidget(Qt.QDialog):
converter.direct_beam = directBeam
converter.channels_per_degree = channelsPerDegree
converter.mask = mask
converter.maxipix_correction = maxipixCorrection
except ValueError as ex:
Qt.QMessageBox.critical(self, 'Error',
str(ex))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment