mantidimaging.core.operations.gaussian.gaussian module#

class mantidimaging.core.operations.gaussian.gaussian.GaussianFilter[source]#

Bases: BaseFilter

Applies Gaussian filter to the data.

Intended to be used on: Projections or reconstructed slices

When: As a pre-processing or post-reconstruction step to reduce noise.

static compute_function(i: int, array: np.ndarray, params)[source]#
static execute_wrapper(size_field=None, order_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(data: ImageStack, size=None, mode=None, order=None, progress=None)[source]#
Parameters:
  • data – Input data as a 3D numpy.ndarray

  • size – Size of the kernel

  • mode – The mode with which to handle the edges. One of [reflect, constant, nearest, mirror, wrap]. Modes are described in the SciPy documentation.

  • order – The order of the filter along each axis is given as a sequence of integers, or as a single number. An order of 0 corresponds to convolution with a Gaussian kernel. An order of 1, 2, or 3 corresponds to convolution with the first, second or third derivatives of a Gaussian. Higher order derivatives are not implemented

Returns:

The processed 3D numpy.ndarray

filter_name = 'Gaussian'#
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.

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

mantidimaging.core.operations.gaussian.gaussian.modes()[source]#