<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <blockquote type="cite"
      cite="mid:ea92b94b-4d36-76c7-86e6-7ab94351b44c@creatis.insa-lyon.fr">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <p>Ruoyan,</p>
      <p><br>
      </p>
      <p>From the shroud image, the signal extraction sometimes fails to
        find the period of the motion of the diaphragm, which results in
        incorrect phase detection. The easiest way to make sure your
        respiratory phase has been correctly detected is to used the
        following python script:</p>
      <p><a class="moz-txt-link-freetext"
          href="https://www.creatis.insa-lyon.fr/%7Emory/showPeaksOverShroud.py"
          moz-do-not-send="true">https://www.creatis.insa-lyon.fr/~mory/showPeaksOverShroud.py</a></p>
      <p><br>
      </p>
      <p>You have to save your shroud image with .mhd extension, because
        simpleRTK can't read .mha (I think), so modify the command line
        that generates it (in the 4DROOSTER wiki page, that would be <br>
      </p>
      <pre class="de1">rtkamsterdamshroud <span class="re5">--path</span> . \
                   <span class="re5">--regexp</span> <span class="st_h">'.*.his'</span> \
                   <span class="re5">--output</span> shroud.mha \
                   <span class="re5">--unsharp</span> <span class="nu0">650)
</span></pre>
      <span class="nu0">Change "shroud.mha" into "shroud.mhd", re-run
        all command lines except the ROOSTER reconstruction, and then
        run <br>
        <br>
      </span>"showPeaksOverShroud.py <span class="nu0">shroud.mhd
        sphase.txt"</span><br>
      <span class="nu0"></span><span class="nu0"></span><br>
      It will generate an RGB image named "peaksOverShroud.png", which
      shows the shroud, and overlays the detected extrema of the phase.
      If your detection is wrong, you'll see it. The script requires
      SimpleRTK, python and a few python libs. <br>
      <br>
      If your peaks detection is indeed incorrect, you can try cropping
      the shroud to the region where the periodic signal is most
      visible. This is usually sufficient. If you need more help, send
      over your shroud.mhd and shroud.raw file.<br>
      <br>
      Regards,<br>
      Cyril<br>
      <br>
      <div class="moz-cite-prefix">On 09/01/2018 15:47, ry.meng wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:5D207BEE-6153-4D53-BD0C-6CD67BE69149@siat.ac.cn">
        <meta http-equiv="Content-Type" content="text/html;
          charset=utf-8">
        <style>
    *{
        margin: 0;
        padding: 0;
    }
    font{
        line-height: 1.6;
    }
    ul,ol{
        padding-left: 20px;
        list-style-position: inside;
    }
