<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Hi Dan,</p>
    <p><br>
    </p>
    <p>This transformation is embedded inside the NifTi files. It's
      often called the "affine". Normally the X axis corresponds to
      left/right, Y to posterior/anterior and Z to bottom/top, but it
      can vary depending on how the image was acquired and how the
      subject was positioned inside the scanner, so it is not so
      reliable. However, the co-register images, located in the
      m2m_{subID}/toMNI folder, are sure to follow this convention, if
      the co-registration worked (it generally does). We also use the
      co-registrations to calculate the 10-10 EEG positions, including
      FP1, which are stored in
      m2m_{SubID}/eeg_positions/EEG10-10_UI_Jurak_2007.csv. <br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p>Best Regards,</p>
    <p>Guilherme</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 14/07/2020 23.12, Mccalley, Daniel
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:BN6PR11MB4004AF857174ED030B20A8E9A5610@BN6PR11MB4004.namprd11.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        Hi all,</div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        Thanks again for the help! </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        Oula, would you be able to point me toward the header file that
        may have information on the voxel-to-world transformation? It
        would be useful to know which direction is up/down, left/right,
        forward/backward if X Y and Z aren't always accurate</div>
      <div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          Best,</div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0);">
          <br>
        </div>
        <div id="Signature">
          <div>
            <div style="font-family:Tahoma; font-size:13px">Dan McCalley
              <div>Medical University of South Carolina</div>
              <div>College of Graduate Studies, Neuroscience</div>
              <div><br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <hr style="display:inline-block;width:98%" tabindex="-1">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          face="Calibri, sans-serif" color="#000000"><b>From:</b> Oula
          Puonti <a class="moz-txt-link-rfc2396E" href="mailto:oupu@dtu.dk"><oupu@dtu.dk></a><br>
          <b>Sent:</b> Monday, July 13, 2020 2:44 AM<br>
          <b>To:</b> Mccalley, Daniel <a class="moz-txt-link-rfc2396E" href="mailto:mccalled@musc.edu"><mccalled@musc.edu></a>;
          Guilherme B Saturnino <a class="moz-txt-link-rfc2396E" href="mailto:guilhermebs@drcmr.dk"><guilhermebs@drcmr.dk></a>;
          <a class="moz-txt-link-abbreviated" href="mailto:discuss@simnibs.org">discuss@simnibs.org</a> <a class="moz-txt-link-rfc2396E" href="mailto:discuss@simnibs.org"><discuss@simnibs.org></a><br>
          <b>Subject:</b> Re: [Simnibs-discuss] Targeting subject
          specific locations on the scalp</font>
        <div> </div>
      </div>
      <style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
      <div dir="ltr"><b>
          <p style="color:#ee7600; font-size:13pt; text-align:center;
            background-color:#FFFFFF; text-decoration:underline">
            CAUTION: External</p>
        </b>
        <div>
          <style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
          <div id="x_divtagdefaultwrapper" dir="ltr"
            style="font-size:12pt; color:#000000;
            font-family:Calibri,Helvetica,sans-serif">
            <p>Hi Daniel,</p>
            <p><br>
            </p>
            <p>Thanks for the clarification. </p>
            <p><br>
            </p>
            <p>I could see two problems: </p>
            <p><br>
            </p>
            <p>1) The Nz coordinate from SimNIBS is not correctly
              placed. This can happen due to segmentation/registration
              errors. You should open the MRI scan in a viewer, for
              example freeview, and check that the Nz coordinate that
              SimNIBS outputs matches the nasion location on the scan.</p>
            <p><br>
            </p>
            <p>2) The header, i.e., voxel-to-world transformation, of
              the MRIs is different between subjects. If you always
              substract the X and Y distances you might end up moving in
              a different direction than intended.</p>
            <p><br>
            </p>
            <p>Best,</p>
            <p>Oula </p>
          </div>
          <hr tabindex="-1" style="display:inline-block; width:98%">
          <div id="x_divRplyFwdMsg" dir="ltr"><font
              style="font-size:11pt" face="Calibri, sans-serif"
              color="#000000"><b>From:</b> Mccalley, Daniel
              <a class="moz-txt-link-rfc2396E" href="mailto:mccalled@musc.edu"><mccalled@musc.edu></a><br>
              <b>Sent:</b> Friday, July 10, 2020 6:43:03 PM<br>
              <b>To:</b> Oula Puonti; Guilherme B Saturnino;
              <a class="moz-txt-link-abbreviated" href="mailto:discuss@simnibs.org">discuss@simnibs.org</a><br>
              <b>Subject:</b> Re: [Simnibs-discuss] Targeting subject
              specific locations on the scalp</font>
            <div> </div>
          </div>
          <div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              Hi all, </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              <br>
            </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              Thank you so much for the fast replies! </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              <br>
            </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              Let me clear up a few things about our experiment -- </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              <br>
            </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              When our participants come in, the experimenter measures
              the individual's head (nasion to inion, tragus to tragus,
              circumference). Each person's measurements are of course
              different and there is some amount of error/rounding made
              by the experimenter in each measurement. <b>Our
                participants are never fitted with an EEG cap</b> to
              locate our cortical target (FP1).</div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              <br>
            </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              Instead, starting at Nz, we take 10% of the distance for
              Nz to Inion (generally ranges from 2-4 cm, I referred to
              this as Y in my initial example) and move up and we take
              5% of the total head circumference and move that distance
              left (towards FP1, I referred to this as X in my initial
              example). The experimenter makes a mark on the persons
              head with sharpie, but <b>unfortunately we did not use a
                fiducial for this study</b>.</div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              <br>
            </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              Given that the FP1 location is determined in a
              patient-tailored manner and we expect some degree of
              experimenter error in making these measurements, I'd like
              to as closely as possible recreate an e-field at the site
              of stimulation for each person using these measurements.
              Thus far, I have used the coordinates for Nz that SIMNIBs
              produces and made adjustments from there based on X and Y
              displacement for each subject. This almost always produces
              a result close to FP1, but in some instances it seems the
              result remains near the eye or in entirely unexpected head
              locations</div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              <br>
            </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              Does that information help? </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              <br>
            </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              Thank you all again for your help! </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              <br>
            </div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              Best,</div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              <br>
            </div>
            <div>
              <div
                style="font-family:Calibri,Arial,Helvetica,sans-serif;
                font-size:12pt; color:rgb(0,0,0)">
                <br>
              </div>
              <div id="x_Signature">
                <div>
                  <div style="font-family:Tahoma; font-size:13px">Dan
                    McCalley
                    <div>Medical University of South Carolina</div>
                    <div>College of Graduate Studies, Neuroscience</div>
                    <div><br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <hr tabindex="-1" style="display:inline-block; width:98%">
            <div id="x_divRplyFwdMsg" dir="ltr"><font
                style="font-size:11pt" face="Calibri, sans-serif"
                color="#000000"><b>From:</b> Oula Puonti
                <a class="moz-txt-link-rfc2396E" href="mailto:oupu@dtu.dk"><oupu@dtu.dk></a><br>
                <b>Sent:</b> Friday, July 10, 2020 3:35 AM<br>
                <b>To:</b> Guilherme B Saturnino
                <a class="moz-txt-link-rfc2396E" href="mailto:guilhermebs@drcmr.dk"><guilhermebs@drcmr.dk></a>; Mccalley, Daniel
                <a class="moz-txt-link-rfc2396E" href="mailto:mccalled@musc.edu"><mccalled@musc.edu></a>; <a class="moz-txt-link-abbreviated" href="mailto:discuss@simnibs.org">discuss@simnibs.org</a>
                <a class="moz-txt-link-rfc2396E" href="mailto:discuss@simnibs.org"><discuss@simnibs.org></a><br>
                <b>Subject:</b> Re: [Simnibs-discuss] Targeting subject
                specific locations on the scalp</font>
              <div> </div>
            </div>
            <div><b>
                <p style="color:#ee7600; font-size:13pt;
                  text-align:center; background-color:#FFFFFF;
                  text-decoration:underline">
                  CAUTION: External</p>
              </b>
              <div>
                <style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
                <div id="x_x_divtagdefaultwrapper" dir="ltr"
                  style="font-size:12pt; color:#000000;
                  font-family:Calibri,Helvetica,sans-serif">
                  <p>Hi,</p>
                  <p><br>
                  </p>
                  <p>Just to add to what Guilherme said: Are you
                    locating the nasion manually or using coordinates
                    that SimNIBS outputs automatically? If the latter,
                    please check that the fiducial placements look
                    correct.</p>
                  <p><br>
                  </p>
                  <p>Best,</p>
                  <p>Oula</p>
                  <p><br>
                  </p>
                  <p><br>
                  </p>
                </div>
                <hr tabindex="-1" style="display:inline-block;
                  width:98%">
                <div id="x_x_divRplyFwdMsg" dir="ltr"><font
                    style="font-size:11pt" face="Calibri, sans-serif"
                    color="#000000"><b>From:</b> Simnibs-discuss
                    <a class="moz-txt-link-rfc2396E" href="mailto:simnibs-discuss-bounces@drcmr.dk"><simnibs-discuss-bounces@drcmr.dk></a> on behalf
                    of Guilherme B Saturnino
                    <a class="moz-txt-link-rfc2396E" href="mailto:guilhermebs@drcmr.dk"><guilhermebs@drcmr.dk></a><br>
                    <b>Sent:</b> Friday, July 10, 2020 9:31:07 AM<br>
                    <b>To:</b> Mccalley, Daniel; <a class="moz-txt-link-abbreviated" href="mailto:discuss@simnibs.org">discuss@simnibs.org</a><br>
                    <b>Subject:</b> Re: [Simnibs-discuss] Targeting
                    subject specific locations on the scalp</font>
                  <div> </div>
                </div>
                <div>
                  <p>Hello,</p>
                  <p><br>
                  </p>
                  <p>SimNIBS 3 offers two ways of getting 10/10 EEG
                    positions out of the box.</p>
                  <p><br>
                  </p>
                  <p>1) Use the eeg positions calculated using MNI
                    transformations, which are stored in
                    m2m_{SubID}/eeg_positions/EEG10-10_UI_Jurak_2007.csv.
                    Those can also be accessed in the
                    <a
