Applies a Gaussian filter to the input volume using scipy.ndimage.gaussian_filter or dask_image.ndfilters.gaussian_filter.
Args:
vol (np.ndarray): The input image or volume.
sigma (float or sequence of floats): The standard deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes.
dask (bool, optional): Whether to use Dask for the Gaussian filter.
chunks (int or tuple or "'auto'", optional): Defines how to divide the array into blocks when using Dask. Can be an integer, tuple, size in bytes, or "auto" for automatic sizing.
*args (Any): Additional positional arguments for the Gaussian filter.
Applies a median filter to the input volume using scipy.ndimage.median_filter or dask_image.ndfilters.median_filter.
Args:
vol (np.ndarray): The input image or volume.
size (scalar or tuple, optional): Either size or footprint must be defined. size gives the shape that is taken from the input array, at every element position, to define the input to the filter function.
footprint (np.ndarray, optional): Boolean array that specifies (implicitly) a shape, but also which of the elements within this shape will get passed to the filter function.
dask (bool, optional): Whether to use Dask for the median filter.
chunks (int or tuple or "'auto'", optional): Defines how to divide the array into blocks when using Dask. Can be an integer, tuple, size in bytes, or "auto" for automatic sizing.
**kwargs (Any): Additional keyword arguments for the median filter.
Returns:
filtered_vol (np.ndarray): The filtered image or volume.
Raises:
RuntimeError: If neither size nor footprint is defined
"""
ifsizeisNone:
iffootprintisNone:
raiseRuntimeError("no footprint or filter size provided")
Applies a maximum filter to the input volume using scipy.ndimage.maximum_filter or dask_image.ndfilters.maximum_filter.
Args:
vol (np.ndarray): The input image or volume.
size (scalar or tuple, optional): Either size or footprint must be defined. size gives the shape that is taken from the input array, at every element position, to define the input to the filter function.
footprint (np.ndarray, optional): Boolean array that specifies (implicitly) a shape, but also which of the elements within this shape will get passed to the filter function.
dask (bool, optional): Whether to use Dask for the maximum filter.
chunks (int or tuple or "'auto'", optional): Defines how to divide the array into blocks when using Dask. Can be an integer, tuple, size in bytes, or "auto" for automatic sizing.
**kwargs (Any): Additional keyword arguments for the maximum filter.
Returns:
filtered_vol (np.ndarray): The filtered image or volume.
Raises:
RuntimeError: If neither size nor footprint is defined
"""
ifsizeisNone:
iffootprintisNone:
raiseRuntimeError("no footprint or filter size provided")
Applies a minimum filter to the input volume using scipy.ndimage.minimum_filter or dask_image.ndfilters.minimum_filter.
Args:
vol (np.ndarray): The input image or volume.
size (scalar or tuple, optional): Either size or footprint must be defined. size gives the shape that is taken from the input array, at every element position, to define the input to the filter function.
footprint (np.ndarray, optional): Boolean array that specifies (implicitly) a shape, but also which of the elements within this shape will get passed to the filter function.
dask (bool, optional): Whether to use Dask for the minimum filter.
chunks (int or tuple or "'auto'", optional): Defines how to divide the array into blocks when using Dask. Can be an integer, tuple, size in bytes, or "auto" for automatic sizing.
**kwargs (Any): Additional keyword arguments for the minimum filter.
Returns:
filtered_vol (np.ndarray): The filtered image or volume.
Raises:
RuntimeError: If neither size nor footprint is defined
"""
ifsizeisNone:
iffootprintisNone:
raiseRuntimeError("no footprint or filter size provided")