</style>
        <div style="font-family:"微软雅黑"; line-height:1.6;">
          <div>
            <div>
              <div style="line-height: 22.4px;">Hi <span
                  style="line-height: 22.4px;">Cyril, </span></div>
              <div style="line-height: 22.4px;"><span
                  style="line-height: 22.4px;"><br>
                </span></div>
              <div style="line-height: 22.4px;"><span
                  style="font-family: Verdana, 微软雅黑, 宋体, sans-serif;
                  line-height: 22.4px;">The attachment is our </span><span
                  style="line-height: 1.6;">projections.mhd</span><span
                  style="line-height: 1.6;"> <font face="Verdana, 微软雅黑,
                    宋体, sans-serif">file and we are running the latest
                    RTK, </font></span><span style="line-height: 1.6;">example
                  data works well.</span></div>
              <div style="line-height: 22.4px;"><font face="Verdana,
                  微软雅黑, 宋体, sans-serif">I have another question about
                  our sphase.txt file. As my understanding of 4D
                  reconstruction process, </font><font face="Verdana,
                  微软雅黑, 宋体, sans-serif">spase.txt file should be
                  the optimal fit </font><span style="line-height: 1.6;">respiration
                  signals. But in our file, it only has 6 cycles, which
                  is impossible, </span>it confused me.</div>
              <div style="line-height: 22.4px;">I'm now testing your new
                code with our data, hope it works!</div>
              <div style="line-height: 22.4px;">Thanks for your help.</div>
              <div style="line-height: 22.4px;">
                <blockquote type="cite"
                  cite="mid:66e33d08-af6f-0d34-d5c4-628ad91a157c@creatis.insa-lyon.fr"
                  style="line-height: 22.4px;">
                  <blockquote type="cite"
                    cite="mid:88BEDC3F-802B-4D7D-A627-C28A26D68ED5@siat.ac.cn">
                    <div style="line-height: 1.6;">
                      <div style="line-height: 22.4px; font-family:
                        Verdana, 微软雅黑, 宋体, sans-serif;">
                        <p class="MsoNormal" style="margin: 0cm 0cm
                          0.0001pt; font-family: 'Times New Roman',
                          serif;"><span style="font-family: Verdana,
                            sans-serif;"><br>
                          </span></p>
                        <p class="MsoNormal" style="margin: 0cm 0cm
                          0.0001pt; font-family: 'Times New Roman',
                          serif;"><span style="font-family: Verdana,
                            sans-serif;">Regards</span></p>
                      </div>
                      <div style="line-height: 22.4px; font-family:
                        Verdana, 微软雅黑, 宋体, sans-serif;">
                        <p class="MsoNormal" style="margin: 0cm 0cm
                          0.0001pt; font-family: 'Times New Roman',
                          serif;"><span style="font-family: Verdana,
                            sans-serif;">Ruoyan Meng</span></p>
                      </div>
                    </div>
                  </blockquote>
                </blockquote>
              </div>
            </div>
            <div id="ntes-pcmail-signature" style="font-family:'微软雅黑'">
              <style type="text/css">
        a#ntes-pcmail-signature-default:hover {
            text-decoration: underline;
            color: #199cff;
            cursor: pointer;
        }
        a#ntes-pcmail-signature-default:active {
            text-decoration: underline;
            color: #246fce;
            cursor: pointer;
        }
    </style> </div>
          </div>
          <div class="J-reply"
style="background-color:#f2f2f2;color:black;padding-top:6px;padding-bottom:6px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin-top:45px;margin-bottom:20px;font-family:'微软雅黑';">
            <div
