niftynet.engine.sampler_random_vector module

Generating sample arrays from random distributions

class niftynet.engine.sampler_random_vector.RandomVectorSampler(names=('vector', ), vector_size=(100, ), batch_size=10, n_interpolations=10, mean=0.0, stddev=1.0, repeat=1, queue_length=10)

Bases: niftynet.layer.base_layer.Layer, niftynet.engine.image_window_buffer.InputBatchQueueRunner

This class generates two samples from the standard normal distribution. These two samples are mixed with n mixing coefficients. The coefficients are generated by np.linspace(0, 1, n_interpolations)

layer_op(*args, **kwargs)

This function first draws two samples, and interpolates them with self.n_interpolations mixing coefficients Location coordinates are set to np.ones for all the vectors