NIPY logo

Site Navigation

NIPY Community

Table Of Contents

Previous topic

algorithms.diagnostics.tsdiffplot

This Page

algorithms.fwhm

Module: algorithms.fwhm

Inheritance diagram for nipy.algorithms.fwhm:

This module provides classes and definitions for using full width at half maximum (FWHM) to be used in conjunction with Gaussian Random Field Theory to determine resolution elements (resels).

A resolution element (resel) is defined as a block of pixels of the same size as the FWHM of the smoothed image.

There are two methods implemented to estimate (3d, or volumewise) FWHM based on a 4d Image:

fastFHWM: used if the entire 4d Image is available iterFWHM: used when 4d Image is being filled in by slices of residuals

Classes

ReselImage

class nipy.algorithms.fwhm.ReselImage(resels=None, fwhm=None, **keywords)

Bases: nipy.algorithms.fwhm.Resels

__init__(resels=None, fwhm=None, **keywords)
Parameters :
resels : core.api.Image

Image of resel per voxel values.

fwhm : core.api.Image

Image of FWHM values.

keywords : dict

Passed as keywords arguments to core.api.Image

fwhm2resel(fwhm)
Parameters :
fwhm : float

Convert an FWHM value to an equivalent resels per voxel based on step sizes in self.coordmap.

Returns :

resels

integrate(mask=None)
Parameters :
mask : Image

Optional mask over which to integrate (add) resels.

Returns :

(total_resels, FWHM, nvoxel)

total_resels: the resels contained in the mask FWHM: an estimate of FWHM based on the average resel per voxel nvoxel: the number of voxels in the mask

resel2fwhm(resels)
Parameters :
resels : float

Convert a resel value to an equivalent isotropic FWHM based on step sizes in self.coordmap.

Returns :

FWHM

Resels

class nipy.algorithms.fwhm.Resels(coordmap, normalized=False, fwhm=None, resels=None, mask=None, clobber=False, D=3)

Bases: object

The Resels class.

Methods

fwhm2resel
integrate
resel2fwhm
__init__(coordmap, normalized=False, fwhm=None, resels=None, mask=None, clobber=False, D=3)
Parameters :
coordmap : CoordinateMap

CoordinateMap over which fwhm and resels are to be estimated. Used in fwhm/resel conversion.

fwhm : Image

Optional Image of FWHM. Used to convert FWHM Image to resels if FWHM is not being estimated.

resels : Image

Optional Image of resels. Used to compute resels within a mask, for instance, if FWHM has already been estimated.

mask : Image

Mask over which to integrate resels.

clobber : bool

Clobber output FWHM and resel images?

D : int

Can be 2 or 3, the dimension of the final volume.

fwhm2resel(fwhm)
Parameters :
fwhm : float

Convert an FWHM value to an equivalent resels per voxel based on step sizes in self.coordmap.

Returns :

resels

integrate(mask=None)
Parameters :
mask : Image

Optional mask over which to integrate (add) resels.

Returns :

(total_resels, FWHM, nvoxel)

total_resels: the resels contained in the mask FWHM: an estimate of FWHM based on the average resel per voxel nvoxel: the number of voxels in the mask

resel2fwhm(resels)
Parameters :
resels : float

Convert a resel value to an equivalent isotropic FWHM based on step sizes in self.coordmap.

Returns :

FWHM