etspy.base.TomoStack.filter(method: 'median' | 'bpf' | 'both' | 'sobel' = 'median', size: int = 5, taper: float = 0.1) TomoStack[source]

Apply one of several image filters to an entire TomoStack.

Parameters:
method: 'median' | 'bpf' | 'both' | 'sobel' = 'median'

Type of filter to apply. Must be 'median', 'bpf', 'both', or 'sobel'.

size: int = 5

Size of filtering neighborhood.

taper: float = 0.1

Fraction of image size to pad to the mean.

Returns:

filtered – Filtered copy of the input stack

Return type:

TomoStack

Examples

>>> import etspy.datasets as ds
>>> stack = ds.get_needle_data()
>>> filtered = stack.filter(method='median')