<div dir="ltr">Hi Simon,<div><br></div><div>I also got a question about how the weighting is performed.</div><div><br></div><div>Before the question, first of all there may be an error in rtk::ThreeDCircularProjectionGeometry::GetAngularGapsWithNext(...). I cannot see the reason for the factor 0.5 in the following code:</div><div><div>  //Last projection wraps the angle of the first one</div><div>  angularGaps[curr->second] = 0.5 * ( sangles.begin()->first + 2*vnl_math::pi - curr->first );</div></div><div>If this is indeed wrong, then the max gap can be underestimated in the ParkerShortScanImageFilter, which you use for the 20 degree condition.</div><div><br></div><div>Then here's the question: why does RTK eliminate the first and last projections before calculating the weights? The Parker weights are already all zeros for the first and the last projections involved in the calculation. If you rule out the first and the last projection in the data set in advance, you then have four projections with zeros and the effective scan angle is smaller then the actual short scan, which may lead to an insufficient data problem.</div><div><br></div><div>Best regards,</div><div>Chao</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-18 18:18 GMT+01: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 Shiras,<br>
    Sorry for the delayed answer, times are busy. The way RTK computes
    the spanned arc is from the second projection angle to the before
    last projection angle, i.e., in your case<br>
    209.609216488925-11.6067737022482<br>
    so it's a span of 199 degrees and your cone angle is indeed too
    large. Like I said, this part of RTK is perfectible and there is no
    way to change this but change the code.<br>
    However, the source of artefacts might be something else. On
    simulated data, I tried:<br>
      rtkprojectshepploganphantom --like original_proj.mhd -g
    geometry_parker_corr.xml -o proj.mha<br>
      rtkfdk -p . -r proj.mha -o fdk.mha -g geometry_parker_corr.xml<br>
    and the result is not that bad. What do you think? Can you show us a
    snapshot if sg's wrong in your opinion?<span class="HOEnZb"><font color="#888888"><br>
    Simon</font></span><div><div class="h5"><br>
    <br>
    <div>On 09/12/2015 11:01, Shiras Abdurahman
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Dear Simon,
        <div><br>
        </div>
        <div>I am attaching the mhd files of projections.</div>
        <div><br>
        </div>
        <div>With regards,</div>
        <div>Shiras</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Dec 8, 2015 at 6:17 PM, Simon
          Rit <span dir="ltr"><<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>
                <div>Hi,<br>
                </div>
                The geometry files look ok to me. What is the projection
                information? If you're still getting the same message as
                before, I think it's because you don't have enough data.
                If you send the mhd file of the projections (just the
                mhd, not the raw data), I can try to test it on
                simulated data to let you know my feeling.<span><font color="#888888"><br>
                  </font></span></div>
              <span><font color="#888888">Simon<br>
                </font></span></div>
            <div>
              <div>
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Tue, Dec 8, 2015 at 5:41
                    PM, Shiras Abdurahman <span dir="ltr"><<a href="mailto:shiraska@gmail.com" target="_blank"></a><a href="mailto:shiraska@gmail.com" target="_blank">shiraska@gmail.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="ltr">Dear Simon,
                        <div><br>
                        </div>
                        <div>I tried this option and unfortunately it
                          did not work. I added zero projections and
                          modified geometry files. However, I am getting
                          same artifacts in the volume. Voxel values
                          changed a little bit that indicates during
                          backprojection it still considers extreme
                          projections. I am also getting an output
                          message same as before.</div>
                        <div><br>
                        </div>
                        <div>I am attaching geometry files.</div>
                        <div><br>
                        </div>
                        <div>With regards,</div>
                        <div>Shiras</div>
                      </div>
                      <div>
                        <div>
                          <div class="gmail_extra"><br>
                            <div class="gmail_quote">On Tue, Dec 8, 2015
                              at 10:15 AM, Simon Rit <span dir="ltr"><<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>
                              wrote:<br>
                              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                <div dir="ltr">
                                  <div>So calling AddProjection before
                                    and after the loop with an adequate
                                    gantry_angle should work.<span><font color="#888888"><br>
                                      </font></span></div>
                                  <span><font color="#888888">Simon<br>
                                    </font></span></div>
                                <div>
                                  <div>
                                    <div class="gmail_extra"><br>
                                      <div class="gmail_quote">On Tue,
                                        Dec 8, 2015 at 9:52 AM, Shiras
                                        Abdurahman <span dir="ltr"><<a href="mailto:shiraska@gmail.com" target="_blank"></a><a href="mailto:shiraska@gmail.com" target="_blank">shiraska@gmail.com</a>></span>
                                        wrote:<br>
                                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                          <div dir="ltr">Drear Simon, 
                                            <div><br>
                                            </div>
                                            <div>I generate the geometry
                                              with system geometry
                                              parameters and using
                                              AddProjection method.</div>
                                            <div><br>
                                            </div>
                                            <div>Here is the code</div>
                                            <div><br>
                                            </div>
                                            <div><br>
                                            </div>
                                            <div>
                                              <div><span style="white-space:pre-wrap">    </span>rtk::ThreeDCircularProjectionGeometry::Pointer
                                                rtk_sys_geometry_;</div>
                                              <div><span style="white-space:pre-wrap">    </span>rtk_sys_geometry_
                                                =
                                                rtk::ThreeDCircularProjectionGeometry::New();</div>
                                              <div><span style="white-space:pre-wrap">    </span>for
                                                (uint16_t proj_index =
                                                0; proj_index <
                                                num_projections_;
                                                proj_index++)</div>
                                              <div><span style="white-space:pre-wrap">    </span>{</div>
                                              <div><span style="white-space:pre-wrap">            </span>rtk_sys_geometry_->AddProjection(rtk_geom_params_.at(proj_index).sid_mm,</div>
                                              <div><span style="white-space:pre-wrap">                    </span>rtk_geom_params_.at(proj_index).sdd_mm,</div>
                                              <div><span style="white-space:pre-wrap">                    </span>rtk_geom_params_.at(proj_index).gantry_angle_deg,</div>
                                              <div><span style="white-space:pre-wrap">                    </span>rtk_geom_params_.at(proj_index).proj_offset_x_mm,</div>
                                              <div><span style="white-space:pre-wrap">                    </span>rtk_geom_params_.at(proj_index).proj_offset_y_mm,</div>
                                              <div><span style="white-space:pre-wrap">                    </span>rtk_geom_params_.at(proj_index).out_plane_angle_deg,</div>
                                              <div><span style="white-space:pre-wrap">                    </span>rtk_geom_params_.at(proj_index).in_plane_angle_deg,</div>
                                              <div><span style="white-space:pre-wrap">                    </span>rtk_geom_params_.at(proj_index).src_offset_x_mm,</div>
                                              <div><span style="white-space:pre-wrap">                    </span>rtk_geom_params_.at(proj_index).src_offset_y_mm);</div>
                                              <div><span style="white-space:pre-wrap">    </span>}</div>
                                            </div>
                                            <div><br>
                                            </div>
                                            <div><span style="white-space:pre-wrap"> And then write to xml file.</span></div>
                                            <span><font color="#888888">
                                                <div><br>
                                                </div>
                                                <div>Shiras</div>
                                                <div><br>
                                                </div>
                                                <div><br>
                                                </div>
                                              </font></span></div>
                                          <div>
                                            <div>
                                              <div class="gmail_extra"><br>
                                                <div class="gmail_quote">On
                                                  Tue, Dec 8, 2015 at
                                                  9:23 AM, Simon Rit <span dir="ltr"><<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>
                                                  wrote:<br>
                                                  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                    <div dir="ltr">
                                                      <div>
                                                        <div>
                                                          <div>
                                                          <div>
                                                          <div>
                                                          <div>Hi,<br>
                                                          </div>
                                                          rtkfdk.cxx
                                                          just read the
                                                          geometry from
                                                          a file so the
                                                          best is to
                                                          modify the
                                                          geometry file.
                                                          How do you
                                                          generate the
                                                          geometry?<br>
                                                          </div>
                                                          For example,
                                                          if you use
                                                          rtksimulated
                                                          geometry,
                                                          let's say that
                                                          you were
                                                          using:<br>
                                                          </div>
                                                          rtksimulatedgeometry
                                                          -n 200 -a 200
                                                          -o g.xml<br>
                                                          </div>
                                                          then you'll
                                                          have to
                                                          replace it
                                                          with<br>
                                                          rtksimulatedgeometry
                                                          -n 202 -a 202
                                                          -o g.xml -f -1<br>
                                                        </div>
                                                        Don't forget to
                                                        add dummy
                                                        projection at
                                                        the beginning
                                                        and the end. If
                                                        you use a more
                                                        complex
                                                        geometry, maybe
                                                        <a href="http://wiki.openrtk.org/index.php?title=SimpleRTK" target="_blank">SimpleRTK</a>
                                                        can be helpful
                                                        (I'd use that)
                                                        or you'd have to
                                                        modify the cxx
                                                        code to add
                                                        these additional
                                                        projections in
                                                        the geometry and
                                                        the projection
                                                        stack.<span><font color="#888888"><br>
                                                          </font></span></div>
                                                      <span><font color="#888888">Simon<br>
                                                          <div>
                                                          <div>
                                                          <div><br>
                                                          </div>
                                                          </div>
                                                          </div>
                                                        </font></span></div>
                                                    <div>
                                                      <div>
                                                        <div class="gmail_extra"><br>
                                                          <div class="gmail_quote">On
                                                          Tue, Dec 8,
                                                          2015 at 8:51
                                                          AM, Shiras
                                                          Abdurahman <span dir="ltr"><<a href="mailto:shiraska@gmail.com" target="_blank"></a><a href="mailto:shiraska@gmail.com" target="_blank">shiraska@gmail.com</a>></span>
                                                          wrote:<br>
                                                          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                          <div dir="ltr">Dear
                                                          Simon,
                                                          <div><br>
                                                          </div>
                                                          <div>Thanks a
                                                          lot for the
                                                          reply. Can you
                                                          please inform
                                                          me how can I
                                                          set where the
                                                          arc starts?</div>
                                                          <div>Do I need
                                                          to modify
                                                          geometry also?</div>
                                                          <div>If you
                                                          can point the
                                                          line of code
                                                          rtkfdk.cxx, it
                                                          will be really
                                                          helpful.</div>
                                                          <div><br>
                                                          </div>
                                                          <div>With
                                                          regards,</div>
                                                          <div>Shiras</div>
                                                          </div>
                                                          <div>
                                                          <div>
                                                          <div class="gmail_extra"><br>
                                                          <div class="gmail_quote">On
                                                          Tue, Dec 8,
                                                          2015 at 7:56
                                                          AM, Simon Rit
                                                          <span dir="ltr"><<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>
                                                          wrote:<br>
                                                          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                          <div bgcolor="#FFFFFF" text="#000000"><span>
                                                          Dear Shiras,<br>
                                                          Yes, for
                                                          practical
                                                          reasons the
                                                          first and the
                                                          last
                                                          projections
                                                          are set to 0
                                                          and the arc
                                                          used in the
                                                          Parker
                                                          weighting
                                                          starts between
                                                          the first two
                                                          projections
                                                          and ends
                                                          between the
                                                          lasts two
                                                          projections.
                                                          There is a
                                                          simple
                                                          solution: add
                                                          a projection
                                                          at the
                                                          beginning and
                                                          the end of the
                                                          arc, which can
                                                          contain any
                                                          pixel values
                                                          but should be
                                                          set where you
                                                          want this arc
                                                          to start. In
                                                          the future, I
                                                          think someone
                                                          should once
                                                          take the time
                                                          to correct
                                                          this but I
                                                          haven't so
                                                          far. I'll keep
                                                          you posted on
                                                          the mailing
                                                          list when it's
                                                          corrected.<br>
                                                          Simon<br>
                                                          <br>
                                                          <div>On
                                                          07/12/2015
                                                          12:04, Shiras
                                                          Abdurahman
                                                          wrote:<br>
                                                          </div>
                                                          </span>
                                                          <blockquote type="cite">
                                                          <div>
                                                          <div>
                                                          <div dir="ltr">Hi
                                                          all,
                                                          <div><br>
                                                          </div>
                                                          <div>I am
                                                          trying to
                                                          reconstruct a
                                                          volume from
                                                          projection
                                                          data generated
                                                          with C-arm CT.
                                                          There are 248
                                                          projections
                                                          with an
                                                          angular range
                                                          of 199 degree.
                                                          Technically,
                                                          parker
                                                          weighting
                                                          should run
                                                          without any
                                                          problems.
                                                          However, I am
                                                          getting an
                                                          output message
                                                          that "You do
                                                          not have
                                                          enough data
                                                          for proper
                                                          parker
                                                          weighting".
                                                          After parker
                                                          weighting, the
                                                          two extreme
                                                          projections
                                                          (projection
                                                          number 1 and
                                                          248) were
                                                          completely
                                                          zero and thus
                                                          reconstructed
                                                          volume
                                                          contained
                                                          artifacts.
                                                          When I
                                                          increased the
                                                          angular range,
                                                          this problem
                                                          did not
                                                          happen. How
                                                          can I solve
                                                          this problem
                                                          without
                                                          increasing
                                                          angular range?
                                                          Is there any
                                                          threshold
                                                          constant that
                                                          I can change
                                                          in command
                                                          line  or in my
                                                          code?</div>
                                                          <div><br>
                                                          </div>
                                                          <div>I really
                                                          appreciate any
                                                          help you can
                                                          provide.</div>
                                                          <div><br>
                                                          </div>
                                                          <div>With
                                                          regards,</div>
                                                          <div>Shiras</div>
                                                          </div>
                                                          <br>
                                                          <fieldset></fieldset>
                                                          <br>
                                                          </div>
                                                          </div>
                                                          <span>
                                                          <pre>_______________________________________________
Rtk-users mailing list
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a>
<a href="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a>
</pre>
                                                          </span></blockquote>
                                                          <br>
                                                          </div>
                                                          </blockquote>
                                                          </div>
                                                          <br>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          </blockquote>
                                                          </div>
                                                          <br>
                                                        </div>
                                                      </div>
                                                    </div>
                                                  </blockquote>
                                                </div>
                                                <br>
                                              </div>
                                            </div>
                                          </div>
                                        </blockquote>
                                      </div>
                                      <br>
                                    </div>
                                  </div>
                                </div>
                              </blockquote>
                            </div>
                            <br>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com">Rtk-users@public.kitware.com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a><br>
<br></blockquote></div><br></div>