How to get the transform edited in 3D views interactively in Python Interacter

Hi, Tamas,

Thank you very much for you reply. What i need is to get a boundary or bounding box of my segmentation in 3D view window and then to drag or rotate the segmentation boundary to modify the position of my segmentation. This can be achieved in the GUI as this post did:

But i can not find a code way to do it.