niftynet.engine.sampler_resize_v2 module¶
Resize input image as output window.
-
class
ResizeSampler
(reader, window_sizes, batch_size=1, spatial_window_size=None, windows_per_image=1, shuffle=True, queue_length=10, smaller_final_batch_mode='pad', name='resize_sampler_v2')[source]¶ Bases:
niftynet.engine.image_window_dataset.ImageWindowDataset
This class generates samples by rescaling the whole image to the desired size Assuming the reader’s output is 5d:
Height x Width x Depth x time x Modality
-
layer_op
(idx=None)[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 {'image_modality': data_array}
-