Skip to content

Ewoksify NoiseRemoval

Loic Huder requested to merge ewoksify-noise-removal into main

For #133

As a reminder, here is the widget:

image

Clicking on the various Compute buttons launches the corresponding noise removal operation (background subtraction, hot pixel removal, threshold removal and masking) in a thread, updating the dataset and the plot at the end of the computation. Operations can be chained, further changing the dataset.

Clicking on Ok allows to move to the next widget with the updated dataset.


The core part of this refactoring is the introduction of the NoiseRemovalOperation object (that holds the operation type and its parameters) to abstract all operations.

The GUI widget was then restructured to make use of this abstraction so that successive operations are always launched via the same method _launchOperationInThread. This allows to keep an history of all successive operations in _operationHistory.

The ewoks task was then changed to take a list of operations as input. When clicking on Ok, the operationHistory is passed to the Ewoks task that basically redoes the successive operations done manually in the GUI widget. This paves the way for #92.


Improvement points:

  • There is no restoration of default inputs for now. We have to discuss if this is really relevant for this widget.
  • Since the default inputs is now a list of Python objects, it is pickled and therefore no longer human-readable in the .ows file.
  • NoiseRemovalOperation.parameters is a simple dict so it lacks typing.
Edited by Loic Huder

Merge request reports

Loading