Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
XRD
darfix
Commits
e43da1f4
Commit
e43da1f4
authored
Aug 17, 2021
by
Julia Garriga Ferrer
Browse files
[gui][shift] Use input checkbox to choose when to apply shift to only selected value
parent
4d09651c
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/gui/shiftCorrectionWidget.py
View file @
e43da1f4
...
...
@@ -236,13 +236,13 @@ class ShiftCorrectionWidget(qt.QMainWindow):
self
.
_inputDock
.
widget
.
correctionB
.
setEnabled
(
False
)
def
_filterStack
(
self
,
dim
=
0
,
val
=
0
):
self
.
_inputDock
.
widget
.
checkbox
.
show
()
self
.
_dimension
=
[
dim
,
val
]
data
=
self
.
_update_dataset
.
get_data
(
self
.
indices
,
self
.
_dimension
)
if
self
.
dataset
.
dims
.
ndim
==
2
:
stack_size
=
self
.
dataset
.
dims
.
get
(
dim
[
0
]).
size
reset_shift
=
self
.
_filtered_shift
is
None
or
self
.
_filtered_shift
.
shape
[
0
]
!=
stack_size
self
.
_inputDock
.
widget
.
checkbox
.
show
()
self
.
_filtered_shift
=
numpy
.
zeros
((
stack_size
,
2
))
if
reset_shift
else
self
.
_filtered_shift
self
.
shift
=
self
.
_filtered_shift
[
val
[
0
]]
if
data
.
shape
[
0
]:
...
...
@@ -316,8 +316,8 @@ class _InputWidget(qt.QWidget):
self
.
correctionB
=
qt
.
QPushButton
(
"Correct"
)
self
.
abortB
=
qt
.
QPushButton
(
"Abort"
)
self
.
abortB
.
hide
()
self
.
checkbox
=
qt
.
QCheckBox
(
"Apply
to whole dataset
"
)
self
.
checkbox
.
setChecked
(
Tru
e
)
self
.
checkbox
=
qt
.
QCheckBox
(
"Apply
only to selected value
"
)
self
.
checkbox
.
setChecked
(
Fals
e
)
self
.
checkbox
.
hide
()
self
.
dxLE
.
setValidator
(
qt
.
QDoubleValidator
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment