<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><font face="Calibri,sans-serif">A few more sentences on this
        point:</font></p>
    <p><font face="Calibri,sans-serif">- Indeed, very few RTK filters currently
        perform progress reporting<br>
      </font></p>
    <p><font face="Calibri,sans-serif">- For pipelines (instead of
        individual filters), you want to use that class:
        <a class="moz-txt-link-freetext" href="https://itk.org/Doxygen/html/classitk_1_1ProgressAccumulator.html">https://itk.org/Doxygen/html/classitk_1_1ProgressAccumulator.html</a>.</font></p>
    <p><font face="Calibri,sans-serif">- Despite its name, "</font><font
        face="Calibri,sans-serif"><font face="Calibri,sans-serif">progress.CompletedPixel()</font>"
        can be called after any meaningful step, not just the update of
        a pixel. On iterative filters, for example,
        <a class="moz-txt-link-freetext" href="http://www.cs.cmu.edu/~galeotti/methods_course/ITK_Filters2.pdf">http://www.cs.cmu.edu/~galeotti/methods_course/ITK_Filters2.pdf</a>
        suggest that</font><font face="Calibri,sans-serif"><font
          face="Calibri,sans-serif"> ProgressReporter can be initialized
          with the maximum number of iterations instead of with the
          total number of pixels to update, and </font></font><font
        face="Calibri,sans-serif"><font face="Calibri,sans-serif"><font
            face="Calibri,sans-serif">progress.CompletedPixel() can be
            called at each iteration. </font>So if you are
          reconstructing with an iterative reconstruction filter, you
          could start by trying to add a ProgressReporter to that class,
          and count its iterations. That's for the modifications to
          perform in the RTK code, it is probably just a few lines for
          the first test.<br>
          <br>
          Now, your question was about the existence of some code to
          observe the progress of a filter, assuming that filter does
          call the </font></font><br>
      <font face="Calibri,sans-serif"><font face="Calibri,sans-serif"><font
            face="Calibri,sans-serif"><font face="Calibri,sans-serif"> </font></font><font
            face="Calibri,sans-serif"><font face="Calibri,sans-serif"><font
                face="Calibri,sans-serif">progress.CompletedPixel()
                adequately. You may want to check this ITK example: <br>
