Previous topic

medpy.filter.noise.separable_convolution

Next topic

medpy.filter.utilities.intersection

This Page

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:

img : ndarray

The image to apply the function fun to.

fun : function

A image modification function.

dim : integer

The dimension along which to apply the function.

Returns:

output : ndarray

The result of the operation over the image img.

Notes

With *args and **kwargs, arguments can be passed to the function fun.