class_docstr: The rescaled field grid warper defines a grid based on
  sampling coordinate values from a spatially varying displacement
  field  (passed as a tensor input) along a regular cartesian grid
  pattern aligned with the field. Specifically, this class defines
  a grid by resampling the field (using tf.rescale_images with
  align_corners=False) to the output_shape.
class_docstr_tok: ["The","rescaled","field","grid","warper","defines","a","grid","based","on","sampling","coordinate","values","from","a","spatially","varying","displacement","field","(","passed","as","a","tensor","input",")","along","a","regular","cartesian","grid","pattern","aligned","with","the","field",".","Specifically",",","this","class","defines","a","grid","by","resampling","the","field","(","using","tf.rescale_images","with","align_corners=False",")","to","the","output_shape","."]
docstr: Constructs an RescaledFieldImageGridWarperLayer.
  Args:
    source_shape: Iterable of integers determining the size of the source
      signal domain.
    output_shape: Iterable of integers determining the size of the destination
      resampled signal domain.
    coeff_shape: Shape of displacement field.
    interpolation: type_str of interpolation as used by tf.image.resize_images
    name: Name of Module.
docstr_tok: ["Constructs","an","RescaledFieldImageGridWarperLayer",".","Args",":","source_shape",":","Iterable","of","integers","determining","the","size","of","the","source","signal","domain",".","output_shape",":","Iterable","of","integers","determining","the","size","of","the","destination","resampled","signal","domain",".","coeff_shape",":","Shape","of","displacement","field",".","interpolation",":","type_str","of","interpolation","as","used","by","tf.image.resize_images","name",":","Name","of","Module","."]
code: def __init__(
      self,
      source_shape,
      output_shape,
      coeff_shape,
      interpolation=tf.image.ResizeMethod.BICUBIC,
      name="rescaling_interpolated_spline_grid_warper_layer",
  ):
      """Constructs an RescaledFieldImageGridWarperLayer.
      Args:
        source_shape: Iterable of integers determining the size of the source
          signal domain.
        output_shape: Iterable of integers determining the size of the destination
          resampled signal domain.
        coeff_shape: Shape of displacement field.
        interpolation: type_str of interpolation as used by tf.image.resize_images
        name: Name of Module.
  
      """
      self._interpolation = interpolation
      if self._interpolation == "LINEAR":
          self._interpolation = tf.image.ResizeMethod.BILINEAR
      elif self._interpolation == "CUBIC":
          self._interpolation = tf.image.ResizeMethod.BICUBIC
  
      super(RescaledFieldImageGridWarperLayer, self).__init__(
          source_shape=source_shape,
          output_shape=output_shape,
          coeff_shape=coeff_shape,
          name=name,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from niftynet.layer.grid_warper import GridWarperLayer
  from niftynet.layer.resampler import ResamplerLayer
label_desc: Use image node_id 1 to create a new RescaledFieldImageGridWarperLayer object from inherited base classes: GridWarperLayer with example: obj = RescaledFieldImageGridWarperLayer(source_shape, output_shape, coeff_shape, interpolation, name)