priors.nlmeans

Contents

priors.nlmeans#

bartorch.priors.nlmeans()#

Non-local means filter along axes.

Each voxel becomes sum_j w_ij y_j / sum_j w_ij over the j within patch_distance of it along every axis in axes, with w_ij = exp(-sum_o g_o |y_(i+o) - y_(j+o)|^2 / (2 h^2 ||g||_2)): o runs over a patch of patch_length per axis and g is a Gaussian of standard deviation a over it. The image is reflected at its edges.

Parameters:
  • patch_length (int, default=None) – Odd patch length per axis; BART’s default is 5.

  • patch_distance (int, default=None) – Search radius per axis; BART’s default is 5. Zero returns input.

  • h (float, default=None) – Filter strength in the units of input’s values; BART’s default is 0.04. A large h makes the filter a box mean.

  • a (float, default=None) – Standard deviation of g, in voxels; BART’s default is (patch_length - 1) / 4.