itrans = trans.inverse()
vol.process_inplace("xform",{"transform":itrans})
To test whether this gives me the transform I want, I did the following:
print trans.get_pre_trans(), '==', itrans.get_pre_trans()
I expected these two translations would be the same except for the sign since they are applied first to the object before the other transforms, e.g. RT not TR.
This is using EMAN 2.1.
Thanks,
Rob
| Hi Transform operations are defined as matrix multiplications. So, transformation inverse to a given one is obtained by inverting the matrix. Inverse in your example is correct. Pre and post refer to two conventions: rotation prior or post translation, respectively. This is unrelated to inverting the trasformation. Much on the subject is written in baldwin&Penczek JSB "transform class in eman2". Sent from Yahoo Mail for iPhone |
|
-- -- ---------------------------------------------------------------------------------------------- You received this message because you are subscribed to the Google Groups "EMAN2" group. To post to this group, send email to em...@googlegroups.com To unsubscribe from this group, send email to eman2+un...@googlegroups.com For more options, visit this group at http://groups.google.com/group/eman2 --- You received this message because you are subscribed to the Google Groups "EMAN2" group. To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. |
prior
| I am not sure I understand. Full transformation matrix is 4x4. Rotation matrix is 3x3. Inversion of a rotation matrix is indeed the transposition. In case of pure rotation the inverse or transposition of rotation will result in the object in the original position. If you are thinking about 3x3 matrices translation cannot be represented by a matrix multiplication. I believe all tgat is explained in Baldwin paper I mentioned. |
--
--