Table Of Contents

Previous topic

neurospin.utils.smoothing

Next topic

neurospin.utils.zscore

This Page

neurospin.utils.threshold

Module: neurospin.utils.threshold

This module contains the function that thresholds an image and retains only the clusters of size>smin

Author : Bertrand Thirion, 2009

Functions

nipy.neurospin.utils.threshold.threshold_scalar_image(iimage, oimage, th=0.0, smin=0, mask_image=None)
this function takes a ‘grey level’ threshold and a size threshold and gives as output an image where only the suprathreshold component of size > smin have not been thresholded out INPUT: - iimage : the path of a scalar nifti image - oimage: the path of the dcalar output nifti image - th = 0. the chose trheshold -smin=0 the cluster size threshold -mask_image=None: a mask image to determine where in image this applies if mask_image==None, the function is implied on where(image) OUTPUT: - oimage: the output image
nipy.neurospin.utils.threshold.threshold_z_image(iimage, oimage, corr=None, pval=None, smin=0, mask_image=None, method=None)
this function takes a presumably gaussian image threshold and a size threshold and gives as output an image where only the suprathreshold component of size > smin have not been thresholded out This corresponds to a one-sided classical test the null hypothesis can be take to be the standard normal or the empiricall null. INPUT: - iimage : the path of a presumably z-variate input nifti image - oimage: the path of the output image - corr=None: the correction for multiple comparison method corr can be either None or ‘bon’ (Bonferroni) or ‘fdr’ - pval=none: the disired classical p-value. the default behaviour of pval depends on corr if corr==None then pval = 0.001 else pval = 0.05 - smin=0 the cluster size threshold - mask_image=None: a mask image to determine where in image this applies if mask_image==None, the function is implied on where(image) - method=None: model of the null distribution: if method==None: standard null if method==’emp’: empirical null OUTPUT: - oimage: the output image