[Simnibs-discuss] Define coil orientation in Localite

Kristoffer Madsen kristofferm at drcmr.dk
Fri Apr 1 13:11:24 CEST 2022


The affine matrix indicates the transformation done to the coil coordinate
system in order to place it in the right position, hence the first 3
elements of the last column indicates the coil center position (typically
the location of the coil surface with highest A field) in the coordinate
system of the head model - so as you say.
The rotation is then given by the initial three elements of each of the
first three columns being unit vectors indicating x, y and z directions of
the coil in subject space.
If you want to express that in terms of angles you will have to decompose
into these - see for example:
https://people.cs.clemson.edu/~dhouse/courses/401/notes/affines-matrices.pdf
.
Best,
Kristoffer

Hello,

I am trying to optimize coil positioning and orientation for TMS but I am
not sure how to apply the affine transformation matrix in Localite
(matrix shown below). I used headreco to generate the headmodel.
- Because I used headreco, the values in the matrix are in native space, is
that correct?
- How do I define the entry target in Localite? Would this be 84.3, -8.4,
35.6?
- How do I calculate the rotation angle from this matrix? I am aware of the
coil and axes orientations in SimNIBS and Localite (attached) but do not
know how to use that information to set the rotation angle.

Affine matrix after TMSoptimize:
[[-5.7218e-03 -3.2704e-01 -9.4499e-01  8.4300e+01]
 [-8.5258e-01 -4.9224e-01  1.7551e-01 -8.3755e+00]
 [-5.2256e-01  8.0669e-01 -2.7601e-01  3.5573e+01]
 [ 0.0000e+00  0.0000e+00  0.0000e+00  1.0000e+00]]

Thank you in advance, I appreciate all the help I can get.
Goi Khia

--
Goi Khia Eng
Postdoctoral Fellow, Department of Psychiatry
New York University School of Medicine
Visiting Scientist
Nathan Kline Institute for Psychiatric Research
goikhia.eng at nyulangone.org
goikhia.eng at nki.rfmh.org


------------------------------------------------------------
This email message, including any attachments, is for the sole use of the
intended recipient(s) and may contain information that is proprietary,
confidential, and exempt from disclosure under applicable law. Any
unauthorized review, use, disclosure, or distribution is prohibited. If you
have received this email in error please notify the sender by return email
and delete the original message. Please note, the recipient should check
this email and any attachments for the presence of viruses. The
organization accepts no liability for any damage caused by any virus
transmitted by this email.
=================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.drcmr.dk/pipermail/simnibs-discuss/attachments/20220401/9656c6e3/attachment.html>


More information about the Simnibs-discuss mailing list