style="font-size:14px;line-height:1.5;word-break:break-all;margin-left:10px;margin-right:10px">On
              <span class="mail-date">1/9/2018 20:48</span>,<a
                class="mail-to"
                style="text-decoration:none;color:#2a83f2;"
                href="mailto:cyril.mory@creatis.insa-lyon.fr"
                moz-do-not-send="true">Cyril
                Mory<cyril.mory@creatis.insa-lyon.fr></a> wrote: </div>
          </div>
          <blockquote id="ntes-pcmail-quote" style="margin: 0; padding:
            0; font-size: 14px; font-family: '微软雅黑';">
            <p>Hi again Ruoyan,</p>
            <p><br>
            </p>
            <p>I have investigated further and found the source of the
              problem: the code performs a rounding of the phase signal
              to two digits, which for some values of your phase ended
              up to be 1. And the rest of the code assumes that the
              phase belongs to [0; 1[, i.e. there should never be a
              value 1. <br>
              The rounding is useful for optimization: projections with
              identical phases can be forward and backprojected
              together, which is faster than one-by-one, and with
              high-precision phase values, there are never two equal
              phase values. </p>
            <p><br>
            </p>
            <p>So I just fixed the bug by setting the phase to 0 when
              its rounding is equal to 1, which should do the trick. The
              pull request is being tested, it should be merged soon. <br>
            </p>
            <p><br>
            </p>
            <p>Thanks for reporting your issue.<br>
            </p>
            <p>Regards,</p>
            <p>Cyril<br>
            </p>
            <br>
            <div class="moz-cite-prefix">On 09/01/2018 11:31, Cyril Mory
              wrote:<br>
            </div>
            <blockquote type="cite"
              cite="mid:66e33d08-af6f-0d34-d5c4-628ad91a157c@creatis.insa-lyon.fr">
              <meta http-equiv="Content-Type" content="text/html;
                charset=utf-8">
              <p>Hi Ruoyan,</p>
              <p><br>
              </p>
              <p>I've had a look at your file sphase.txt, it looks
                perfectly fine to me. The problem must lie elsewhere.
                Does the application 4D ROOSTER work with the example
                data provided on the wiki ? If it does, then the problem
                lies in your data. In that case, please run</p>
              <p><br>
              </p>
              <p>rtkprojections --path D:\bd\20171116 --regexp .*.his -o<span
                  style="line-height: 1.6;">D:\bd\20171116\</span><span
                  style="line-height: 1.6;">projections.mhd </span></p>
            </blockquote>
            <blockquote type="cite"
              cite="mid:66e33d08-af6f-0d34-d5c4-628ad91a157c@creatis.insa-lyon.fr">
              <p><br>
              </p>
              <p>and send us the "projections.mhd" file. It will contain
                only the metadata of your projections, and we'll be able
                to run the same command line as you and try to reproduce
                the problem.</p>
              <p><br>
              </p>
              <p>If, on the other hand, it doesn't even work with the
                example data provided on the wiki, it is a software
                problem. In that case, can you first update to the
                latest RTK (the git master branch), recompile and test
                again ?</p>
              <p><br>
              </p>
              <p>Best regards,</p>
              <p>Cyril<br>
              </p>
              <br>
              <div class="moz-cite-prefix">On 26/12/2017 10:47, ry.meng
                wrote:<br>
              </div>
              <blockquote type="cite"
                cite="mid:88BEDC3F-802B-4D7D-A627-C28A26D68ED5@siat.ac.cn">
                <meta http-equiv="Content-Type" content="text/html;
                  charset=utf-8">
                <style>
    *{
        margin: 0;
        padding: 0;
    }
    font{
        line-height: 1.6;
    }
    ul,ol{
        padding-left: 20px;
        list-style-position: inside;
    }
</style>
                <div style="font-family:"微软雅黑";
                  line-height:1.6;">
                  <div>
                    <div><span>Hi</span></div>
                    <div><span><br>
                      </span></div>
                    <div><span>Thank you for your reply. I have checked
                        the value in sphase.txt and don't have any
                        value </span><span style="font-family: Verdana,
                        微软雅黑, 宋体, sans-serif; line-height: 22.4px;">larger
                        or equal to 5. </span><font face="Verdana, 微软雅黑,
                        宋体, sans-serif">Maybe the problem lies
                        elsewhere? Thanks.</font></div>
                    <div><br>
                    </div>
                    <div>
                      <div style="line-height: 22.4px; font-family:
                        Verdana, 微软雅黑, 宋体, sans-serif;">
                        <p class="MsoNormal" style="margin: 0cm 0cm
                          0.0001pt; font-family: 'Times New Roman',
                          serif;"><span style="font-family: Verdana,
                            sans-serif;">Regards</span></p>
                      </div>
                      <div style="line-height: 22.4px; font-family:
                        Verdana, 微软雅黑, 宋体, sans-serif;">
                        <p class="MsoNormal" style="margin: 0cm 0cm
                          0.0001pt; font-family: 'Times New Roman',
                          serif;"><span style="font-family: Verdana,
                            sans-serif;">Ruoyan Meng</span></p>
                      </div>
                    </div>
                    <div id="ntes-pcmail-signature"
                      style="font-family:'微软雅黑'">
                      <style type="text/css">
        a#ntes-pcmail-signature-default:hover {
            text-decoration: underline;
            color: #199cff;
            cursor: pointer;
        }
        a#ntes-pcmail-signature-default:active {
            text-decoration: underline;
            color: #246fce;
            cursor: pointer;
        }
    </style> </div>
                  </div>
                  <div class="J-reply"
style="background-color:#f2f2f2;color:black;padding-top:6px;padding-bottom:6px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin-top:45px;margin-bottom:20px;font-family:'微软雅黑';">
                    <div
