class_docstr: Class to wrap MINC1 format opened netcdf object
  
  Although it has some of the same methods as a ``Header``, we use
  this only when reading a MINC file, to pull out useful header
  information, and for the method of reading the data out
code: def get_affine(self):
      nspatial = len(self._spatial_dims)
      rot_mat = np.eye(nspatial)
      steps = np.zeros((nspatial,))
      starts = np.zeros((nspatial,))
      dim_names = list(self._dim_names)  # for indexing in loop
      for i, name in enumerate(self._spatial_dims):
          dim = self._dims[dim_names.index(name)]
          rot_mat[:, i] = (
              dim.direction_cosines
              if hasattr(dim, "direction_cosines")
              else _default_dir_cos[name]
          )
          steps[i] = dim.step if hasattr(dim, "step") else 1.0
          starts[i] = dim.start if hasattr(dim, "start") else 0.0
      origin = np.dot(rot_mat, starts)
      aff = np.eye(nspatial + 1)
      aff[:nspatial, :nspatial] = rot_mat * steps
      aff[:nspatial, nspatial] = origin
      return aff
  
imports: from __future__ import annotations
  from numbers import Integral
  import numpy
  from .externals.netcdf import netcdf_file
  from .fileslice import canonical_slicers
  from .spatialimages import SpatialHeader, SpatialImage
label_desc: Use image node_id 6 for calling the Minc1File obj's underlying member method code with example usage: obj.get_affine() and returns: aff