class_docstr: This class generators 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.
class_docstr_tok: ["This","class","generators","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,
      data_param,
      batch_size,
      windows_per_image,
      constraint,
      random_windows_per_image=0,
      queue_length=10,
  ):
      UniformSampler.__init__(
          self,
          reader=reader,
          data_param=data_param,
          batch_size=batch_size,
          windows_per_image=windows_per_image,
          queue_length=queue_length,
      )
      self.constraint = constraint
      self.n_samples_rand = random_windows_per_image
      self.spatial_coordinates_generator = (
          self.selective_spatial_coordinates()
      )
      tf.logging.info("initialised selective sampling")
  
file_path: NiftyNet/niftynet/contrib/segmentation_selective_sampler/sampler_selective.py
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import tensorflow
  from scipy import ndimage
  from scipy.signal import fftconvolve
  from niftynet.engine.image_window import N_SPATIAL
  from niftynet.engine.sampler_uniform_v2 import UniformSampler
label_desc: Use image node_id 1 to create a new SelectiveSampler object from inherited base classes: UniformSampler with example: obj = SelectiveSampler(reader, data_param, batch_size, windows_per_image, constraint, random_windows_per_image, queue_length)