class_docstr: This class saves each item in a batch output to images,
  the output filenames can be defined in three ways:
  
      1. location is None (input image from a random distribution):
      a uuid is generated as output filename.
  
      2. 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)``.
  
      3. the length of the location array is greater than 2:
      (indicates output image is from single input image)
      ``location[batch_id, 0]`` is used as the file name
class_docstr_tok: ["This","class","saves","each","item","in","a","batch","output","to","images",",","the","output","filenames","can","be","defined","in","three","ways",":","1.","location","is","None","(","input","image","from","a","random","distribution",")",":","a","uuid","is","generated","as","output","filename",".","2.","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",")","``",".","3.","the","length","of","the","location","array","is","greater","than","2",":","(","indicates","output","image","is","from","single","input","image",")","``","location","[","batch_id",",","0","]","``","is","used","as","the","file","name"]
code: def __init__(
      self,
      image_reader=None,
      output_path=os.path.join(".", "output"),
      postfix="_niftynet_generated",
  ):
      ImageWindowsAggregator.__init__(
          self, image_reader=image_reader, output_path=output_path
      )
      self.output_path = os.path.abspath(output_path)
      self.inferred_csv = os.path.join(self.output_path, "inferred.csv")
      self.output_id = {"base_name": None, "relative_id": 0}
      self.postfix = postfix
      if os.path.exists(self.inferred_csv):
          os.remove(self.inferred_csv)
  
file_path: NiftyNet/niftynet/engine/windows_aggregator_identity.py
imports: from __future__ import absolute_import, division, print_function
  import os
  from collections import OrderedDict
  import numpy
  import pandas
  import niftynet.io.misc_io
  from niftynet.engine.windows_aggregator_base import ImageWindowsAggregator
label_desc: Use image node_id 1 to create a new WindowAsImageAggregator object from inherited base classes: ImageWindowsAggregator with example: obj = WindowAsImageAggregator(image_reader, output_path, postfix)