class_docstr: Class for affine transformation from domain to a range
  
  This class has an affine attribute, which is a matrix representing
  the affine transformation in homogeneous coordinates.  This matrix
  is used to evaluate the function, rather than having an explicit
  function (as is the case for a CoordinateMap).
  
  Examples
  --------
  >>> inp_cs = CoordinateSystem('ijk')
  >>> out_cs = CoordinateSystem('xyz')
  >>> cm = AffineTransform(inp_cs, out_cs, np.diag([1, 2, 3, 1]))
  >>> cm
  AffineTransform(
     function_domain=CoordinateSystem(coord_names=('i', 'j', 'k'), name='', coord_dtype=float64),
     function_range=CoordinateSystem(coord_names=('x', 'y', 'z'), name='', coord_dtype=float64),
     affine=array([[ 1.,  0.,  0.,  0.],
                   [ 0.,  2.,  0.,  0.],
                   [ 0.,  0.,  3.,  0.],
                   [ 0.,  0.,  0.,  1.]])
  )
  
  >>> cm.affine
  array([[ 1.,  0.,  0.,  0.],
         [ 0.,  2.,  0.,  0.],
         [ 0.,  0.,  3.,  0.],
         [ 0.,  0.,  0.,  1.]])
  >>> cm([1,1,1])
  array([ 1.,  2.,  3.])
  >>> icm = cm.inverse()
  >>> icm([1,2,3])
  array([ 1.,  1.,  1.])
class_docstr_tok: ["Class","for","affine","transformation","from","domain","to","a","range","This","class","has","an","affine","attribute",",","which","is","a","matrix","representing","the","affine","transformation","in","homogeneous","coordinates",".","This","matrix","is","used","to","evaluate","the","function",",","rather","than","having","an","explicit","function","(","as","is","the","case","for","a","CoordinateMap",")",".","Examples","--","--","--","--",">",">",">","inp_cs","=","CoordinateSystem","(","'ijk","'",")",">",">",">","out_cs","=","CoordinateSystem","(","'xyz","'",")",">",">",">","cm","=","AffineTransform","(","inp_cs",",","out_cs",",","np.diag","(","[","1",",","2",",","3",",","1","]",")",")",">",">",">","cm","AffineTransform","(","function_domain=CoordinateSystem","(","coord_names=","(","'","i","'",",","'","j","'",",","'","k","'",")",",","name=","''",",","coord_dtype=float64",")",",","function_range=CoordinateSystem","(","coord_names=","(","'","x","'",",","'","y","'",",","'","z","'",")",",","name=","''",",","coord_dtype=float64",")",",","affine=array","(","[","[","1.",",","0.",",","0.",",","0",".","]",",","[","0.",",","2.",",","0.",",","0",".","]",",","[","0.",",","0.",",","3.",",","0",".","]",",","[","0.",",","0.",",","0.",",","1",".","]","]",")",")",">",">",">","cm.affine","array","(","[","[","1.",",","0.",",","0.",",","0",".","]",",","[","0.",",","2.",",","0.",",","0",".","]",",","[","0.",",","0.",",","3.",",","0",".","]",",","[","0.",",","0.",",","0.",",","1",".","]","]",")",">",">",">","cm","(","[","1,1,1","]",")","array","(","[","1.",",","2.",",","3",".","]",")",">",">",">","icm","=","cm.inverse","(",")",">",">",">","icm","(","[","1,2,3","]",")","array","(","[","1.",",","1.",",","1",".","]",")"]
docstr: New AffineTransform with function_domain reordered
  
  Default behaviour is to reverse the order of the coordinates.
  
  Parameters
  ----------
  order : sequence
     Order to use, defaults to reverse. The elements can be
     integers, strings or 2-tuples of strings.  If they are
     strings, they should be in
     mapping.function_domain.coord_names.
  
  Returns
  -------
  newmapping :AffineTransform
     A new AffineTransform with the coordinates of function_domain
     reordered.
  
  Examples
  --------
  >>> input_cs = CoordinateSystem('ijk')
  >>> output_cs = CoordinateSystem('xyz')
  >>> cm = AffineTransform(input_cs, output_cs, np.identity(4))
  >>> cm.reordered_domain('ikj').function_domain
  CoordinateSystem(coord_names=('i', 'k', 'j'), name='', coord_dtype=float64)
docstr_tok: ["New","AffineTransform","with","function_domain","reordered","Default","behaviour","is","to","reverse","the","order","of","the","coordinates",".","Parameters","--","--","--","--","--","order",":","sequence","Order","to","use",",","defaults","to","reverse",".","The","elements","can","be","integers",",","strings","or","2-tuples","of","strings",".","If","they","are","strings",",","they","should","be","in","mapping.function_domain.coord_names",".","Returns","--","--","--","-","newmapping",":","AffineTransform","A","new","AffineTransform","with","the","coordinates","of","function_domain","reordered",".","Examples","--","--","--","--",">",">",">","input_cs","=","CoordinateSystem","(","'ijk","'",")",">",">",">","output_cs","=","CoordinateSystem","(","'xyz","'",")",">",">",">","cm","=","AffineTransform","(","input_cs",",","output_cs",",","np.identity","(","4",")",")",">",">",">","cm.reordered_domain","(","'ikj","'",")",".function_domain","CoordinateSystem","(","coord_names=","(","'","i","'",",","'","k","'",",","'","j","'",")",",","name=","''",",","coord_dtype=float64",")"]
code: def reordered_domain(self, order=None):
      """New AffineTransform with function_domain reordered
  
      Default behaviour is to reverse the order of the coordinates.
  
      Parameters
      ----------
      order : sequence
         Order to use, defaults to reverse. The elements can be
         integers, strings or 2-tuples of strings.  If they are
         strings, they should be in
         mapping.function_domain.coord_names.
  
      Returns
      -------
      newmapping :AffineTransform
         A new AffineTransform with the coordinates of function_domain
         reordered.
  
      Examples
      --------
      >>> input_cs = CoordinateSystem('ijk')
      >>> output_cs = CoordinateSystem('xyz')
      >>> cm = AffineTransform(input_cs, output_cs, np.identity(4))
      >>> cm.reordered_domain('ikj').function_domain
      CoordinateSystem(coord_names=('i', 'k', 'j'), name='', coord_dtype=float64)
      """
  
      return reordered_domain(self, order)
  
imports: import warnings
  import numpy
  import numpy.linalg
  from nibabel import io_orientation
  from nibabel.affines import from_matvec, to_matvec
  from .coordinate_system import CoordinateSystem, is_coordsys, safe_dtype
  from .coordinate_system import product
label_desc: Use image node_id 6 for calling the AffineTransform obj's underlying member method code with example usage: obj.reordered_domain(order) and returns: reordered_domain