niftynet.engine.windows_aggregator_base module¶
This module is used to cache window-based network outputs, form a image-level output, write the cached the results to hard drive.
-
class
ImageWindowsAggregator
(image_reader=None, output_path='.')[source]¶ Bases:
object
Image windows are retrieved and analysed by the tensorflow graph, this windows aggregator receives output window data in numpy array. To access image-level information the reader is needed.
-
input_image
¶ Get the corresponding input image of these batch data. So that the batch data can be stored correctly in terms of interpolation order, orientation, pixdims.
Returns: an image object from image reader
-
image_id
¶ Index of the image in the output image list maintained by image reader.
Returns: integer of the position in image list
-
decode_batch
(*args, **kwargs)[source]¶ The implementation of caching and writing batch output goes here. This function should return False when the location vector is stopping signal, to notify the inference loop to terminate.
Parameters: - args –
- kwargs –
Returns: True if more batch data are expected, False otherwise
-