class_docstr: This class reads two feature vectors from files (often generated
  by running feature extractors on images in advance)
  and returns n linear combinations of the vectors.
  The coefficients are generated by::
  
      np.linspace(0, 1, n_interpolations)
code: def __init__(
      self,
      reader,
      window_sizes,
      batch_size=10,
      n_interpolations=10,
      queue_length=10,
      name="linear_interpolation_sampler",
  ):
      ImageWindowDataset.__init__(
          self,
          reader,
          window_sizes=window_sizes,
          batch_size=batch_size,
          queue_length=queue_length,
          shuffle=False,
          epoch=1,
          smaller_final_batch_mode="drop",
          name=name,
      )
      self.n_interpolations = n_interpolations
      # only try to use the first spatial shape available
      image_spatial_shape = list(self.reader.shapes.values())[0][:3]
      self.window.set_spatial_shape(image_spatial_shape)
      tf.logging.info(
          "initialised linear interpolation sampler %s ",
          self.window.shapes,
      )
      assert not self.window.has_dynamic_shapes, (
          "dynamic shapes not supported, please specify "
          "spatial_window_size = (1, 1, 1)"
      )
  
file_path: NiftyNet/niftynet/engine/sampler_linear_interpolate_v2.py
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import tensorflow
  from niftynet.engine.image_window_dataset import ImageWindowDataset
  from niftynet.engine.image_window import N_SPATIAL, LOCATION_FORMAT
label_desc: Use image node_id 1 to create a new LinearInterpolateSampler object from inherited base classes: ImageWindowDataset with example: obj = LinearInterpolateSampler(reader, window_sizes, batch_size, n_interpolations, queue_length, name)