class_docstr: 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
class_docstr_tok: ["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"]
docstr: 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.
docstr_tok: ["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","."]
code: def decode_batch(self, window, location):
      """
      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.
  
      """
      n_samples = location.shape[0]
      for batch_id in range(n_samples):
          if self._is_stopping_signal(location[batch_id]):
              return False
          self.image_id = location[batch_id, 0]
          self.image_out, self.csv_out = {}, {}
          for key in window:
              if "window" in key:
                  # saving image output
                  while window[key].ndim < 5:
                      window[key] = window[key][..., np.newaxis, :]
                  self.image_out[key] = window[key][batch_id, ...]
              else:
                  # saving csv output
                  window[key] = np.asarray(window[key]).reshape(
                      [n_samples, -1]
                  )
                  n_elements = window[key].shape[-1]
                  table_header = (
                      [
                          "{}_{}".format(key, idx)
                          for idx in range(n_elements)
                      ]
                      if n_elements > 1
                      else ["{}".format(key)]
                  )
                  self.csv_out[key] = self._initialise_empty_csv(
                      key_names=table_header
                  )
                  csv_row = window[key][
                      batch_id : batch_id + 1, :
                  ].ravel()
                  self.csv_out[key] = self.csv_out[key].append(
                      OrderedDict(zip(table_header, csv_row)),
                      ignore_index=True,
                  )
          self._save_current_image()
          self._save_current_csv()
  
      return True
  
file_path: NiftyNet/niftynet/engine/windows_aggregator_resize.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.sampler_resize_v2 import zoom_3d
  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 2 for calling the ResizeSamplesAggregator obj's underlying member method code with example usage: obj.decode_batch(window, location) and returns: True, False