niftynet.engine.windows_aggregator_resize module

Windows aggregator resize each item in a batch output and save as an image.

class ResizeSamplesAggregator(image_reader, name='image', output_path='./output', window_border=(), interp_order=0, postfix='niftynet_out')[source]

Bases: niftynet.engine.windows_aggregator_base.ImageWindowsAggregator

This class decodes each item in a batch by resizing each image window and save as a new image volume. Multiple output image can be proposed and csv output can be performed as well

decode_batch(window, location)[source]

Resizing each output image window in the batch as an image volume location specifies the original input image (so that the interpolation order, original shape information retained in the

generated outputs).For the fields that have the keyword ‘window’ in the dictionary key, it will be saved as image. The rest will be saved as csv. CSV files will contain at saving a first line of 0 (to be changed into the header by the user), the first column being the index of the window, followed by the list of output.