class_docstr: This class generates samples by uniformly sampling each input volume
  currently the coordinates are randomised for spatial dims only,
  i.e., the first three dims of image.
  
  This layer can be considered as a "random cropping" layer of the
  input image.
code: def __init__(
      self,
      reader,
      window_sizes,
      batch_size=1,
      windows_per_image=1,
      queue_length=10,
      name="uniform_sampler_v2",
  ):
      ImageWindowDataset.__init__(
          self,
          reader=reader,
          window_sizes=window_sizes,
          batch_size=batch_size,
          windows_per_image=windows_per_image,
          queue_length=queue_length,
          shuffle=True,
          epoch=-1,
          smaller_final_batch_mode="drop",
          name=name,
      )
  
      tf.logging.info(
          "initialised uniform sampler %s ", self.window.shapes
      )
      self.window_centers_sampler = rand_spatial_coordinates
  
file_path: NiftyNet/niftynet/engine/sampler_uniform_v2.py
imports: from __future__ import absolute_import, division, print_function
  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 UniformSampler object from inherited base classes: ImageWindowDataset with example: obj = UniformSampler(reader, window_sizes, batch_size, windows_per_image, queue_length, name)