NIPY logo

Site Navigation

NIPY Community

Table Of Contents

This Page

neurospin.utils.smoothing

Module: neurospin.utils.smoothing

Routine for smoothing data using diffusion on graphs. Works well only for small kernels.

Note that this is not useful for regular grids, where direct application of smoothing kernels is much faster. But the idea might be kept to perform smoothing on irregular structures (meshes).

Author : Bertrand Thirion, 2006-2009

nipy.neurospin.utils.smoothing.cartesian_smoothing(ijk, data, sigma)
Smoothing data on a(n uncomplete) cartesian grid
Parameters:

ijk : array od shape(nvox,3) list of the positions

it is typically returned by (array(np.where())).T data :array of shape (ijk.shape[0],d) where d is the datas dimension

data sampled on the grid

sigma : the kernel parameter

Returns:

data, which is the smoothed data :

fixme : in-place change of data ?