Index
Contents
mri_fwhm
mri_fwhm  Estimates the global Gaussian smoothness of a multiframe, volumebased data size.
Synopsis
mri_fwhm i inputvol o outputvol [flag arg]
Arguments
Required Flagged Arguments
i inputvol 
input volume 
Input data. Format must be something readable by mri_convert (eg, mgh, mgz, img, nii, nii.gz). Alternately, one can synthesize white gaussian noise with synth and synthframes in which case inputvol is used as a dimension template. 
o outputvol 
save input after smoothing 
Save input after smoothing. See also savedetended and saveunmasked. 
Optional Flagged Arguments
smoothonly 
smooth and save, do not compute fwhm (so) 
Does not attempt to compute FWHM. Smooths the input, saves to outputvol, and exists. Respects saveunmasked, but not savedetended. This allows for data sets with fewer than 10 frames to be smoothed. 
savedetended 
save input after smoothing, masking, and detrending 

saveunmasked 

Save input after smoothing and detrending, but do not mask while 
mask maskvol 
binary mask 
Compute FWHM only over voxels in the given mask. Format can be anything accepted by mri_convert. If smoothing is to be done, it will only be done inside the mask. It is strongly recommended that a masked be used (see also automask and saveunmasked). 
maskthresh absthresh 
threshold for mask (default is .5) 
Threshold mask at thresh. Default is 0.5 (ie, it expects a binary mask). 
automask rthresh 
compute mask 
Compute a mask based on a fraction (rthresh) of the global mean. If 
nerode n 
erode mask n times prior to computer fwhm 
Erode mask n times (ie, make it smaller). Occurs after any mask inversion. 
maskinv 
invert mask 
Invert mask, ie, compute FWHM only over voxels outside the given mask. 
outmask outmask 
save final mask to outmask 

ar1 ar1path 
save apatial AR1 volume 

X x.mat 
matlab4 detrending matrix 
Detrend/residualize data with the matrix in x.mat. Ie, 
detrend order 
polynomial detrending (default 0) 
Detrend data with polynomial of given order. Not with X. Note:<<BR>>if neither X nor detrend are specified, then detrending 
sqr 
compute square of input before smooething 

fwhm fwhm 
smooth by fwhm before measuring 
Smooth BY fwhm mm before estimating the fwhm. This is mainly good for 
gstd gstd 
same as fwhm but specified as the stddev 

tofwhm tofwhm 
smooth to fwhm 
Smooth TO tofwhm mm. This is idea proposed by Lee Friedman 
tofwhmtol tolerance 
smooth to fwhm +/ tol (default .5mm) 
Keep iterating the tofwhm search until the result is within tol 
tofwhmnmax nitersmax 
maximum number of iterations (default 20) 

tofwhmfile file 
save tofwhm params in file 
Save some results of the tofwhm minimization to file. Good for 
sum sumfile 
summary/log 
Prints summary to ascii sumfile. Send this file when requesting 
dat datfile 
only the final fwhm estimate 

synth 

Synthesize input with white gaussian noise. Ten frames are used by default, 
synthframes nframes 
default is 10 
Synthesize input with white gaussian noise with the given number of frames. 
nframesmin n 
require at least this many frames 

ispm 
input is spmanalyze. Set i to stem. 

in_nspmzeropad nz 
zeropadding for spmanalyze 

debug 
turn on debugging 

checkopts 
don't run anything, just check options and exit 

help 
print out information on how to use this program 

version 
print out version and exit 

Description
FreeSurfer program to estimate the global Gaussian smoothness of a multiframe, volumebased data set. The smoothness is measured as the FullWidthHalfMax (FWHM) in mm. Gaussian stddev = fwhm/sqrt(log(256.0)). The voxels used in the fwhm estimation can be constrained to be inside of a mask. It is STRONGLY recommended that a masked be used. The mask can be specified explictly or computed automatically. By default, the time course will be detrended by removing the mean. Higher order polynomial detrending is possible. Alternatively, the user can specify a detrending matrix. The data can be smoothed BY a given fwhm or TO a given fwhm prior to estimating the fwhm. The resulting data can then be saved (thus turning this program into a smoother). If smoothing is to be done, it will only be done inside the mask (except see saveunmasked).
Examples
Example 1
mri_fwhm i f.mgh automask .2 sum f.fwhm.sum
mri_fwhm i f.nii.gz automask .2 sum f.fwhm.sum
 Measure the fwhm of an input data set, compute mask automatically by thresholding input at 20% of global mean. The time series will be have its mean removed prior to computing the fwhm. Save result in a summary file (one example uses mgh format, the other gzipped NIFTI)
Example 2
 mri_fwhm i f.mgh automask .2 sum f.fwhm5.sum fwhm 5 o fsm5.mgh outmask automask.nii
Same as above, but smooth input BY 5mm fwhm first. Save the smoothed output in fsm5.mgh. Save the mask to automask.nii. Note: mask is computed on unsmoothed data.
Example 3
 mri_fwhm i f.mgh automask .2 sum f.fwhm5.sum tofwhmtol .1 tofwhm 5 o fto5.mgh
Same as above, but smooth input TO 5 +/ .1mm fwhm first. Save the smoothed output in fto5.mgh.
Bugs
None
See Also
Links
Methods Description
References
Reporting Bugs
Report bugs to < analysisbugs@nmr.mgh.harvard.edu >