mrpro.utils.filters.uniform_filter

mrpro.utils.filters.uniform_filter(x: Tensor, width: int | Sequence[int] | Tensor, dim: int | Sequence[int] | None = None, pad_mode: Literal['constant', 'reflect', 'replicate', 'circular'] = 'constant', pad_value: float = 0.0) Tensor[source]

Apply a and-uniform filter.

Parameters:
  • x – Tensor to filter

  • width – Width of uniform kernel. If iterable, must have length equal to the number of axes.

  • dim – Axis or axes to filter over. If None, filters over all axes.

  • pad_mode – Padding mode

  • pad_value – Padding value for pad_mode = constant