mantidimaging.core.operations.circular_mask.circular_mask module

class mantidimaging.core.operations.circular_mask.circular_mask.CircularMaskFilter[source]

Bases: BaseFilter

Masks a circular area around the center of the image, by setting it to a specified value.

Intended to be used on: Reconstructed slices

When: To remove reconstruction artifacts on the outer edge of the image.

Caution: Ensure that the radius does not mask data from the sample.

static execute_wrapper(radius_field=None, value_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: Images, circular_mask_ratio=0.95, circular_mask_value=0.0, cores=None, progress=None) Images[source]
  • data – Input data as a 3D numpy.ndarray

  • circular_mask_ratio – The ratio to the full image. The ratio must be 0 < ratio < 1

  • circular_mask_value – The value that all pixels in the mask will be set to.


The processed 3D numpy.ndarray

filter_name = 'Circular Mask'
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