niftynet.engine.sampler_linear_interpolate module¶
Generating samples by linearly combining two input images
-
class
niftynet.engine.sampler_linear_interpolate.
LinearInterpolateSampler
(reader, data_param, batch_size=10, n_interpolations=10, queue_length=10)¶ Bases:
niftynet.layer.base_layer.Layer
,niftynet.engine.image_window_buffer.InputBatchQueueRunner
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)
-
layer_op
(*args, **kwargs)¶ This function first reads two vectors, and interpolates them with self.n_interpolations mixing coefficients Location coordinates are set to np.ones for all the vectors
-