medpy.filter.utilities.xminus1d#
- medpy.filter.utilities.xminus1d(img, fun, dim, *args, **kwargs)[source]#
Applies the function fun along all X-1D dimensional volumes of the images img dimension dim.
E.g. you want to apply a gauss filter to each slice of a 3D MRI brain image, simply supply the function as fun, the image as img and the dimension along which to iterate as dim.
- Parameters:
- imgndarray
The image to apply the function
fun
to.- funfunction
A image modification function.
- diminteger
The dimension along which to apply the function.
- Returns:
- outputndarray
The result of the operation over the image
img
.
Notes
With
*args
and**kwargs
, arguments can be passed to the functionfun
.