<a class="moz-txt-link-freetext" href="https://itk.org/Doxygen/html/SphinxExamples_2src_2Core_2Common_2ObserveAnEvent_2Code_8cxx-example.html">https://itk.org/Doxygen/html/SphinxExamples_2src_2Core_2Common_2ObserveAnEvent_2Code_8cxx-example.html</a><br>
                <br>
                I hope it helps,<br>
                Cyril</font></font></font></font></font></p>
    <br>
    <div class="moz-cite-prefix">On 09/11/2017 14:29, Simon Rit wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAF0oig3BsFgK3PCmORjKW+gzrcVy6C-h2PDdOYFUskrRm02Bjw@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>Dear Albert,<br>
                  </div>
                  We have not implemented anything in this direction so
                  far. But it would be useful to have it and I know
                  there is a mechanism to do that in ITK Have you ever
                  used it on your side?<br>
                </div>
                I think the idea is:<br>
              </div>
              - in the reconstruction filter, to create and regularly
              call a <a
                href="https://itk.org/Doxygen/html/classitk_1_1ProgressReporter.html"
                moz-do-not-send="true">ProgressReporter</a>,<br>
            </div>
            - where you want to observe the progress, you add an
            observer.<br>
          </div>
          There are many examples in ITK. If you want to do it, feel
          free to give it a try. If you need help, I'm happy to support
          your. I have created an <a
            href="https://github.com/SimonRit/RTK/issues/114"
            moz-do-not-send="true">issue</a> in github to keep it in
          mind.<br>
        </div>
        Simon<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Nov 9, 2017 at 1:27 PM,
          MURIENNE Albert <span dir="ltr"><<a
              href="mailto:albert.murienne@thalesgroup.com"
              target="_blank" moz-do-not-send="true">albert.murienne@thalesgroup.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="white" link="blue" vlink="purple" lang="FR">
              <div class="m_6924748700372247096WordSection1">
                <p class="MsoNormal"><span style="color:#1f497d"
                    lang="EN-US">Cyril, to be more precise : if I run a
                    long time reconstruction, I want to be available to
                    track progression of the computation (ie 0 to 1
                    floating index), to have an idea of how fast it is
                    running, if we are close to the end and so on…</span></p>
                <p class="MsoNormal"><span style="color:#1f497d"
                    lang="EN-US"> </span></p>
                <p class="MsoNormal"><span style="color:#1f497d"
                    lang="EN-US">Albert</span></p>
                <p class="MsoNormal"><span style="color:#1f497d"
                    lang="EN-US"> </span></p>
                <div>
                  <div style="border:none;border-top:solid #b5c4df
                    1.0pt;padding:3.0pt 0cm 0cm 0cm">
                    <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">De :</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                        Cyril Mory [mailto:<a
                          href="mailto:cyril.mory@creatis.insa-lyon.fr"
                          target="_blank" moz-do-not-send="true">cyril.mory@creatis.<wbr>insa-lyon.fr</a>]
                        <br>
                        <b>Envoyé :</b> jeudi 9 novembre 2017 13:25<br>
                        <b>À :</b> MURIENNE Albert; <a
                          href="mailto:rtk-users@public.kitware.com"
                          target="_blank" moz-do-not-send="true">rtk-users@public.kitware.com</a><br>
                        <b>Objet :</b> Re: [Rtk-users] Reconstruction
                        filter progress observer</span></p>
                  </div>
                </div>
                <div>
                  <div class="h5">
                    <p class="MsoNormal"> </p>
                    <p>Hello,</p>
                    <p>I am not sure I understand. Are you trying to
                      know, during runtime, which filter is currently
                      being updated ? </p>
                    <p>Otherwise, can you reformulate your question
                      (possibly with more context) ? </p>
                    <p class="MsoNormal" style="margin-bottom:12.0pt">Best,<br>
                      Cyril</p>
                    <div>
                      <p class="MsoNormal">On 09/11/2017 13:11, MURIENNE
                        Albert wrote:</p>
                    </div>
                    <blockquote
                      style="margin-top:5.0pt;margin-bottom:5.0pt">
                      <p class="MsoNormal"><span lang="EN-US">Hello,</span></p>
                      <p class="MsoNormal"><span lang="EN-US"> </span></p>
                      <p class="MsoNormal"><span lang="EN-US">Is there a
                          simple code example available to illustrate
                          the registration of an observer to be notified
                          with the progression of rtk’s reconstruction
                          filters?</span></p>
                      <p class="MsoNormal"><span lang="EN-US"> </span></p>
                      <p class="MsoNormal"><span lang="EN-US">Thanks in
                          advance for your help,</span></p>
                      <p class="MsoNormal"><span lang="EN-US"> </span></p>
                      <p class="MsoNormal"><span lang="EN-US">Regards</span></p>
                      <p class="MsoNormal"><span lang="EN-US"> </span></p>
                      <p class="MsoNormal">--</p>
                      <p class="MsoNormal"> </p>
                      <p class="MsoNormal">Albert Murienne</p>
                      <p class="MsoNormal"><span
                          style="font-size:12.0pt;font-family:"Times
                          New Roman","serif""><br>
                          <br>
                          <br>
                        </span></p>
                      <pre>______________________________<wbr>_________________</pre>
                      <pre>Rtk-users mailing list</pre>
                      <pre><a href="mailto:Rtk-users@public.kitware.com" target="_blank" moz-do-not-send="true">Rtk-users@public.kitware.com</a></pre>
                      <pre><a href="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank" moz-do-not-send="true">http://public.kitware.com/<wbr>mailman/listinfo/rtk-users</a></pre>
                    </blockquote>
                    <p class="MsoNormal"><span
                        style="font-size:12.0pt;font-family:"Times
                        New Roman","serif""> </span></p>
                  </div>
                </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="http://public.kitware.com/mailman/listinfo/rtk-users"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://public.kitware.com/<wbr>mailman/listinfo/rtk-users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>