<div dir="ltr"><div><div><div>Hi Simon,<br><br></div>thank you for your code. Unfortunately, I can not work on this any longer. I hope it will be useful for someone else.<br><br></div>Cheers,<br></div>MG<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-05 9:32 GMT-05:00 Simon Rit <span dir="ltr"><<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi MG,<br>
    Sorry, I realized I said something stupid. Using tif or mha won't
    make any difference because there is a branching on the pixel type
    in the <a href="http://www.openrtk.org/Doxygen/classrtk_1_1ProjectionsReader.html" target="_blank">projectionsreader</a>
    (search for ushort in the graph of the <a href="http://www.openrtk.org/Doxygen/classrtk_1_1ProjectionsReader.html" target="_blank">doxygen
      doc</a>) and unsigned short are handled differently. <br>
    The enclosed pyhon code will reproduce the same as my previous
    command line application. The commented code in it is what I
    initially used to read projections without any processing, i.e.,
    assuming line integrals.<br>
    I still think there is a problem in the geometry but someone (you?)
    has to spend sometime trying to understand what are the parameters
    from the Matlab code.<br>
    Keep us posted and good luck,<br>
    Simon<div><div class="h5"><br>
    <br>
    <div>On 28/01/2016 22:27, MG Vallet wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Louie,
        <div>I played with sdd and sid, following your advise. But they
          have few effect, clearly less effect than proj_iso_x. And none
          of these parameters can significantly improve my result. </div>
        <div><br>
        </div>
        <div>Simon,</div>
        <div>I carefully checked every input data and I cant see what I
          did wrong. I want first to reproduce your output. You said
          earlier it's easy to convert a series of tiff image into a mha
          file using SimpleRTK. Do you mean by writing a short program,
          or is it possible from the command line ? </div>
        <div><br>
        </div>
        <div>MG</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2016-01-26 17:17 GMT-05:00 louie L <span dir="ltr"><<a href="mailto:ghostcz@hotmail.com" target="_blank">ghostcz@hotmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div link="blue" vlink="#954F72" lang="EN-US">
              <div>
                <p class="MsoNormal">Hi MG,</p>
                <p class="MsoNormal"> </p>
                <p class="MsoNormal">Sometimes, the progressive
                  deformation from the center of rotation to the edge of
                  the image is caused by wrong sdd/sid ratio. Such as
                  change in the geometry will lead to distortion of the
                  image and wrong magnification.</p>
                <p class="MsoNormal">Maybe you can play with that
                  parameter and report your result. </p>
                <p class="MsoNormal"> </p>
                <p class="MsoNormal">Cheers,</p>
                <p class="MsoNormal">Louie</p>
                <p class="MsoNormal"> </p>
                <p class="MsoNormal">Sent from <a href="http://go.microsoft.com/fwlink/?LinkId=550986" target="_blank">Mail</a> for Windows 10</p>
                <p class="MsoNormal"><span> </span></p>
                <div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
                  <p class="MsoNormal" style="border:none;padding:0in"><br>
                    <b>From: </b><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">Simon Rit</a><br>
                    <b>Sent: </b>Tuesday, January 26, 2016 13:24<br>
                    <b>To: </b><a href="mailto:mgvallet.pro@gmail.com" target="_blank">MG Vallet</a><br>
                    <b>Cc: </b><a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a><br>
                    <b>Subject: </b>Re: [Rtk-users] Sophia beads
                    reconstruction</p>
                </div>
                <div>
                  <div>
                    <p class="MsoNormal"><span> </span></p>
                    <div>
                      <div>
                        <div>
                          <p class="MsoNormal"><span>Hi,</span><span></span></p>
                        </div>
                        <p class="MsoNormal"><span>I think it's likely a
                            problem with parameters. The best would be
                            to obtain them from the Matlab code they
                            provide.</span></p>
                      </div>
                      <div>
                        <p class="MsoNormal"><span>Good luck,</span></p>
                      </div>
                      <p class="MsoNormal"><span>Simon</span></p>
                    </div>
                  </div>
                </div>
                <div>
                  <p class="MsoNormal"><span> </span></p>
                  <div>
                    <div>
                      <div>
                        <p class="MsoNormal"><span>On Mon, Jan 25, 2016
                            at 5:48 PM, MG Vallet <<a href="mailto:mgvallet.pro@gmail.com" target="_blank"></a><a href="mailto:mgvallet.pro@gmail.com" target="_blank">mgvallet.pro@gmail.com</a>>
                            wrote:</span></p>
                      </div>
                    </div>
                    <blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
                      <div>
                        <div>
                          <div>
                            <p class="MsoNormal"><span>Hi Simon,</span></p>
                            <div>
                              <p class="MsoNormal"><span> </span></p>
                            </div>
                            <div>
                              <p class="MsoNormal"><span>this was a
                                  point I missed. I had to do the log
                                  mapping.</span></p>
                            </div>
                            <div>
                              <p class="MsoNormal"><span> </span></p>
                            </div>
                            <div>
                              <p class="MsoNormal"><span>I must say, I
                                  do not use RTK from shell. I just
                                  plugged the objects</span></p>
                            </div>
                            <div>
                              <p class="MsoNormal"><span>FDKConeBeamReconstructionFilter
                                  and ThreeDCircularProjectionGeometry
                                  from RTK into a visualisation
                                  software. That's the reason I'm not
                                  absolutely sure about the length
                                  parameter setting.</span></p>
                            </div>
                            <div>
                              <p class="MsoNormal"><span> </span></p>
                            </div>
                            <div>
                              <p class="MsoNormal"><span>Anyway, I'm now
                                  pretty close to your result. I believe
                                  the only difference is the progressive
                                  deformation of beads with the distance
                                  to center.</span></p>
                            </div>
                            <div>
                              <p class="MsoNormal"><span> </span></p>
                            </div>
                            <div>
                              <p class="MsoNormal"><span>What's your
                                  opinion : is there another step I
                                  might have missed, or is it more
                                  likely a problem with parameters ?</span></p>
                            </div>
                            <div>
                              <p class="MsoNormal"><span> </span></p>
                            </div>
                            <div>
                              <p class="MsoNormal"><span>MG</span></p>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div>
                            <p class="MsoNormal"><span> </span></p>
                            <div>
                              <div>
                                <div>
                                  <p class="MsoNormal"><span>2016-01-21
                                      14:22 GMT-05:00 Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank"></a><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>>:</span></p>
                                </div>
                              </div>
                              <blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
                                <div>
                                  <div>
                                    <div>
                                      <p class="MsoNormal"><span>Not
                                          exactly.
                                          rtk::FDKConeBeamProjectionFilter
                                          assumes that you pass the line
                                          integral (ln(I0/I)). But
                                          rtkfdk uses the
                                          ProjectionsReader to read the
                                          projections and converts them
                                          depending on the type: for mha
                                          or mhd, it just reads it and
                                          nothing else. For tif, it
                                          assumes that I is passed, try
                                          to guess I0 (or gets it from
                                          the cmd line) and computes
                                          ln(I0/I).<br>
                                          So from each tif projection,
                                          instead of letting them go
                                          through the ProjectionsReader
                                          in RTK, directly use the
                                          ImageReader, stack them and
                                          pass it to the reconstruction
                                          algorithm. In other words, if
                                          you use SimpleRTK, use
                                          ImageSeriesReader instead of
                                          ProjectionsReader.<br>
                                          Regarding the geometry, it
                                          would be nice to be confident
                                          in the geometry parameters,
                                          maybe from their Matlab code?<span style="color:#888888"><br>
                                            Simon</span></span></p>
                                    </div>
                                  </div>
                                  <div>
                                    <div>
                                      <div>
                                        <div>
                                          <p class="MsoNormal" style="margin-bottom:12.0pt"><span> </span></p>
                                          <div>
                                            <p class="MsoNormal"><span>On
                                                21/01/2016 20:02, MG
                                                Vallet wrote:</span></p>
                                          </div>
                                        </div>
                                      </div>
                                      <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                                        <div>
                                          <div>
                                            <div>
                                              <p class="MsoNormal"><span>Hi
                                                  Simon and Cyril, </span></p>
                                              <div>
                                                <p class="MsoNormal"><span> </span></p>
                                              </div>
                                              <div>
                                                <p class="MsoNormal"><span>I
                                                    really appreciate
                                                    your insight.</span></p>
                                              </div>
                                              <div>
                                                <p class="MsoNormal"><span> </span></p>
                                              </div>
                                              <div>
                                                <p class="MsoNormal"><span>By
                                                    examining the
                                                    parameters of the
                                                    acquisition, I saw
                                                    that the center must
                                                    effectively be
                                                    offset (4.8 mm in
                                                    both directions).
                                                    For the attached
                                                    image, I also
                                                    increases sdd and
                                                    sid by a factor
                                                    1000, just in case I
                                                    would be wrong in
                                                    units. It reduces
                                                    the first default I
                                                    pointed out in my
                                                    first message. Also
                                                    note that my input
                                                    dataset was </span><span>SophiaBeads_512_averaged.</span><span></span></p>
                                              </div>
                                              <div>
                                                <p class="MsoNormal"><span> </span></p>
                                              </div>
                                              <div>
                                                <p class="MsoNormal"><span>Regarding
                                                    the
                                                    pre-processing mentioned by
                                                    Simon, I need more
                                                    help. Is it as
                                                    simple as the FDK
                                                    filter assumes that
                                                    the input is
                                                    intensity, but the
                                                    dataset provides
                                                    -ln(I/I0) ?</span><span></span></p>
                                              </div>
                                              <div>
                                                <p class="MsoNormal"><span> </span></p>
                                              </div>
                                              <div>
                                                <p class="MsoNormal"><span>Regards,</span><span></span></p>
                                              </div>
                                              <div>
                                                <p class="MsoNormal"><span>mg</span><span></span></p>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                        <div>
                                          <p class="MsoNormal"><span> </span></p>
                                          <div>
                                            <div>
                                              <div>
                                                <p class="MsoNormal"><span>2016-01-20
                                                    3:33 GMT-05:00 Simon
                                                    Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank"></a><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>>:</span></p>
                                              </div>
                                            </div>
                                            <blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
                                              <div>
                                                <div>
                                                  <div>
                                                    <div>
                                                      <div>
                                                        <div>
                                                          <div>
                                                          <p class="MsoNormal"><span>Hi,</span></p>
                                                          </div>
                                                          <p class="MsoNormal"><span>I
                                                          quickly
                                                          checked
                                                          SophiaBeads_64_averaged.zip.
                                                          First, it
                                                          seems that
                                                          what is
                                                          provided is
                                                          directly the
                                                          line integral.
                                                          RTK will
                                                          process the
                                                          tif images as
                                                          if it were a
                                                          photon count
                                                          so I converted
                                                          the tif
                                                          projections to
                                                          mha to avoid
                                                          this. For the
                                                          conversion, I
                                                          used another
                                                          piece of
                                                          software but
                                                          you can easily
                                                          do the same
                                                          thing with
                                                          SimpleRTK.</span></p>
                                                        </div>
                                                        <p class="MsoNormal"><span>Second,
                                                          I used the
                                                          enclosed
                                                          script which
                                                          gives me a
                                                          much better
                                                          result. I have
                                                          however a
                                                          geometry
                                                          problem. I
                                                          think they
                                                          provide a
                                                          Matlab piece
                                                          of code to get
                                                          the center of
                                                          rotation. If
                                                          you can run it
                                                          and find out
                                                          what is this
                                                          center, then
                                                          you can use it
                                                          to configure
                                                          the geometry
                                                          better with
                                                          the options
                                                          --proj_iso_x
                                                          and
                                                          --proj_iso_y.</span></p>
                                                      </div>
                                                      <p class="MsoNormal"><span>Good
                                                          luck,</span></p>
                                                    </div>
                                                    <p class="MsoNormal"><span>Simon</span></p>
                                                  </div>
                                                </div>
                                              </div>
                                              <div>
                                                <div>
                                                  <div>
                                                    <p class="MsoNormal"><span> </span></p>
                                                    <div>
                                                      <div>
                                                        <div>
                                                          <p class="MsoNormal"><span>On
                                                          Tue, Jan 19,
                                                          2016 at 8:02
                                                          PM, MG Vallet
                                                          <<a href="mailto:mgvallet.pro@gmail.com" target="_blank"></a><a href="mailto:mgvallet.pro@gmail.com" target="_blank">mgvallet.pro@gmail.com</a>>
                                                          wrote:</span></p>
                                                        </div>
                                                      </div>
                                                      <blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
                                                        <div>
                                                          <div>
                                                          <div>
                                                          <p class="MsoNormal"><span>Thanks
                                                          Cyril! </span></p>
                                                          <div>
                                                          <p class="MsoNormal"><span>going
                                                          to carefully
                                                          check my
                                                          inputs and I
                                                          give you some
                                                          news.</span></p>
                                                          </div>
                                                          <div>
                                                          <p class="MsoNormal"><span>mgv</span></p>
                                                          </div>
                                                          </div>
                                                          </div>
                                                        </div>
                                                        <div>
                                                          <div>
                                                          <div>
                                                          <p class="MsoNormal"><span> </span></p>
                                                          <div>
                                                          <div>
                                                          <div>
                                                          <p class="MsoNormal"><span>2016-01-19
                                                          10:33
                                                          GMT-05:00
                                                          Cyril Mory
                                                          <<a href="mailto:cyril.mory@uclouvain.be" target="_blank"></a><a href="mailto:cyril.mory@uclouvain.be" target="_blank">cyril.mory@uclouvain.be</a>>:</span></p>
                                                          </div>
                                                          </div>
                                                          <blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
                                                          <div>
                                                          <div>
                                                          <div>
                                                          <p class="MsoNormal"><span>Hi,
                                                          <br>
                                                          <br>
                                                          It looks like
                                                          the geometry
                                                          is wrong
                                                          indeed,
                                                          because I have
                                                          never seen
                                                          such
                                                          artifacts.<br>
                                                          <br>
                                                          Hope that
                                                          helps,<br>
                                                          Cyril </span></p>
                                                          <div>
                                                          <div>
                                                          <p class="MsoNormal" style="margin-bottom:12.0pt"><span> </span></p>
                                                          <div>
                                                          <p class="MsoNormal"><span>Le
                                                          19/01/2016
                                                          16:19, MG
                                                          Vallet a
                                                          écrit :</span></p>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                                                          <div>
                                                          <div>
                                                          <div>
                                                          <p class="MsoNormal"><span>Dear
                                                          rtk-users, </span></p>
                                                          <div>
                                                          <p class="MsoNormal"><span> </span></p>
                                                          </div>
                                                          <div>
                                                          <p class="MsoNormal"><span>I
                                                          applied the </span><span>FDKConeBeamReconstructionFilter to a data set
                                                          from </span><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333"><a href="https://zenodo.org/record/16539" target="_blank"></a><a href="https://zenodo.org/record/16539" target="_blank">https://zenodo.org/record/16539</a>. </span><span></span></p>
                                                          </div>
                                                          <div>
                                                          <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#333333">This
                                                          is a plastic
                                                          tube filled
                                                          with glass
                                                          beads that has
                                                          been scanned.</span><span></span></p>
                                                          </div>
                                                          <div>
                                                          <p class="MsoNormal"><span> </span></p>
                                                          </div>
                                                          <div>
                                                          <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#333333">Attached
                                                          is a view of
                                                          the
                                                          reconstructed
                                                          central slice.
                                                          It is found
                                                          that:</span><span></span></p>
                                                          </div>
                                                          <div>
                                                          <ol start="1" type="1">
                                                          <li class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#333333">the
                                                          beads are
                                                          quickly
                                                          deformed
                                                          outside the
                                                          center</span><span></span></li>
                                                          <li class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#333333">each
                                                          one has a
                                                          halo, or a
                                                          shadow (dont
                                                          know the
                                                          proper term)</span><span></span></li>
                                                          </ol>
                                                          </div>
                                                          <div>
                                                          <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#333333">My
                                                          question is if
                                                          these are
                                                          simply
                                                          expected
                                                          artifacts. I
                                                          am not 100%
                                                          sure I
                                                          properly set
                                                          the geometry
                                                          parameters.</span><span></span></p>
                                                          </div>
                                                          <div>
                                                          <p class="MsoNormal"><span> </span></p>
                                                          </div>
                                                          <div>
                                                          <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#333333">Regards,</span><span></span></p>
                                                          </div>
                                                          <div>
                                                          <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#333333">mgv</span><span></span></p>
                                                          </div>
                                                          </div>
                                                          <p class="MsoNormal" style="margin-bottom:12.0pt"><span> </span></p>
                                                          </div>
                                                          </div>
                                                          <pre>_______________________________________________</pre>
                                                          <pre>Rtk-users mailing list</pre>
                                                          <pre><a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a></pre>
                                                          <pre><a href="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a></pre>
                                                          </blockquote>
                                                          <p class="MsoNormal" style="margin-bottom:12.0pt"><span><br>
                                                          <br>
                                                          </span></p>
                                                          <p class="MsoNormal"><span></span></p>
                                                          </div>
                                                          </div>
                                                          <span>
                                                          <table style="border-collapse:collapse" border="0" cellpadding="0" cellspacing="0">
                                                          <tbody>
                                                          <tr>
                                                          <td style="padding:0in 11.25pt 0in 6.0pt">
                                                          <p class="MsoNormal"><span></span></p>
                                                          <br>
                                                          </td>
                                                          <td style="padding:.75pt .75pt .75pt .75pt">
                                                          <p><span style="font-family:"Calibri",sans-serif;color:#3d4d5a">L'absence
                                                          de virus dans
                                                          ce courrier
                                                          électronique a
                                                          été vérifiée
                                                          par le
                                                          logiciel
                                                          antivirus
                                                          Avast. <br>
                                                          <a href="https://www.avast.com/antivirus" target="_blank"></a><a href="http://www.avast.com" target="_blank">www.avast.com</a>
                                                          </span></p>
                                                          </td>
                                                          </tr>
                                                          </tbody>
                                                          </table>
                                                          <p class="MsoNormal"><span> </span></p>
                                                          </span></div>
                                                          </blockquote>
                                                          </div>
                                                          <p class="MsoNormal"><span> </span></p>
                                                          </div>
                                                          </div>
                                                        </div>
                                                        <span>
                                                          <p class="MsoNormal" style="margin-bottom:12.0pt"><span><br>
_______________________________________________<br>
                                                          Rtk-users
                                                          mailing list<br>
                                                          <a href="mailto:Rtk-users@public.kitware.com" target="_blank"></a><a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a><br>
                                                          <a href="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank"></a><a href="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a></span></p>
                                                        </span></blockquote>
                                                    </div>
                                                    <p class="MsoNormal"><span> </span></p>
                                                  </div>
                                                </div>
                                              </div>
                                            </blockquote>
                                          </div>
                                          <p class="MsoNormal"><span> </span></p>
                                        </div>
                                      </blockquote>
                                      <p class="MsoNormal"><span> </span></p>
                                    </div>
                                  </div>
                                </div>
                              </blockquote>
                            </div>
                            <p class="MsoNormal"><span> </span></p>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
                <p class="MsoNormal"><span> </span></p>
                <p class="MsoNormal"> </p>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>