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:
Resels
- __init__(resels=None, fwhm=None, **keywords)¶
Initialize resel image
- Parameters:
- reselscore.api.Image
Image of resel per voxel values.
- fwhmcore.api.Image
Image of FWHM values.
- keywords
dict
Passed as keywords arguments to core.api.Image
- fwhm2resel(fwhm)¶
Convert FWHM fwhm to equivalent reseels per voxel
- Parameters:
- fwhmfloat
Convert an FWHM value to an equivalent resels per voxel based on step sizes in self.coordmap.
- Returns:
- reselsfloat
- integrate(mask=None)¶
Integrate resels within mask (or use self.mask)
- Parameters:
- mask
Image
Optional mask over which to integrate (add) resels.
- mask
- Returns:
- total_resels
the resels contained in the mask
- FWHMfloat
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:
- reselsfloat
Convert a resel value to an equivalent isotropic FWHM based on step sizes in self.coordmap.
- Returns:
- fwhmfloat
Resels
¶
- class nipy.algorithms.fwhm.Resels(coordmap, normalized=False, fwhm=None, resels=None, mask=None, clobber=False, D=3)¶
Bases:
object
The Resels class.
- __init__(coordmap, normalized=False, fwhm=None, resels=None, mask=None, clobber=False, D=3)¶
Initialize resels class
- 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.
- coordmap
- fwhm2resel(fwhm)¶
Convert FWHM fwhm to equivalent reseels per voxel
- Parameters:
- fwhmfloat
Convert an FWHM value to an equivalent resels per voxel based on step sizes in self.coordmap.
- Returns:
- reselsfloat
- integrate(mask=None)¶
Integrate resels within mask (or use self.mask)
- Parameters:
- mask
Image
Optional mask over which to integrate (add) resels.
- mask
- Returns:
- total_resels
the resels contained in the mask
- FWHMfloat
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:
- reselsfloat
Convert a resel value to an equivalent isotropic FWHM based on step sizes in self.coordmap.
- Returns:
- fwhmfloat