class_docstr: generate randomised elastic deformations
  along each dim for data augmentation
docstr: This layer elastically deforms the inputs,
  for data-augmentation purposes.
  
  :param num_controlpoints:
  :param std_deformation_sigma:
  :param proportion_to_augment: what fraction of the images
      to do augmentation on
  :param name: name for tensorflow graph
  (may be computationally expensive).
code: def __init__(
      self,
      num_controlpoints=4,
      std_deformation_sigma=15,
      proportion_to_augment=0.5,
      spatial_rank=3,
  ):
      """
      This layer elastically deforms the inputs,
      for data-augmentation purposes.
  
      :param num_controlpoints:
      :param std_deformation_sigma:
      :param proportion_to_augment: what fraction of the images
          to do augmentation on
      :param name: name for tensorflow graph
      (may be computationally expensive).
      """
  
      super(RandomElasticDeformationLayer, self).__init__(
          name="random_elastic_deformation"
      )
  
      self._bspline_transformation = None
      self.num_controlpoints = max(num_controlpoints, 2)
      self.std_deformation_sigma = max(std_deformation_sigma, 1)
      self.proportion_to_augment = proportion_to_augment
      if not sitk:
          self.proportion_to_augment = -1
      self.spatial_rank = spatial_rank
  
file_path: NiftyNet/niftynet/layer/rand_elastic_deform.py
imports: from __future__ import absolute_import, print_function
  import warnings
  import numpy
  from niftynet.layer.base_layer import RandomisedLayer
  from niftynet.utilities.util_import import require_module
label_desc: Use image node_id 1 to create a new RandomElasticDeformationLayer object from inherited base classes: RandomisedLayer with example: obj = RandomElasticDeformationLayer(num_controlpoints, std_deformation_sigma, proportion_to_augment, spatial_rank)