<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Dear Zipai,</p>
    <p>I will answer to the mailing-list as well as it is an interesting
      question and other users could have similar interrogations.<br>
      There is unfortunately no way to do that with CASToR. However I do
      think the optimal approach would be to rebin the LORs before
      reconstruction and directly provide to castor-recon a list-mode
      with the repositioned LORs and adjusted normalization factors. I
      believe the main interest to integrate even-by-event motion
      correction during reconstruction would be to perform non-rigid
      deformation as in the approach developed by Yale group (<span
        lang="en-US"><a class="moz-txt-link-freetext" href="https://doi.org/10.1109/TMI.2017.2761756">https://doi.org/10.1109/TMI.2017.2761756</a> ). However
        implementing this approach in CASToR would require substantial
        changes to optimize the code performance, at the expense of
        genericity.</span></p>
    <p><span lang="en-US">Many thanks for the kind words about the
        workshop, always good to know it was useful to you and other
        attendees :) <br>
      </span></p>
    <p><span lang="en-US">Best regards,<br>
        Thibaut<br>
      </span></p>
    <p>
      <style type="text/css">
                p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 115%; text-align: left; orphans: 2; widows: 2 }
                p.western { font-family: "Times New Roman", serif; font-size: 11pt; so-language: fr-FR }
                p.cjk { font-family: ; font-size: 11pt; so-language: fr-FR }
                p.ctl { font-family: ; font-size: 11pt; so-language: ar-SA }
                a:link { color: #0000ff }</style>
      <style type="text/css">p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 115%; text-align: left; orphans: 2; widows: 2 }
                p.western { font-family: "Times New Roman", serif; font-size: 11pt; so-language: fr-FR }
                p.cjk { font-family: ; font-size: 11pt; so-language: fr-FR }
                p.ctl { font-family: ; font-size: 11pt; so-language: ar-SA }
                a:link { color: #0000ff }</style></p>
    <div class="moz-cite-prefix">On 11/03/2022 07:33, Zipai Wang wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CABOvga-4O6at6YH+uL4O927NBVQb_j8THdaSiOM0u+2-r+kPGw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Dear Dr. Merlin,
        <div><br>
        </div>
        <div>Thank you very much for your reply. I now understand why I
          got the same images even I force the normalization factors to
          be different.</div>
        <div><br>
        </div>
        <div>I have a further question. In my case (motion correction),
          I need to move a LOR from its original location to another
          location and rebin it to corresponding channels. But I think
          the rebinned event should be normalized with the normalization
          factor of its original channels. Is there a way to achieve
          this in CASToR? Like manually assigning a normalization factor
          to an event during the reconstruction.</div>
        <div><br>
        </div>
        <div>I understand that the CASToR can perform the motion
          correction by distorting the sensitivity image, but it will be
          great for us if it is possible to do it in a list-mode way. </div>
        <div><br>
        </div>
        <div>By the way, the CASToR works incredibly well and we learned
          a lot in the CASToR workshop we attended last year! Thank you
          very much, and I hope it is ok to send you a direct email to
          ask questions.</div>
        <div><br>
        </div>
        <div>Best regards,</div>
        <div>Zipai</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, Feb 21, 2022 at 7:22
          PM Thibaut Merlin <<a
            href="mailto:Thibaut.Merlin@univ-brest.fr"
            moz-do-not-send="true">Thibaut.Merlin@univ-brest.fr</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div style="font-family:Arial;font-size:14px">
            <p> Hi Zipai,<br>
              <br>
              You will get the error described in 1. when you try to
              reconstruct the list-mode with a datafile containing
              normalization correction factors without providing a
              normalization datafile containing these factors. The
              normalization correction factors must be included in both
              the regular datafile (using -df option) and the
              normalization datafile (using -norm option). Is it what
              you did ?<br>
              <br>
              Regarding 2., the factors in your normalization datafile
              will contribute to the correction in the image (through
              the sensitivity image which is generated before the
              reconstruction itself), while the correction factors in
              the datafile are used to normalize the additive background
              (scatter/random) during reconstruction. As your data does
              not contain scatter or random correction factors (and as
              you use a precomputed sensitivity image), there will be no
              difference in the resulting image.<br>
              <br>
              Hope this helps!<br>
              <br>
              Best regards,<br>
              Thibaut<br>
              <br>
              Zipai Wang <<a href="mailto:zipai.wang@stonybrook.edu"
                target="_blank" moz-do-not-send="true">zipai.wang@stonybrook.edu</a>>
              a écrit :</p>
            <blockquote style="border-left:2px solid
              blue;margin-left:2px;padding-left:12px" type="cite">
              <div dir="ltr"> Dear CASToR developers and users,
                <div>  </div>
                <div> I am trying to apply normalization to a simulated
                  PET scanner but meet some issues, any help is
                  highly appreciated!</div>
                <div>  </div>
                <div> First I successfully applied the normalization by
                  feeding the normalization file (all LORs with
                  norm&attenuation factors) into the CASToR for the
                  computation of the sensitivity image. The CASToR gives
                  me artefact free images in this way.</div>
                <div>  </div>
                <div> However, the normalization doesn't work when I
                  embed the factors into the List-mode binary datafile:</div>
                <div>  </div>
                <div> 1. When I feed the list-mode data (with
                  normalization factors and flag on) to CASToR, it give
                  me the following error:</div>
                <div> <i>oSensitivityGenerator::InitializeNormalizationFiles()
                    -> Normalization correction is included in the
                    data file while it is not in the sensitivity
                    computation!</i></div>
                <div> In order to bypass this error, I use <i>-sens</i>
                  to provide a precomputed sensitivity image (Not
                  normalized) to CASToR. Is this the proper way to do
                  it? If not, what should I feed to CASToR instead?</div>
                <div>  </div>
                <div> 2. After feeding precomputed sensitivity image,
                  the CASToR can run reconstruction with no issues, but
                  the image with embedded LM normalization factors is
                  identical to the image without normalization factors.
                  Then I assign all the events with the same
                  normalization factor of 0.1,1,10, respectively. But
                  the reconstructed images have the same pixel
                  intensities, which means I did something wrong and the
                  LM normalization factors is not doing its job at all
                  in my case.</div>
                <div>  </div>
                <div> The version I am using is CASToR v 3.0.1.</div>
                <div>  </div>
                <div> Here is one of the header files:</div>
                <div> Data filename: PET_Sim_LMNorm.Cdf<br>
                  Number of events: 13755984<br>
                  Data mode: list-mode<br>
                  Data type: PET<br>
                  Start time (s): 0<br>
                  Normalization correction flag: 1<br>
                  Duration (s): 1500<br>
                  Scanner name: D04_sim_1ring<br>
                  Calibration factor: 1<br>
                  Isotope: unknown</div>
                <div>  </div>
                <div> Here is some examples of the I generated list-mode
                  data: (I assgin all the time frames to 0 and  norm
                  factors to 1)</div>
                0000 0000 0000 803f ba22 0000 c005 0000<br>
                0000 0000 0000 803f 9a15 0000 9e19 0000<br>
                0000 0000 0000 803f e20e 0000 fa0b 0000<br>
                0000 0000 0000 803f f51f 0000 6a05 0000<br>
                0000 0000 0000 803f 971a 0000 1203 0000<br>
                0000 0000 0000 803f e91f 0000 d719 0000<br>
                0000 0000 0000 803f 211d 0000 3721 0000<br>
                0000 0000 0000 803f f906 0000 7105 0000<br>
                0000 0000 0000 803f 4c20 0000 f014 0000<br>
                0000 0000 0000 803f 8e1e 0000 a607 0000<br>
                0000 0000 0000 803f a821 0000 1a19 0000<br>
                0000 0000 0000 803f e81a 0000 8514 0000<br>
                <div> 0000 0000 0000 803f 6913 0000 e525 0000</div>
                <div>  </div>
                <div>  </div>
                <div> Thank you very much!</div>
                <div> --</div>
                <div>
                  <div dir="ltr">
                    <div dir="ltr">
                      <div>
                        <div dir="ltr">
                          <div>
                            <div dir="ltr"> Zipai Wang</div>
                            <div dir="ltr"> Biomedical Engineering PhD
                              student
                              <div> Stony Brook University </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </blockquote>
            <br>
            <br>
          </div>
          _______________________________________________<br>
          Castor-users mailing list<br>
          <a href="mailto:Castor-users@lists.castor-project.org"
            target="_blank" moz-do-not-send="true">Castor-users@lists.castor-project.org</a><br>
          <a
            href="https://lists.castor-project.org/mailman/listinfo/castor-users"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.castor-project.org/mailman/listinfo/castor-users</a><br>
          <br>
          To look for something in the mailing-list archives, use the
          search box at:<br>
          <a href="https://castor-project.org/mailing-list"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://castor-project.org/mailing-list</a></blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr">
          <div>
            <div dir="ltr">
              <div>
                <div dir="ltr">Zipai Wang</div>
                <div dir="ltr">Biomedical Engineering PhD student
                  <div>Stony Brook University </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Thibaut MERLIN -- PhD

Docteur en Imagerie Médicale au Laboratoire de Traitement de l'Information Medicale (LaTIM - INSERM UMR 1101)
Institut Brestois de recherche en Bio-Santé (IBRBS)
12 Avenue Foch, 29200 Brest, FRANCE
Tel: 06.75.12.24.90</pre>
  </body>
</html>