⇤ ← Revision 1 as of 2006-08-21 21:52:52
Size: 1703
Comment:
|
Size: 1754
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
Line 8: | Line 9: |
Line 9: | Line 11: |
RA=Transform3D(0,0,25); # Default is the ZXZ convention RA=Transform3D(EULER_SPIDER,0,0,25); # This is the typical ZYZ convention RA=Transform3D(m11,m12,m13,m21,m22,m23,m31,m32,m33) # create the transformation by entering components |
. RA=Transform3D(0,0,25); # Default is the ZXZ convention . RA=Transform3D(EULER_SPIDER,0,0,25); # This is the typical ZYZ convention . RA=Transform3D(m11,m12,m13,m21,m22,m23,m31,m32,m33) # create the transformation by entering . . components |
Line 14: | Line 17: |
RA = Transform3D(); # this creates the 3D identity matrix RA.set_rotation(0,0,25); # creates a matrix that will rotate 2D images by 25 degrees RA.set_posttrans(Vec3f(1,0,0)); # the matrix will now also shift 1 pixel in the x-direction RA.set_scale(1); # Occaisionally one will wish to rescale. |
. RA = Transform3D(); # this creates the 3D identity matrix . RA.set_rotation(0,0,25); # creates a matrix that will rotate 2D images by 25 degrees . RA.set_posttrans(Vec3f(1,0,0)); # the matrix will now also shift 1 pixel in the x-direction . RA.set_scale(1); # Occaisionally one will wish to rescale. . |
Line 19: | Line 25: |
a) We could have used EMAN, IMAGIC, SPIN, QUATERNION, SGIROT, MRC, XYZ, MATRIX instead of the SPIDER of EULER_SPIDER above. b) There is also a set_rotation via a dictionary object, which we will explain at length soon. c) The first two lines of the second block of commands, could have been written as the second line of the first block of commands. |
a) We could have used EMAN, IMAGIC, SPIN, QUATERNION, SGIROT, MRC, XYZ, MATRIX instead of the SPIDER of EULER_SPIDER above. b) There is also a set_rotation via a dictionary object, which we will explain at length soon. c) The first two lines of the second block of commands, could have been written as the second line of the first block of commands. |
Line 23: | Line 29: |
Line 36: | Line 43: |
Line 39: | Line 47: |
Name
Transform Class
Usage
Examples
- Here are some examples of creating a Transform3D object. Much more will be added later.
All angles are in degrees
Creating just rotations:
- RA=Transform3D(0,0,25); # Default is the ZXZ convention
- RA=Transform3D(EULER_SPIDER,0,0,25); # This is the typical ZYZ convention
- RA=Transform3D(m11,m12,m13,m21,m22,m23,m31,m32,m33) # create the transformation by entering
- . components
Creating more complicated transformations using set :
- RA = Transform3D(); # this creates the 3D identity matrix
- RA.set_rotation(0,0,25); # creates a matrix that will rotate 2D images by 25 degrees
- RA.set_posttrans(Vec3f(1,0,0)); # the matrix will now also shift 1 pixel in the x-direction
- RA.set_scale(1); # Occaisionally one will wish to rescale.
Notes:
- a) We could have used EMAN, IMAGIC, SPIN, QUATERNION, SGIROT, MRC, XYZ, MATRIX instead of the SPIDER of EULER_SPIDER above. b) There is also a set_rotation via a dictionary object, which we will explain at length soon. c) The first two lines of the second block of commands, could have been written as the second line of the first block of commands.
d) There are corresponding "get" calls to extract the information from the matrices. SPARX has some of its own, that are wrappers for these get calls. More later.
Description
Purpose: to apply rotation/shift/scaling operations for 2D or 3D images via a variety of methods.
Author
P. R. Baldwin
Maintainer
P. R. Baldwin
Keywords
- category 1
- FUNDAMENTALS
Files
libEM
See also
Maturity
Infancy