mantidimaging.core.operations.base_filter module

class mantidimaging.core.operations.base_filter.BaseFilter[source]

Bases: object

SINOGRAM_FILTER_INFO = 'This filter will work on a\nsinogram view of the data.'
static execute_wrapper(args) partial[source]

Should construct a partial call to _filter_func using values taken from the widgets passed to this function as kwargs. :param kwargs: widgets which contain values required for _filter_func. :return: a partial call to _filter_func using parameters taken from the input widgets.

static filter_func(data: ImageStack) ImageStack[source]

Executes the filter algorithm on a given set of image data with the given parameters.

Parameters:
  • data – the image data to apply the filter to

  • kwargs – any additional arguments which the specific filter uses

Returns:

the image data after applying the filter

filter_name = 'Unnamed Filter'
static get_images_from_stack(widget: DatasetSelectorWidgetView, msg: str) ImageStack | None[source]
static group_name() FilterGroup[source]
operate_on_sinograms = False
static register_gui(form: QFormLayout, on_change: Callable, view: BaseMainWindowView) Dict[str, 'QWidget'][source]

Adds any required input widgets to the given form and returns references to them.

The return values should be in a dict which can be unpacked as kwargs for a call to the operations execute_wrapper.

Parameters:
  • view

  • form – the layout to create input widgets in

  • on_change – the filter view action to be bound to all created inputs

Returns:

the widgets bound as kwargs which are needed to call execute_wrapper

show_negative_overlay = True
static sv_params() Dict[str, Any][source]

Any parameters required from the StackVisualizer ie. ROI :return: a map of parameters names

static validate_execute_kwargs(kwargs: Dict[str, Any]) bool[source]
class mantidimaging.core.operations.base_filter.FilterGroup(value)[source]

Bases: Enum

An enumeration.

Advanced = 3
Basic = 2
NoGroup = 1
mantidimaging.core.operations.base_filter.raise_not_implemented(function_name)[source]