class_docstr: 2D images, axcodes specifications are ignored when
  loading. (Resampling to new pixdims is currently not supported).
class_docstr_tok: ["2D","images",",","axcodes","specifications","are","ignored","when","loading",".","(","Resampling","to","new","pixdims","is","currently","not","supported",")","."]
code: def __init__(
      self,
      file_path,
      name,
      interp_order,
      output_pixdim,
      output_axcodes,
      loader,
  ):
      DataFromFile.__init__(
          self, file_path=file_path, name=name, loader=loader
      )
      self._original_affine = None
      self._original_pixdim = None
      self._original_shape = None
      self._interp_order = None
      self._output_pixdim = None
      self._output_axcodes = None
  
      # assigning with property setters
      self.interp_order = interp_order
      self.output_pixdim = output_pixdim
      self.output_axcodes = output_axcodes
  
      self._load_header()
  
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 1 to create a new SpatialImage2D object from inherited base classes: DataFromFile with example: obj = SpatialImage2D(file_path, name, interp_order, output_pixdim, output_axcodes, loader)