Size: 3092
Comment:
|
Size: 3090
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 53: | Line 53: |
{{{$$$vhat = T_{post} R T_{pre} v$$$}}} | {{{$$vhat = T_{post} R T_{pre} v$$}}} |
Transformations in the context of projections, reconstructions, and in general
Definition of transformations
The approach taken in EMAN2/Sparx is based on homogeneous coordinates which enables transformations such as rotations, translations and others (e.g. scale and shear) to be concisely represented in a 4x4 matrix. A pixel with coordinates [x,y,z] is written in homogeneous coordinates as [x,y,z,1] (z=0 in 2D), where the extra '1' literally means that the the homogeneous coordinate can be translated by the 4x4 transformation matrix. In EMAN2 and Sparx the fourth coordinate is always '1', but in other applications such as OpenGL it can be '0' to indicate that the coordinates represent a vector (such as a normal), not a point. In EMAN2/Sparx, the 4x4 transformation object is encapsulated in the Transform3D object.
Rotations
A rotation of a pixel coordinate at [x,y,z] about the y axis looks like
4x4 Rotation matrix x homog pix coord
In general a rotation matrix will look like this
4x4 general rotation matrix
Note that only the upper left 3x3 block is used to store the rotation information
Translations
Translation of a pixel coordinate at [x,y,z] by [dx,dy,dz] looks like
4x4 depiction of translation matrix x homog pix coord
This shows how the homogeneous coordinate representation is used to achieve translation
Rotations and Translations
Rotation
Need MathML
Transforming an EMData object
An EMData object may be transformed using the following syntax
This next section will look better once we get mathml working
A pixel given at coordinate vector v = [x,y,z]^T will be transformed using the following"
$$vhat = T_{post} R T_{pre} v$$
Where the rotation matrix R and associated conventions are defined in Baldwin and Penczek 2007.
Transformations and projections
Say the data model is a 3D map denoted M(x,y,z) and a projection is to be generated in a particular direction. The model may also be pre and/or post translated as part of the projection process. The translation information along with the direction of the projection is to be stored in a Transform3D object T, and the projection is to be generated according to or equivalently to the following
$$p(x,y) = int T M(x,y,z) dz$$
That is, the projection is generated by first transforming the 3D map M by the Transform3D object, and proceeded by taking line integrals along z.
Transformations and recontructors
In order to insert a projection as generated in the conventional way (above) into a 3D volume in the correct orientation, one must invert the Transform3D object that was used to generate the projection prior to slice insertion.