median_smooth#

UniformGrid.median_smooth(kernel_size=(3, 3, 3), scalars=None, preference='points', progress_bar=False)#

Smooth data using a median filter.

Parameters
kernel_sizelist(int) or tuple(int), optional

Length 3 list or tuple of ints : (x_size, y_size, z_size) Size of the kernel in each dimension (units of voxels). Default is a 3D median filter. If you want to do a 2D median filter, set the size to 1 in the dimension you don’t want to filter over.

scalarsstr, optional

Name of scalars to process. Defaults to currently active scalars.

preferencestr, optional

When scalars is specified, this is the preferred array type to search for in the dataset. Must be either 'point' or 'cell'.

progress_barbool, optional

Display a progress bar to indicate progress.

Returns
pyvista.UniformGrid

Uniform grid with smoothed scalars.