Differences between revisions 2 and 3
Revision 2 as of 2008-11-26 04:42:28
Size: 670
Editor: localhost
Comment: converted to 1.6 markup
Revision 3 as of 2009-02-04 20:31:32
Size: 451
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Image transforms are achieved using the Transform class.
Line 14: Line 16:
In [6]: t = Transform3D(90,30,90) In [6]: t = Transform({"type":"eman":"az":45,"alt":90})
Line 16: Line 18:
In [7]: t.set_posttrans(1,-2,5) In [7]: t.set_trans(1,-2,5)
Line 18: Line 20:
In [8]: t.set_pretrans(2,10,-20) In [8]: t.set_scale(1)
Line 20: Line 22:
In [9]: e.rotate_translate(t) In [9]: e.transform(t)
Line 25: Line 27:

Notes:

1. The Transform3D is initialized on line 6 with the arguments 90 (azimuth), 30 (altitude), and 90 (phi). This is ZXZ' rotation. You can do rotations using SPIDER, MRC, IMAGIC and many other conventions with the Transform3D object, but this is not demonstrated here.

Image transforms are achieved using the Transform class.

[someone@localhost]$ e2.py

Welcome to EMAN2
Prompt provided by IPython
Enter '?' for ipython help

In [3]:  e = EMData()

In [4]:  e.set_size(32,32,32)

In [5]:  e.process_inplace('testimage.axes')

In [6]:  t = Transform({"type":"eman":"az":45,"alt":90})

In [7]:  t.set_trans(1,-2,5)

In [8]:  t.set_scale(1)

In [9]:  e.transform(t)

In [9]:  display(e)

EMAN2/Tutorials/RotateTranslate (last edited 2015-05-04 18:17:02 by StephenMurray)