class_docstr: 3D image from a single, supports resampling and reorientation
  (3D image from a set of 2D slices is currently not supported).
class_docstr_tok: ["3D","image","from","a","single",",","supports","resampling","and","reorientation","(","3D","image","from","a","set","of","2D","slices","is","currently","not","supported",")","."]
code: def _load_single_file(self, file_path, loader, dtype=np.float32):
      image_data = SpatialImage2D._load_single_file(
          file_path, loader, dtype
      )
  
      if self.spatial_rank < 3:
          return image_data
  
      pixdim = self.original_pixdim[0]
      if self.original_axcodes[0] and self.output_axcodes[0]:
          image_data = misc.do_reorientation(
              image_data,
              self.original_axcodes[0],
              self.output_axcodes[0],
          )
          transf, _, _ = misc.compute_orientation(
              self.output_axcodes[0], self.original_axcodes[0]
          )
          if pixdim:
              pixdim = tuple(
                  pixdim[k] for k in transf[:, 0].astype(np.int)
              )
  
      if pixdim and self.output_pixdim[0]:
          # verbose: warning when interpolate_order>1 for integers
          image_data = misc.do_resampling(
              image_data,
              pixdim,
              self.output_pixdim[0],
              self.interp_order[0],
          )
      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 5 for calling the SpatialImage3D obj's underlying member method code with example usage: obj._load_single_file(file_path, loader, dtype) and returns: image_data, image_data