niftynet.layer.approximated_smoothing module

gaussian_1d(sigma, truncated=3.0)[source]
cauchy_1d(sigma, truncated=5.0)[source]
class SmoothingLayer(sigma=1, truncate=3.0, type_str='gaussian')[source]

Bases: niftynet.layer.base_layer.Layer

computing 1d convolution one each spatial dimension of the input using one-dimensional filter.

__init__(sigma=1, truncate=3.0, type_str='gaussian')[source]
  • sigma – standard deviation
  • truncate – Truncate the filter at this many standard deviations
  • type_str – type of kernels
Parameters:image – in shape (batch, x[, y, z], feature_channels)
Returns:spatially smoothed image