class_docstr: 4D image from a set of 3D volumes,
  supports resampling and reorientation.
  
  The 3D volumes are concatenated in the fifth dim (modality dim)
class_docstr_tok: ["4D","image","from","a","set","of","3D","volumes",",","supports","resampling","and","reorientation",".","The","3D","volumes","are","concatenated","in","the","fifth","dim","(","modality","dim",")"]
code: def get_data(self):
      if len(self.file_path) == 1:
          # 4D image from a single file ()
          return SpatialImage3D._load_single_file(
              self, self.file_path[0], self.loader[0]
          )
      # assuming len(self._file_path) > 1
      mod_list = []
      for mod in range(len(self.file_path)):
          mod_3d = SpatialImage3D(
              file_path=(self.file_path[mod],),
              name=(self.name[mod],),
              interp_order=(self.interp_order[mod],),
              output_pixdim=(self.output_pixdim[mod],),
              output_axcodes=(self.output_axcodes[mod],),
              loader=(self.loader[mod],),
          )
          mod_data_5d = mod_3d.get_data()
          mod_list.append(mod_data_5d)
      try:
          image_data = np.concatenate(mod_list, axis=4)
      except ValueError:
          tf.logging.fatal(
              "multi-modal data shapes not consistent -- trying to "
              "concatenate {}.".format([mod.shape for mod in mod_list])
          )
          raise
      return image_data
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from abc import ABCMeta, abstractmethod
  import nibabel
  import numpy
  import tensorflow
  from six import with_metaclass, string_types
  import niftynet.io.misc_io
  from niftynet.io.image_loader import load_image_obj
  from niftynet.io.misc_io import resolve_file_name, dtype_casting
  from niftynet.utilities.niftynet_global_config import NiftyNetGlobalConfig
label_desc: Use image node_id 3 for calling the SpatialImage4D obj's underlying member method code with example usage: obj.get_data() and returns: image_data, SpatialImage3D