niftynet.layer.pad module

class niftynet.layer.pad.PadLayer(image_name, border, name='pad')

Bases: niftynet.layer.base_layer.Layer, niftynet.layer.base_layer.Invertible

This class defines a padding operation: pad 2*border pixels from spatial dims of the input (numpy array), and return the padded input.

inverse_op(input_image, mask=None)
layer_op(input_image, mask=None)
niftynet.layer.pad.match_ndim(border, image_ndim)