class_docstr: This layer applies a small random (per-iteration) affine
  transformation to an image. The distribution of transformations
  generally results in scaling the image up, with minimal sampling
  outside the original image.
class_docstr_tok: ["This","layer","applies","a","small","random","(","per-iteration",")","affine","transformation","to","an","image",".","The","distribution","of","transformations","generally","results","in","scaling","the","image","up",",","with","minimal","sampling","outside","the","original","image","."]
docstr: :param scale: how extreme the perturbation is, with 0. meaning
      no perturbation and 1.0 giving largest perturbations.
  :param interpolation: the image value interpolation used by
      the resampling.
  :param boundary: the boundary handling used by the resampling
  :param name: string name of the layer.
docstr_tok: [":","param","scale",":","how","extreme","the","perturbation","is",",","with","0.","meaning","no","perturbation","and","1.0","giving","largest","perturbations",".",":","param","interpolation",":","the","image","value","interpolation","used","by","the","resampling",".",":","param","boundary",":","the","boundary","handling","used","by","the","resampling",":","param","name",":","string","name","of","the","layer","."]
code: def __init__(
      self,
      scale,
      interpolation="linear",
      boundary="zero",
      transform=None,
      name="AffineAugmentation",
  ):
      """
  
      :param scale: how extreme the perturbation is, with 0. meaning
          no perturbation and 1.0 giving largest perturbations.
      :param interpolation: the image value interpolation used by
          the resampling.
      :param boundary: the boundary handling used by the resampling
      :param name: string name of the layer.
      """
      Layer.__init__(self, name=name)
  
      self.scale = min(max(float(scale), 0.0), 1.0)
      self.interpolation = interpolation
      self.boundary = boundary
  
      self._transform = None
      if transform is not None:
          self._transform = transform
  
file_path: NiftyNet/niftynet/layer/affine_augmentation.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer.base_layer import Layer
  from niftynet.layer.grid_warper import AffineGridWarperLayer
  from niftynet.layer.layer_util import infer_spatial_rank
  from niftynet.layer.resampler import ResamplerLayer
label_desc: Use image node_id 1 to create a new AffineAugmentationLayer object from inherited base classes: Layer with example: obj = AffineAugmentationLayer(scale, interpolation, boundary, transform, name)