style="font-size:14px;line-height:1.5;word-break:break-all;margin-left:10px;margin-right:10px">On
                      <span class="mail-date">12/26/2017 17:14</span>,<a
                        class="mail-to"
                        style="text-decoration:none;color:#2a83f2;"
                        href="mailto:simon.rit@creatis.insa-lyon.fr"
                        moz-do-not-send="true">Simon
                        Rit<simon.rit@creatis.insa-lyon.fr></a>
                      wrote: </div>
                  </div>
                  <blockquote id="ntes-pcmail-quote" style="margin: 0;
                    padding: 0; font-size: 14px; font-family: '微软雅黑';">
                    <div dir="ltr">
                      <div>
                        <div>Hi,<br>
                        </div>
                        If you look at the <a
href="https://github.com/SimonRit/RTK/blob/master/code/rtkPhasesToInterpolationWeights.hxx#L154"
                          moz-do-not-send="true">code</a>, you'll see
                        that the error message corresponds to the case
                        where you have a phase which equals the number
                        of frames. This cannot be since it is 0-based.
                        In other words, with the option "--frames 5",
                        you cannot have a value larger or equal to 5 in
                        your file sphase.txt.<br>
                      </div>
                      Simon<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Mon, Dec 25, 2017 at
                        9:36 AM, ry.meng <span dir="ltr"><<a
                            href="mailto:ry.meng@siat.ac.cn"
                            target="_blank" moz-do-not-send="true">ry.meng@siat.ac.cn</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div>
                            <div
style="font-family:"\005fae\008f6f\0096c5\009ed1";line-height:1.6">
                              <div><span><br>
                                </span></div>
                              <div><span>Hi:</span></div>
                              <div><span> </span></div>
                              <div>When I tried  the application of 4D
                                ROOSTER Reconstruction with my own data,
                                it will stop for the following reason: <span
                                  style="line-height:22.4px">problem
                                  while determining the interpolation
                                  weights</span><span
                                  style="line-height:1.6">. Maybe you
                                  guys have met this problem before and
                                  have a solution for it. Thank you very
                                  much and I hope to receive your reply
                                  soon.</span></div>
                              <div>
                                <div
                                  style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:22.4px">
                                  <p class="MsoNormal"
                                    style="font-family:'Times New
                                    Roman',serif;margin:0cm 0cm
                                    0.0001pt"><font
                                      style="font-size:14px" size="2"><span
style="font-family:Verdana,sans-serif"><br>
                                      </span></font></p>
                                  <p class="MsoNormal"
                                    style="font-family:'Times New
                                    Roman',serif;margin:0cm 0cm
                                    0.0001pt"><font
                                      style="font-size:14px" size="2"><span
style="font-family:Verdana,sans-serif">Happy Holidays!</span></font></p>
                                  <p class="MsoNormal"
                                    style="font-family:'Times New
                                    Roman',serif;margin:0cm 0cm
                                    0.0001pt"><font
                                      style="font-size:14px" size="2"><span
style="font-family:Verdana,sans-serif"><br>
                                      </span></font></p>
                                  <p class="MsoNormal"
                                    style="font-family:'Times New
                                    Roman',serif;margin:0cm 0cm
                                    0.0001pt"><font
                                      style="font-size:14px" size="2"><span
style="font-family:Verdana,sans-serif">Regards</span></font></p>
                                </div>
                                <div
                                  style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:22.4px">
                                  <p class="MsoNormal"
                                    style="font-family:'Times New
                                    Roman',serif;margin:0cm 0cm
                                    0.0001pt"><font
                                      style="font-size:14px" size="2"><span
style="font-family:Verdana,sans-serif">Ruoyan Meng</span></font></p>
                                </div>
                                <div
                                  style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:22.4px">
                                  <p class="MsoNormal"
                                    style="font-family:'Times New
                                    Roman',serif;margin:0cm 0cm
                                    0.0001pt"><font
                                      style="font-size:14px" size="2"> </font></p>
                                </div>
                                <div
                                  style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:22.4px">
                                  <p class="MsoNormal"
                                    style="font-family:'Times New
                                    Roman',serif;margin:0cm 0cm
                                    0.0001pt"><font
                                      style="font-size:12px" size="2"><span
