def __world_coordinate_system_from(header):
    """
    From the given NRRD header, determine the respective assumed anatomical world coordinate system.

    Parameters
    ----------
    header : dict
        A dictionary containing the NRRD header (as returned by ``nrrd.read``, for example).

    Returns
    -------
    str
        The three-character uppercase string determining the respective anatomical world coordinate system (such as
        "RAS" or "LPS").

    Raises
    ------
    IOError
        If the header is missing the "space" field or the "space" field's value does not determine an anatomical world
        coordinate system.
    """
    try:
        system_str = header["space"]
    except KeyError as e:
        raise IOError("Need the header's \"space\" field to determine the image's anatomical coordinate system.")

    if len(system_str) == 3:
        # We are lucky: this is already the format that we need
        return system_str.upper()

    # We need to separate the string (such as "right-anterior-superior") at its dashes, then get the first character
    # of each component. We cannot handle 4D data nor data with scanner-based coordinates ("scanner-...") or
    # non-anatomical coordinates ("3D-...")
    system_components = system_str.split("-")
    if len(system_components) == 3 and not system_components[0].lower() in ["scanner", "3d"]:
        system_str = "".join(c[0].upper() for c in system_components)
        return system_str

    raise IOError("Cannot handle \"space\" value {}".format(system_str))