Invert a transformation between coordinate systems. Parameters ---------- trans : dict Transform to invert. Returns ------- inv_trans : dict Inverse transform.
(trans)
| 634 | |
| 635 | |
| 636 | def invert_transform(trans): |
| 637 | """Invert a transformation between coordinate systems. |
| 638 | |
| 639 | Parameters |
| 640 | ---------- |
| 641 | trans : dict |
| 642 | Transform to invert. |
| 643 | |
| 644 | Returns |
| 645 | ------- |
| 646 | inv_trans : dict |
| 647 | Inverse transform. |
| 648 | """ |
| 649 | return Transform(trans["to"], trans["from"], np.linalg.inv(trans["trans"])) |
| 650 | |
| 651 | |
| 652 | def transform_surface_to(surf, dest, trans, copy=False): |