<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Dear CASToR developers,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></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:
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">“….<o:p></o:p></p>
<p class="MsoNormal">sScannerManager::Initialize() -> From scanner PET_PHILIPS_VEREOS<o:p></o:p></p>
<p class="MsoNormal">iScannerPET::Initialize() -> Initialize remaining stuff for scanner to be ready<o:p></o:p></p>
<p class="MsoNormal">oProjectorManager::Initialize() -> Initialize projectors and projection lines<o:p></o:p></p>
<p class="MsoNormal">  --> Use TOF projector for listmode data<o:p></o:p></p>
<p class="MsoNormal">***** vProjector::CheckParameters() -> Inconsistent TOF related parameters !<o:p></o:p></p>
<p class="MsoNormal">***** oProjectorManager::ParseOptionsAndInitializeProjectors() -> A problem occurred while checking forward projector parameters !<o:p></o:p></p>
<p class="MsoNormal">***** oProjectorManager::Initialize() -> A problem occurred while parsing projector options and initializing it !”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></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. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></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):<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">“….<o:p></o:p></p>
<p class="MsoNormal">// Set ToF<o:p></o:p></p>
<p class="MsoNormal">      if(tof_reso>=0)<o:p></o:p></p>
<p class="MsoNormal">      {<o:p></o:p></p>
<p class="MsoNormal">        ((iDataFilePET*)Out_data_file)->SetTOFInfoFlag();<o:p></o:p></p>
<p class="MsoNormal">        ((iDataFilePET*)Out_data_file)->SetTOFResolutionInPs(tof_reso);<o:p></o:p></p>
<p class="MsoNormal">        <span style="color:red">((iDataFilePET*)Out_data_file)->SetTOFMeasurementRangeInPs(myScannersTOFrange);</span><o:p></o:p></p>
<p class="MsoNormal">      }<o:p></o:p></p>
<p class="MsoNormal">”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></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?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks and I hope this helps!<o:p></o:p></p>
<p class="MsoNormal">Jan <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>