mantidimaging.core.operations.outliers.outliers module

class mantidimaging.core.operations.outliers.outliers.OutliersFilter[source]

Bases: mantidimaging.core.operations.base_filter.BaseFilter

Removes pixel values that are found to be outliers as defined by the given parameters.

Intended to be used on: Projections

When: As a pre-processing step to reduce very bright or dead pixels in the data.

Caution: This should usually be one of the first steps applied to the data, flat and dark images, to remove pixels with very large values that will cause issues for flat-fielding.

static execute_wrapper(diff_field=None, size_field=None, mode_field=None)[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(images:, diff=None, radius=3, mode='bright', cores=None, progress: Optional[mantidimaging.core.utility.progress_reporting.progress.Progress] = None)[source]
  • images – Input data

  • diff – Pixel value difference above which to crop bright pixels

  • radius – Size of the median filter to apply

  • mode – Whether to remove bright or dark outliers One of [OUTLIERS_BRIGHT, OUTLIERS_DARK]

  • cores – The number of cores that will be used to process the data.


The processed 3D numpy.ndarray

filter_name = 'Remove Outliers'
static group_name() mantidimaging.core.operations.base_filter.FilterGroup[source]
static register_gui(form, on_change, view)[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.

  • view

  • form – the layout to create input widgets in

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


the widgets bound as kwargs which are needed to call execute_wrapper