'Return global transformation (rotation angle+translation) required to move
from relative state to current state. If relative state isn\'t specified,
then we use the state of the ROI when mouse is pressed.'

def getGlobalTransform(self, relativeTo=None):

    if (relativeTo == None):
        relativeTo = self.preMoveState
    st = self.getState()
    relativeTo['scale'] = relativeTo['size']
    st['scale'] = st['size']
    t1 = SRTTransform(relativeTo)
    t2 = SRTTransform(st)
    return (t2 / t1)
