<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
a:link, span.MsoHyperlink
{color:#0563C1;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:#954F72;
text-decoration:underline}
span.EmailStyle17
{font-family:"Calibri",sans-serif;
color:windowtext}
.MsoChpDefault
{font-family:"Calibri",sans-serif}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
-->
</style><style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0" vlink="#954F72" link="#0563C1" lang="EN-US">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>Hi Jan,</div>
<div><br>
</div>
<div>Thanks for the bug notification and correction proposal! We will fix the castor-GATERootToCastor.cc.</div>
<div><br>
</div>
<div>As mentioned in the documentation, <i>List TOF measurement range (ps) </i>in the data file header should correspond to the maximum range of TOF measurements allowed by the scanner, which is most often equal to the size of the coincidence timing window.
It should not correspond to the maximum TOF measurement value in the datafile.<i>
</i>Maybe it is not clear enough in the documentation, we'll look at that.</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>Marina Filipovic<i><br>
</i></div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF864722" style="direction: ltr;"><font size="2" face="Tahoma" color="#000000"><b>De :</b> Castor-users [castor-users-bounces@lists.castor-project.org] de la part de Grahe, Jan [jan.grahe@pmi.rwth-aachen.de]<br>
<b>Envoyé :</b> jeudi 23 janvier 2020 13:34<br>
<b>À :</b> castor-users@lists.castor-project.org<br>
<b>Objet :</b> [Castor-users] Bug toolkits/castor-GATERootToCastor.cc<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal">Dear CASToR developers,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I tried converting a PET list-mode generated by GATE into the CASToR format using the castor-GATERootToCastor toolkit and obtained an error:
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">“….</p>
<p class="MsoNormal">sScannerManager::Initialize() -> From scanner PET_PHILIPS_VEREOS</p>
<p class="MsoNormal">iScannerPET::Initialize() -> Initialize remaining stuff for scanner to be ready</p>
<p class="MsoNormal">oProjectorManager::Initialize() -> Initialize projectors and projection lines</p>
<p class="MsoNormal"> --> Use TOF projector for listmode data</p>
<p class="MsoNormal">***** vProjector::CheckParameters() -> Inconsistent TOF related parameters !</p>
<p class="MsoNormal">***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while checking forward projector parameters !</p>
<p class="MsoNormal">***** oProjectorManager::Initialize() -> A problem occurred while parsing projector options and initializing it !”</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Turns out, that the variable <i>m_TOFMeasurementRangeInMm</i> has a value of “-0.1498962” in the
<i>oProjectorManager</i>, which caused the error in the <i>vProjector::CheckParameters()</i>. This variable is obtained from the
<i>vDataFile* Out_data_file</i> using the method <i>GetTOFMeasurementRangeInPs().</i> The datafile is initialized in the castor-GATERootToCastor.cc file and handed to the
<i>p_ProjectManager</i> using the <i>SetDataFile()</i> method. However, the m_<i>TOFMeasurementRangeInPs</i> variable is set to -1 in the constructor and not set in the
<i>castor-GATERootToCastor</i> toolkit before the <i>oProjectorManager</i> requires this variable to be set when calling it’s
<i>Initialize() </i>function. </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Therefore, to use the toolkit with TOF right now I added the red line in the toolkit (the block is approx. at line ~970 of the document):</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">“….</p>
<p class="MsoNormal">// Set ToF</p>
<p class="MsoNormal"> if(tof_reso>=0)</p>
<p class="MsoNormal"> {</p>
<p class="MsoNormal"> ((iDataFilePET*)Out_data_file)->SetTOFInfoFlag();</p>
<p class="MsoNormal"> ((iDataFilePET*)Out_data_file)->SetTOFResolutionInPs(tof_reso);</p>
<p class="MsoNormal"> <span style="color:red">((iDataFilePET*)Out_data_file)->SetTOFMeasurementRangeInPs(myScannersTOFrange);</span></p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal">”</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">This seems to solve the problem, but only with the <u>general coincidence time window of the scanner</u> instead of the longest coincidence time of all events in your datafile. Not sure if that is correct or a factor of e.g. 2 has to be
applied. If there is no problem with that, you could fix this bug generally by getting the coincidence time window of the scanner and then later update it to the real variable when all the events have been processed.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">As this only happens in version 3.0, can I still reconstruct images with CASToR 3.0 using datafiles generated with the CASToR 2.0 framework?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks and I hope this helps!</p>
<p class="MsoNormal">Jan </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
</div>
</div>
</div>
</div>
</body>
</html>