niftynet.engine.windows_aggregator_identity module¶
windows aggregator saves each item in a batch output as an image
-
class
niftynet.engine.windows_aggregator_identity.
WindowAsImageAggregator
(image_reader=None, output_path='./output')¶ Bases:
niftynet.engine.windows_aggregator_base.ImageWindowsAggregator
This class saves each item in a batch output to images, the output filenames can be defined in three ways:
- location is None (input image from a random distribution):
- a uuid is generated as output filename
- the length of the location array is 2:
- (indicates output image is from an interpolation of two input images): location[batch_id, 0] is used as a base_name, location[batch_id, 0] is used as a relative_id output file name is “{}_{}”%(base_name, relative_id)
- the length of the locaiton array is greater than 2:
- (indicates output image is from single input image) location[batch_id, 0] is used as the file_name
-
decode_batch
(window, location=None)¶