Hello gaters!<br>I&#39;m trying to incorporate a voxelized XCAT (formerly known as NCAT) source into GATE and I&#39;m having some difficulties. First of all, I&#39;m using the scanner from the benchmarkPET in the setup from &quot;example_FULL_SIMULATION&quot; (without any phantom) and I&#39;ve got my macro to work when I use a simple source as the one below:<br>
.....<br><span style="color: rgb(51, 51, 255);">/gate/source/addSource twogamma</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/twogamma/setActivity 10. becquerel</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/twogamma/setType backtoback</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/twogamma/gps/particle gamma</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/twogamma/gps/energytype Mono</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/twogamma/gps/monoenergy 0.511 MeV</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/twogamma/gps/type Volume</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/twogamma/gps/shape Sphere</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/twogamma/gps/radius 0.25 mm</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/twogamma/gps/centre 0. 0. 0. mm</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/twogamma/gps/angtype iso</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/list</span><br>.....<br><br>Now I&#39;ve configured my own voxel source as:<br>
.....<br><span style="color: rgb(51, 51, 255);"># Declaration of the fact that a voxellized source will be used.</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/addSource xcat voxel</span><br style="color: rgb(51, 51, 255);">
<br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"># Declaration that the voxellized source will be entered</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"># using image (ascii) data.</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/xcat/reader/insert image</span><br style="color: rgb(51, 51, 255);"><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"># example for a linear translator: this scales all numbers</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);"># directly into activities</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/xcat/imageReader/translator/insert linear</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/xcat/imageReader/linearTranslator/setScale 1. Bq</span><br style="color: rgb(51, 51, 255);"><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"># The following line allows you to insert the ASCII file</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);"># that contains all necessary numbers for all pixels</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/xcat/imageReader/readFile /xcat/image.dat</span><br style="color: rgb(51, 51, 255);">
<br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"># The deafult position of the voxellized source is in the 1^{st}</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"># quarter. So the voxellized source has to be shifted over half its</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);"># dimension in the negative direction on each axis</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/xcat/setPosition -130. -130. -300. mm</span><br style="color: rgb(51, 51, 255);">
<br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"># The following lines characterize the size</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"># no difference with an analytical source</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/xcat/setType backtoback</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/xcat/gps/particle gamma</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/xcat/setForcedHalfLife 1222.8 s #Carbon-11</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/xcat/gps/energytype Mono</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/xcat/gps/monoenergy 511. keV</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/xcat/gps/angtype iso</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/xcat/gps/mintheta 90. deg</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/xcat/gps/maxtheta 90. deg</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/xcat/gps/minphi     0. deg</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/xcat/gps/maxphi   360. deg</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/xcat/gps/confine NULL</span><br style="color: rgb(51, 51, 255);"><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/gate/source/xcat/dump 1</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/gate/source/list</span><br>......<br><br>The XCAT source is a 128x128x103 activity image of the torso, with voxel sizes 0.625x0.625x0.625 mm. The file image.dat looks like:<br>....<br>
<span style="color: rgb(51, 51, 255);">128, 128, 103</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">0</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">0</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">0</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">0</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">0</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">0</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">.</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">.</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">6.8</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">6.8</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">68.85</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">161.93</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">255</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">255</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">192.95</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">6.8</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">6.8</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">. </span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">.</span><br>......<br><br>I.e. voxel values ranging from 0 to 255. When I run my macro I don&#39;t get any errors, but I don&#39;t see any photon tracks from the source, or any source at all for that matter, in my openGL visualisation. I just see the camera. For the simple source I see the source and gamma tracks for each frame... Also, the output (RAW) records 0 singles, 0 coincidences etc, i.e. it&#39;s empty! I wonder if it&#39;s a simple error with my placement of the source, <span style="color: rgb(51, 51, 255);">/gate/source/xcat/setPosition -400. -400. -320. mm</span>, that I misunderstood somehow so it&#39;s outside the camera somewhere. The actual patient doesn&#39;t fill the entire 128x128x103 image, so should I set the position according to patient or entire image? Anyway, are there other errors in my source macro??<br>
thanks for any help!<br>Ida<br>