def state_to_ordereddict(st, include_iminfo=True):
od = OrderedDict()<EOL>for p in st.params:<EOL><INDENT>od.update({p:st.state[p]})<EOL><DEDENT>if include_iminfo:<EOL><INDENT>od.update({ '<STR_LIT>':st.image.filename,<EOL>'<STR_LIT>':str(st.image.tile)})<EOL><DEDENT>return od<EOL>
Represents a state as an OrderedDict

    Parameters
    ----------
        st : :class:``peri.states.State``
            The state to represent.
        include_iminfo : Bool, optional
            If set, includes two additional keys, ``'image.filename'`` and
            ``'image.tile'`` with corresponding info about the image.
            Default is True.

    Returns
    -------
        ``collections.OrderedDict``