code: def _extract_shifted_mean_gauss(image, mask = slice(None), offset = None, sigma = 1, voxelspacing = None):
          
      # set voxel spacing
      if voxelspacing is None:
          voxelspacing = [1.] * image.ndim
      # set offset
      if offset is None:
          offset = [0] * image.ndim
      
      # determine gaussian kernel size in voxel units
      sigma = _create_structure_array(sigma, voxelspacing)
      
      # compute smoothed version of image
      smoothed = gaussian_filter(image, sigma)
      
      shifted = numpy.zeros_like(smoothed)
      in_slicer = []
      out_slicer = []
      for o in offset:
          in_slicer.append(slice(o, None))
          out_slicer.append(slice(None, -1 * o))
      shifted[out_slicer] = smoothed[in_slicer]
      
      return _extract_intensities(shifted, mask)
docs: Internal, single-image version of `shifted_mean_gauss`.