href="https://urldefense.com/v3/__https://simnibs.github.io/simnibs/build/html/tutorial/gui.html__;!!Ab1_Rw!VmHiKnZCbukEHQmiiCDWTKL0HVw7v3spr5BG5nz_3hj_QfY9egavym9kBSlfQpNA$"
                      moz-do-not-send="true">
                      GUI</a>, which loads it automatically, or in 
                    scripts (<a
href="https://urldefense.com/v3/__https://github.com/simnibs/simnibs/blob/v3.1.2/simnibs/examples/simulations/TMS.m__;!!Ab1_Rw!VmHiKnZCbukEHQmiiCDWTKL0HVw7v3spr5BG5nz_3hj_QfY9egavym9kBXnVXhnJ$"
                      moz-do-not-send="true">MATLAB example</a>)</p>
                  <p><br>
                  </p>
                  <p>2) Using the <a
href="https://urldefense.com/v3/__https://simnibs.github.io/simnibs/build/html/documentation/command_line/eeg_positions.html__;!!Ab1_Rw!VmHiKnZCbukEHQmiiCDWTKL0HVw7v3spr5BG5nz_3hj_QfY9egavym9kBd53sE1Z$"
                      moz-do-not-send="true">
                      eeg_positions</a> command line tool with the Nz,
                    LPA, RPA and Iz as an input</p>
                  <p><br>
                  </p>
                  <p>Those two were compared and validated <a
