class_docstr: This class keeps record of the currently cached image,
  initialised as all zeros, and the values are replaced
  by image window data decoded from batch.
class_docstr_tok: ["This","class","keeps","record","of","the","currently","cached","image",",","initialised","as","all","zeros",",","and","the","values","are","replaced","by","image","window","data","decoded","from","batch","."]
docstr: For all the outputs to be saved as images, go through the dictionary
  and save the resulting output after reversing the initial preprocessing
  :return:
docstr_tok: ["For","all","the","outputs","to","be","saved","as","images",",","go","through","the","dictionary","and","save","the","resulting","output","after","reversing","the","initial","preprocessing",":","return",":"]
code: def _save_current_image(self):
      """
      For all the outputs to be saved as images, go through the dictionary
      and save the resulting output after reversing the initial preprocessing
      :return:
      """
      if self.input_image is None:
          return
      for layer in reversed(self.reader.preprocessors):
          if isinstance(layer, PadLayer):
              for i in self.image_out:
                  self.image_out[i], _ = layer.inverse_op(
                      self.image_out[i]
                  )
          if isinstance(layer, DiscreteLabelNormalisationLayer):
              for i in self.image_out:
                  self.image_out[i], _ = layer.inverse_op(
                      self.image_out[i]
                  )
      subject_name = self.reader.get_subject_id(self.image_id)
      for i in self.image_out:
          filename = "{}_{}_{}.nii.gz".format(
              i, subject_name, self.postfix
          )
          source_image_obj = self.input_image[self.name]
          misc_io.save_data_array(
              self.output_path,
              filename,
              self.image_out[i],
              source_image_obj,
              self.output_interp_order,
          )
          self.log_inferred(subject_name, filename)
      return
  
file_path: NiftyNet/niftynet/engine/windows_aggregator_grid.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
  from niftynet.layer.discrete_label_normalisation import DiscreteLabelNormalisationLayer
  from niftynet.layer.pad import PadLayer
label_desc: Use image node_id 5 for calling the GridSamplesAggregator obj's underlying member method code with example usage: obj._save_current_image() without return types