mantidimaging.core.operations.remove_stripe.stripe_removal module¶
- class mantidimaging.core.operations.remove_stripe.stripe_removal.StripeRemovalFilter[source]¶
Bases:
BaseFilter
Stripe and ring artifact removal operations wrapped from TomoPy.
Source: https://tomopy.readthedocs.io/en/latest/api/tomopy.prep.stripe.html
Intended to be used on: Sinograms
When: If stripes artifacts are present that have not been removed with outliers + flat-fielding the projections
Caution: Horizontal stripes caused by changes in image intensity (pixel values) should be fixed by ROI Normalisation instead!
- static execute_wrapper(value_filter_type=None, value_wf_level=None, value_wf_wname=None, value_wf_sigma=None, value_ti_nblock=None, value_ti_alpha=None, value_sf_size=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, wf=None, ti=None, sf=None, cores=None, chunksize=None, progress=None)[source]¶
Execute stripe removal operations.
Multiple operations can be executed, if they are specified on the command line.
The order for that execution will always be: wavelet-fourier, Titarenko, smoothing-filter.
- Parameters:
images – Sample data which is to be processed. Expected in radiograms
wf –
Specify parameters for the wavelet-fourier filter. Acceptable keywords are:
- level (default None, type int, optional parameter)
Number of discrete wavelet transform levels.
- wname (default ‘db5’, type str, optional parameter)
Type of the wavelet filter. ‘haar’, ‘db5’, ‘sym5’.
- sigma (default 2, type float, optional parameter)
Damping parameter in Fourier space.
- pad (default True, type bool, optional parameter)
If True, extend the size of the sinogram by padding with zeros.
ti –
Specify parameters for the Titarenko filter. Acceptable keywords are:
nblock (default:0, int, optional) Number of blocks.
alpha (default: 1.5, int, optional) Damping factor.
sf –
Specify parameters for the smoothing-filter. Acceptable keywords are:
- size (default: 5, int, optional)
Size of the smoothing filter.
- Returns:
Processed data
- filter_name = 'Stripe Removal'¶
- static group_name() FilterGroup [source]¶
- link_histograms = True¶
- 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