Commit 4d09651c authored by Julia Garriga Ferrer's avatar Julia Garriga Ferrer
Browse files

[gui][shift] Apply shift on all values of dimension

parent 48f95237
......@@ -150,11 +150,14 @@ class ShiftCorrectionWidget(qt.QMainWindow):
"""
dx = self._inputDock.widget.getDx()
dy = self._inputDock.widget.getDy()
self.shift = [dy, dx]
dimension = self._dimension if not self._inputDock.widget.checkbox.isChecked() else None
frames = numpy.arange(self._update_dataset.get_data(indices=self.indices, dimension=dimension).shape[0])
self.thread_correction = OperationThread(self, self._update_dataset.apply_shift)
self.thread_correction.setArgs(numpy.outer(self.shift, frames), dimension, indices=self.indices)
self.shift = numpy.array([dy, dx])
if self._filtered_shift is None or self._inputDock.widget.checkbox.isChecked():
frames = numpy.arange(self._update_dataset.get_data(indices=self.indices, dimension=self._dimension).shape[0])
self.thread_correction = OperationThread(self, self._update_dataset.apply_shift)
self.thread_correction.setArgs(numpy.outer(self.shift, frames), self._dimension, indices=self.indices)
else:
self.thread_correction = OperationThread(self, self._update_dataset.apply_shift_along_dimension)
self.thread_correction.setArgs(self._filtered_shift, self._dimension[0], indices=self.indices)
self.thread_correction.finished.connect(self._updateData)
self._inputDock.widget.correctionB.setEnabled(False)
self._inputDock.widget.abortB.show()
......
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