niftynet.layer.pad module¶
-
class
PadLayer
(image_name, border, name='pad', mode='minimum')[source]¶ 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.
This function is used at volume level (as a preprocessor in image reader) therefore assumes the input has at least three spatial dims.