def apply_filter(data, filter_type='gaussian'):

    if filter_type == 'gaussian':
        print '\nApply a Gaussian filter...'
        sigma = 1 # standard deviation for Gaussian kernel
        data_filtered = scipy.ndimage.filters.gaussian_filter(data, sigma)
    return data_filtered
Apply the chosen filter to the image
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/dev/sct_apply_local_filter.py/apply_filter