niftynet.engine.sampler_resize module¶
Resize input image as output window.
-
class
ResizeSampler
(reader, data_param, batch_size, spatial_window_size=(), windows_per_image=1, shuffle_buffer=True, queue_length=10)[source]¶ Bases:
niftynet.layer.base_layer.Layer
,niftynet.engine.image_window_buffer.InputBatchQueueRunner
This class generates samples by rescaling the whole image to the desired size currently 5D input is supported:
Height x Width x Depth x time x Modality
-
layer_op
(*args, **kwargs)[source]¶ This function generates sampling windows to the input buffer image data are from
self.reader()
.It first completes window shapes based on image data, then resize each image as window and output a dictionary (required by input buffer)
Returns: output data dictionary {placeholders: data_array}
-