href="https://urldefense.com/v3/__https://link.springer.com/chapter/10.1007/978-3-030-21293-3_1__;!!Ab1_Rw!VmHiKnZCbukEHQmiiCDWTKL0HVw7v3spr5BG5nz_3hj_QfY9egavym9kBSy4FP92$"
                      moz-do-not-send="true">
                      here</a>.</p>
                  <p> <br>
                  </p>
                  <p>I'm not sure why it is not working in your case
                    though, might be due to head size, as you are moving
                    by constant amounts?</p>
                  <p><br>
                  </p>
                  <p>Best Regards,</p>
                  <p>Guilherme<br>
                  </p>
                  <p><br>
                  </p>
                  <p><br>
                  </p>
                  <div class="x_x_moz-cite-prefix">On 09/07/2020 19.48,
                    Mccalley, Daniel wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      Hi all, </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      Our lab targets the FP1 with TMS. We use a simple
                      measurement system (<a
href="https://urldefense.com/v3/__http://clinicalresearcher.org/F3/__;!!Ab1_Rw!VmHiKnZCbukEHQmiiCDWTKL0HVw7v3spr5BG5nz_3hj_QfY9egavym9kBcP0FOvN$"
                        moz-do-not-send="true">http://clinicalresearcher.org/F3/</a>)
                      to locate exactly where we want to place the coil
                      for each subject. Typically, we measure the
                      subject's head, and then, starting from nasion,
                      we'll move up Y mm and left X mm (where X and Y
                      are determined from each subject's given head
                      size).</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      Ideally, we'd like to create an electric field
                      model for each subject that accounts for the TMS
                      parameters as well as the exact location used. To
                      implement this in SIMNIBS, I've tried the
                      following: </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      1) Open a subjects m2m file and find the
                      coordinates for nasion (say, for example, that
                      these coordinates are X= -2.78, Y= 117.59, Z=
                      -20.63).</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      2) Determine Y and X used to locate FP1 for the
                      given subject (say, for example, that starting
                      from nasion, we moved 37 mm in the Y direction,
                      and over 32 mm in the X direction). </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      3) Subtract the displacements in the Y and X
                      directions from the original nasion coordinates,
                      resulting in X= -34.78 and Y=80.69</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      4) Add a new position wherein the reference
                      coordinates match the original nasion coordinates
                      (and the Define Reference Coordinates box is
                      checked) and the coordinates calculated in step 3
                      are input in the position fields (Z is left blank
                      for SIMNIBs to calculate) </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      5) Adjust for coil orientation and TMS parameters</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      This seems to have worked well for 90-95% of our
                      subjects, however there are a few subjects in
                      which the resulting coil placement appears to be
                      over the eye (Note: Ordinarily I'd attach examples
                      of the working and not-working subjects, but I'm
                      not sure if the skin reconstruction of our
                      participants falls under PHI). <br>
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      Am I going about this the wrong way? Could this
                      reflect a problem with segmentation/meshing? Or
                      maybe a problem with the experimenter measurements
                      of the subjects head? Any advice would be greatly
                      appreciated. Thank you all so much!</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      Best,</div>
                    <div>
                      <div
                        style="font-family:Calibri,Arial,Helvetica,sans-serif;
                        font-size:12pt; color:rgb(0,0,0)">
                        <br>
                      </div>
                      <div id="x_x_Signature">
                        <div>
                          <div style="font-family:Tahoma;
                            font-size:13px">Dan McCalley
                            <div>Medical University of South Carolina</div>
                            <div>College of Graduate Studies,
                              Neuroscience</div>
                            <div><br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <br>
                    <fieldset class="x_x_mimeAttachmentHeader"></fieldset>
                    <pre class="x_x_moz-quote-pre">_______________________________________________
Simnibs-discuss mailing list
<a class="x_x_moz-txt-link-abbreviated" href="mailto:Simnibs-discuss@drcmr.dk" moz-do-not-send="true">Simnibs-discuss@drcmr.dk</a>
<a class="x_x_moz-txt-link-freetext" href="https://urldefense.com/v3/__https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss__;!!Ab1_Rw!VmHiKnZCbukEHQmiiCDWTKL0HVw7v3spr5BG5nz_3hj_QfY9egavym9kBfqFDV5E$" moz-do-not-send="true">https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss</a>
</pre>
                  </blockquote>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>