parameters: (transformNode, toWorld=False)
return_statement: return arrayFromVTKMatrix(vmatrix)
docstring: Return 4x4 transformation matrix as numpy array.
  
    :param toWorld: if set to True then the transform to world coordinate system is returned
      (effect of parent transform to the node is applied), otherwise transform to parent transform is returned.
    :return: numpy array
    :raises RuntimeError: in case of failure
  
    The returned array is just a copy and so any modification in the array will not affect the transform node.
  
    To set transformation matrix from a numpy array, use :py:meth:`updateTransformMatrixFromArray`.
docstring_summary: Return 4x4 transformation matrix as numpy array.
docstring_tokens: Return 4x4 transformation matrix as numpy array .
function: def arrayFromTransformMatrix(transformNode, toWorld=False):
    """Return 4x4 transformation matrix as numpy array.
  
    :param toWorld: if set to True then the transform to world coordinate system is returned
      (effect of parent transform to the node is applied), otherwise transform to parent transform is returned.
    :return: numpy array
    :raises RuntimeError: in case of failure
  
    The returned array is just a copy and so any modification in the array will not affect the transform node.
  
    To set transformation matrix from a numpy array, use :py:meth:`updateTransformMatrixFromArray`.
    """
    import numpy as np
    from vtk import vtkMatrix4x4
    vmatrix = vtkMatrix4x4()
    if toWorld:
      success = transformNode.GetMatrixTransformToWorld(vmatrix)
    else:
      success = transformNode.GetMatrixTransformToParent(vmatrix)
    if not success:
      raise RuntimeError("Failed to get transformation matrix from node "+transformNode.GetID())
    return arrayFromVTKMatrix(vmatrix)
function_tokens: def arrayFromTransformMatrix ( transformNode , toWorld = False ) : import numpy as np from vtk import vtkMatrix4x4 vmatrix = vtkMatrix4x4 ( ) if toWorld : success = transformNode . GetMatrixTransformToWorld ( vmatrix ) else : success = transformNode . GetMatrixTransformToParent ( vmatrix ) if not success : raise RuntimeError ( "Failed to get transformation matrix from node " + transformNode . GetID ( ) ) return arrayFromVTKMatrix ( vmatrix )