style="font-family:Verdana,sans-serif">------------------------------<wbr>------------------------------<wbr>------------------------------</span></font></p>
                                </div>
                                <div
                                  style="font-family:Verdana,微软雅黑,宋体,sans-serif;line-height:22.4px">
                                  <p class="MsoNormal"
                                    style="font-family:'Times New
                                    Roman',serif;margin:0cm 0cm
                                    0.0001pt"><span
                                      style="font-family:Verdana,sans-serif"><font
                                        style="font-size:12px" size="2">Research
                                        Center for Medical Robotics and
                                        Minimally Invasive Surgical
                                        Devices,<br
                                          style="font-family:Verdana,微软雅黑,宋体,sans-serif!important">
                                        Institute of Biomedical and
                                        Health Engineering,<br
                                          style="font-family:Verdana,微软雅黑,宋体,sans-serif!important">
                                        Shenzhen Institutes of Advanced
                                        Technology, Chinese Academy of
                                        Sciences<br
                                          style="font-family:Verdana,微软雅黑,宋体,sans-serif!important">
                                        Tel:       <a
                                          href="tel:+86%20185%207661%207767"
                                          value="+8618576617767"
                                          target="_blank"
                                          moz-do-not-send="true">+86-18576617767</a><br
style="font-family:Verdana,微软雅黑,宋体,sans-serif!important">
                                        Email:   <a
                                          href="mailto:qs.zhu@siat.ac.cn"
style="color:purple;font-family:Verdana,微软雅黑,宋体,sans-serif!important"
                                          target="_blank"
                                          moz-do-not-send="true">ry.meng@siat.ac.cn</a><br
style="font-family:Verdana,微软雅黑,宋体,sans-serif!important">
                                        Zip:       518055<br
                                          style="font-family:Verdana,微软雅黑,宋体,sans-serif!important">
                                        Add:      <a
href="https://maps.google.com/?q=No.+1068+Xueyuan+Avenue,+Nanshan,+Shenzhen,+China&entry=gmail&source=g"
                                          moz-do-not-send="true">No.
                                          1068 Xueyuan Avenue, Nanshan,
                                          Shenzhen, China</a></font></span></p>
                                </div>
                              </div>
                              <div><br>
                              </div>
                              <div><br>
                              </div>
                              <div><br>
                              </div>
                              <div><br>
                              </div>
                              <div><span><br>
                                </span></div>
                              <div
                                id="m_-1713882645712920986ntes-pcmail-signature"
style="font-family:'\005fae\008f6f\0096c5\009ed1'"> </div>
                            </div>
                          </div>
                          <br>
                          ______________________________<wbr>_________________<br>
                          Rtk-users mailing list<br>
                          <a href="mailto:Rtk-users@public.kitware.com"
                            moz-do-not-send="true">Rtk-users@public.kitware.com</a><br>
                          <a
                            href="https://public.kitware.com/mailman/listinfo/rtk-users"
                            rel="noreferrer" target="_blank"
                            moz-do-not-send="true">https://public.kitware.com/<wbr>mailman/listinfo/rtk-users</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                  <!--😀--> </div>
                <br>
                <fieldset class="mimeAttachmentHeader"></fieldset>
                <br>
                <pre wrap="">_______________________________________________
Rtk-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Rtk-users@public.kitware.com" moz-do-not-send="true">Rtk-users@public.kitware.com</a>
<a class="moz-txt-link-freetext" href="https://public.kitware.com/mailman/listinfo/rtk-users" moz-do-not-send="true">https://public.kitware.com/mailman/listinfo/rtk-users</a>
</pre>
              </blockquote>
              <br>
              <br>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <br>
              <pre wrap="">_______________________________________________
Rtk-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Rtk-users@public.kitware.com" moz-do-not-send="true">Rtk-users@public.kitware.com</a>
<a class="moz-txt-link-freetext" href="https://public.kitware.com/mailman/listinfo/rtk-users" moz-do-not-send="true">https://public.kitware.com/mailman/listinfo/rtk-users</a>
</pre>
            </blockquote>
            <br>
          </blockquote>
          <!--😀--> </div>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>