'Return the state of the widget in a format suitable for storing to
disk. (Points are converted to tuple)
Combined with setState(), this allows ROIs to be easily saved and
restored.'

def saveState(self):

    state = {}
    state['pos'] = tuple(self.state['pos'])
    state['size'] = tuple(self.state['size'])
    state['angle'] = self.state['angle']
    return state
