niftynet.layer.crop module

class niftynet.layer.crop.CropLayer(border, name='crop')

Bases: niftynet.layer.base_layer.Layer

This class defines a cropping operation: Removing 2*border pixels from each spatial dim of the input, and return the spatially centred elements extracted from the input.

This function is implemented with a convolution in the valid mode with a trivial kernel

layer_op(inputs)