code: def is_orthogonal_nifti(nifti_file):
      
      nifti_image = nibabel.load(nifti_file)
      affine = nifti_image.affine
  
      transformed_x = numpy.transpose(numpy.dot(affine, [[1], [0], [0], [0]]))[0][:3]
      transformed_y = numpy.transpose(numpy.dot(affine, [[0], [1], [0], [0]]))[0][:3]
      transformed_z = numpy.transpose(numpy.dot(affine, [[0], [0], [1], [0]]))[0][:3]
  
      transformed_x /= numpy.linalg.norm(transformed_x)
      transformed_y /= numpy.linalg.norm(transformed_y)
      transformed_z /= numpy.linalg.norm(transformed_z)
  
      perpendicular = numpy.cross(transformed_x, transformed_y)
      perpendicular /= numpy.linalg.norm(perpendicular)
  
      if not numpy.allclose(transformed_z, perpendicular, rtol=0.05, atol=0.05) \
              and not numpy.allclose(transformed_z, -perpendicular, rtol=0.05, atol=0.05):
          return False
      return True
docs: Validate that volume is orthonormal
  
      :param dicoms: check that we have a volume without skewing