class_docstr: 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.
code: def inverse_op(self, input_image, mask=None):
      if not isinstance(input_image, dict):
          # you can run the cropping op without running the padding op, but only if you
          # pad with a constant amount (not pad_to)
          if self.full_border is None and self.pad_to == (0,):
              self._set_full_border(input_image)
  
          outputs = self._crop_numpy_array(
              input_image, self.full_border
          )
          return outputs, mask
  
      for name, image in input_image.items():
          # you can run the cropping op without running the padding op, but only if you
          # pad with a constant amount (not pad_to)
          if self.full_border is None and self.pad_to == (0,):
              self._set_full_border(image)
  
          if name not in self.image_name:
              continue
          input_image[name] = self._crop_numpy_array(
              image, self.full_border
          )
      return input_image, mask
  
file_path: NiftyNet/niftynet/layer/pad.py
imports: from __future__ import absolute_import, print_function
  import numpy
  import tensorflow
  from niftynet.layer.base_layer import Layer, Invertible
label_desc: Use image node_id 3 for calling the PadLayer obj's underlying member method code with example usage: obj.inverse_op(input_image, mask) and returns: input_image,  mask, outputs,  mask