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)[source]¶ Bases:
nipy.algorithms.fwhm.Resels-
__init__(resels=None, fwhm=None, **keywords)[source]¶ Initialize resel image
- Parameters
resels : core.api.Image
Image of resel per voxel values.
fwhm : core.api.Image
Image of FWHM values.
keywords :
dictPassed as keywords arguments to core.api.Image
-
fwhm2resel(fwhm)¶ Convert FWHM fwhm to equivalent reseels per voxel
- Parameters
fwhm : float
Convert an FWHM value to an equivalent resels per voxel based on step sizes in self.coordmap.
- Returns
resels : float
-
integrate(mask=None)¶ Integrate resels within mask (or use self.mask)
- Parameters
mask :
ImageOptional mask over which to integrate (add) resels.
- Returns
total_resels :
the resels contained in the mask
FWHM : float
an estimate of FWHM based on the average resel per voxel
nvoxel: int
the number of voxels in the mask
-
resel2fwhm(resels)¶ Convert resels as resels to isotropic FWHM
- Parameters
resels : float
Convert a resel value to an equivalent isotropic FWHM based on step sizes in self.coordmap.
- Returns
fwhm : float
-
Resels¶
-
class
nipy.algorithms.fwhm.Resels(coordmap, normalized=False, fwhm=None, resels=None, mask=None, clobber=False, D=3)[source]¶ Bases:
objectThe Resels class.
-
__init__(coordmap, normalized=False, fwhm=None, resels=None, mask=None, clobber=False, D=3)[source]¶ Initialize resels class
- Parameters
coordmap :
CoordinateMapCoordinateMap over which fwhm and resels are to be estimated. Used in fwhm/resel conversion.
fwhm :
ImageOptional Image of FWHM. Used to convert FWHM Image to resels if FWHM is not being estimated.
resels :
ImageOptional Image of resels. Used to compute resels within a mask, for instance, if FWHM has already been estimated.
mask :
ImageMask over which to integrate resels.
clobber :
boolClobber output FWHM and resel images?
D :
intCan be 2 or 3, the dimension of the final volume.
-
integrate(mask=None)[source]¶ Integrate resels within mask (or use self.mask)
- Parameters
mask :
ImageOptional mask over which to integrate (add) resels.
- Returns
total_resels :
the resels contained in the mask
FWHM : float
an estimate of FWHM based on the average resel per voxel
nvoxel: int
the number of voxels in the mask
-