class_docstr: Class for AFNI header
docstr: Returns affine of dataset
  
  Examples
  --------
  >>> fname = os.path.join(datadir, 'example4d+orig.HEAD')
  >>> header = AFNIHeader(parse_AFNI_header(fname))
  >>> header.get_affine()
  array([[ -3.    ,  -0.    ,  -0.    ,  49.5   ],
         [ -0.    ,  -3.    ,  -0.    ,  82.312 ],
         [  0.    ,   0.    ,   3.    , -52.3511],
         [  0.    ,   0.    ,   0.    ,   1.    ]])
code: def get_affine(self):
      """
      Returns affine of dataset
  
      Examples
      --------
      >>> fname = os.path.join(datadir, 'example4d+orig.HEAD')
      >>> header = AFNIHeader(parse_AFNI_header(fname))
      >>> header.get_affine()
      array([[ -3.    ,  -0.    ,  -0.    ,  49.5   ],
             [ -0.    ,  -3.    ,  -0.    ,  82.312 ],
             [  0.    ,   0.    ,   3.    , -52.3511],
             [  0.    ,   0.    ,   0.    ,   1.    ]])
      """
      # AFNI default is RAI- == LPS+ == DICOM order.  We need to flip RA sign
      # to align with nibabel RAS+ system
      affine = np.asarray(self.info["IJK_TO_DICOM_REAL"]).reshape(3, 4)
      affine = np.row_stack((affine * [[-1], [-1], [1]], [0, 0, 0, 1]))
      return affine
  
imports: import os
  import re
  from copy import deepcopy
  import numpy
  from .arrayproxy import ArrayProxy
  from .fileslice import strided_scalar
  from .spatialimages import HeaderDataError, ImageDataError, SpatialHeader, SpatialImage
  from .volumeutils import Recoder
label_desc: Use image node_id 8 for calling the AFNIHeader obj's underlying member method code with example usage: obj.get_affine() and returns: affine