<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello Ying-yu,</p>
    <p>For your questions:</p>
    <p>Q1: Yes, the -t option only converts true unscattered events and
      there is no current option to keep only trues and scatters.
      However you could make some small changes in the file <i>toolkits/castor-GATERootToCastor.cc</i>
      in order to recover both trues and scatters:</p>
    <p>Around line 1492, replace:<br>
    </p>
    <p><i>if (true_only_flag==true && kind != KIND_TRUE)</i></p>
    <p>by</p>
    <p><i>if (true_only_flag==true && kind != KIND_TRUE
        && </i><i><i>kind != KIND_SCAT </i></i><i><i><i>&&
          </i><i><i>kind != KIND_MSCAT</i></i></i> ) </i><br>
    </p>
    <p>and around line 1646, replace:</p>
    <p><i>      Out_data_file->SetNbEvents( (true_only_flag) ?</i><i>
        nLORs_trues :</i><i>  nLORs_tot ) ;</i></p>
    <p>by</p>
    <p><i>      Out_data_file->SetNbEvents( (true_only_flag) ?</i><i>
      </i><i>nLORs_trues </i>+<i> nLORs_scatters :</i><i> nLORs_tot ) ;</i><br>
    </p>
    <p><i><br>
      </i>then recompile. Then the datafile should include scatters as
      well.<i><br>
      </i></p>
    <p><i><br>
      </i></p>
    <p>Q2:<i> </i>Maximum ring difference set to -1 just mean there is
      no restriction regarding the ring difference. So it will be equal
      to 51 in your case.<i><br>
      </i></p>
    <p><i><br>
      </i></p>
    <p>Q3:<i> </i>I am not sure what is wrong in the reconstructed
      images. The positions of the sphere sources in the image are not
      correct ?<i><br>
      </i></p>
    <p><i><br>
      </i></p>
    <p>Best regards,</p>
    <p>Thibaut<i><br>
      </i></p>
    <p><i><br>
      </i></p>
    <p><i><br>
      </i></p>
    <br>
    <div class="moz-cite-prefix">On 07/09/2017 10:00, Ying-yu Chen
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAFu5+r-ED8ibfvFA=vzsW6xg1-uM=umjpgQs_Qrkt3R5+wDydA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div><font size="2">Dear CASToR users,<br>
              <br>
            </font></div>
          <font size="2">I'm trying to build an PET simulation using the
            GATE ecat system. The Geometry macro "Geometry.mac" is
            attached for reference. <br>
            <br>
            I first simulated two 2.5mm-radius sphere sources in a
            phantom.From raw sinogram, I think I can see the two sphere
            sources.  Root datafile and raw sinogram could be downloaded
            through the following link.<br>
            <a moz-do-not-send="true"
              href="https://drive.google.com/open?id=0B0vKwnYlHgr1LWpiclpnTUFZbUE">https://drive.google.com/open?id=0B0vKwnYlHgr1LWpiclpnTUFZbUE</a><br>
            <br>
            I converted the GATE geometry to the .geom file
            ("GATE_PET.geom" as attached) and then converted root
            datafile to CASToR datafile with -t option. ("aq4.log",
            "aq4_CstrProj.Cdh" and "aq4_CstrProj.Cdf" as attached)<br>
            <br>
          </font></div>
        <div><font size="2">Q1: It seems that the -t option only
            converts true unscattered events. Is it able to convert true
            unscattered and scattered events (no random)?<br>
            <br>
          </font></div>
        <div><font size="2">Q2: In aq4_CstrProj.Cdh, the maximum ring
            difference is -1. Since the simulated PET has 52 detector
            rings, I think the maximum ring difference should be 51. I
            would like to know why is it -1?<br>
            <br>
          </font></div>
        <div><font size="2">Then I use the following command to perform
            the reconstruction.<br>
          </font>
          <p style="margin-bottom:0in;line-height:100%"><font size="2">castor-recon
              -df
              aq4_CstrProj.Cdh -dout recon_aq4 -it 3:8 -dim 400,400,109
              -fov
              780,780,218</font></p>
          <font size="2"><br>
          </font></div>
        <div><font size="2">Q3: The reconstructed images are not right.
            Is there any idea how I can solve it?<br>
            <a moz-do-not-send="true"
              href="https://drive.google.com/open?id=0B0vKwnYlHgr1V3F2Q2JTLTlyc00">https://drive.google.com/open?id=0B0vKwnYlHgr1V3F2Q2JTLTlyc00</a><br>
            <br>
          </font></div>
        <div><font size="2">Thank you very much and I'm looking forward
            to hearing from you.<br>
            <br>
          </font></div>
        <div><font size="2">Your sincerely,<br>
          </font></div>
        <div><font size="2">Ying-Yu Chen</font><br>
        </div>
        <div><br>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Castor-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Castor-users@lists.castor-project.org">Castor-users@lists.castor-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.castor-project.org/listinfo/castor-users">http://lists.castor-project.org/listinfo/castor-users</a>
</pre>
    </blockquote>
    <br>
    <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)
Bâtiment 1
CHRU Morvan - 2, Av. Foch
29609 Brest CEDEX - FRANCE
Tel: 06.75.12.24.90</pre>
  </body>
</html>