<div dir="ltr"><div>Hello all, <br><br></div><div>After trying a good many things, I found something that works. The method I'm producing my voxelized sources somehow sidesteps the need to shift the volume in GATE at all. This I'm still looking into, but I guess it has something to do with the .mhd file, as you will see in later comments. In any case, the fix for the strange emissions going strictly in one direction was solved by substituting "voxel" source emission definitions in the first message with "thyroid_Phantom", or the name of the source, see <b>bold</b> text below:</div><br><i># Inserting Voxelized Source<br>/gate/source/addSource                                                                                                            thyroid_Phantom voxel<br>/gate/source/thyroid_Phantom/</i><i>reader/insert                                                                              image<br>/gate/source/thyroid_Phantom/</i><i>imageReader/translator/insert                          linear<br>/gate/source/thyroid_Phantom/</i><i>imageReader/linearTranslator/</i><i>setScale      1 Bq<br>/gate/source/thyroid_Phantom/</i><i>imageReader/readFile .data/thyroidPhantom/</i><i>thyroid_025mm.mhd<br>/gate/source/thyroid_Phantom/</i><i>imageReader/verbose                                              1                           <br>/gate/source/thyroid_Phantom/</i><i>TranslateTheSourceAtThisIsoCen</i><i>ter      0 -2.0875 0 cm<br>/gate/source/thyroid_Phantom/</i><i>dump                                       1<br><br>/gate/source/<b>thyroid_Phantom</b>/</i><i>gps/particle                                                   gamma<br>/gate/source/<b>thyroid_Phantom</b>/</i><i>gps/energytype              Mono<br>/gate/source/<b>thyroid_Phantom</b>/</i><i>gps/monoenergy                                   140.5 keV<br>/gate/source/<b>thyroid_Phantom</b>/</i><i>gps/angtype                               iso<br>/gate/source/<b>thyroid_Phantom</b>/</i><i>gps/mintheta                 0. deg<br>/gate/source/<b>thyroid_Phantom</b>/</i><i>gps/maxtheta                                          180. deg<br>/gate/source/<b>thyroid_Phantom</b>/</i><i>gps/minphi                     0. deg<br>/gate/source/<b>thyroid_Phantom</b>/</i><i>gps/maxphi                        360. deg<br>/gate/source/<b>thyroid_Phantom</b>/</i><i>gps/confine                                           NULL<br>/gate/source/<b>thyroid_Phantom</b>/</i><i>setForcedUnstableFlag          true<br>/gate/source/<b>thyroid_Phantom</b>/</i><i>setForcedHalfLife                  21636 s<br></i><div><i>/gate/source/list</i></div><div><br></div><div>Other than substituting the above bold text, I found a snippet in the link in the previous message stating that this
<i>/gate/source/thyroid_Phantom/</i><i>TranslateTheSourceAtThisIsoCen</i><i>ter </i>command must be used for .mhd files, as opposed to 
<pre><span class="gmail-o">/</span><span class="gmail-n">gate</span><span class="gmail-o">/</span><span class="gmail-n">source</span><span class="gmail-o">/</span><span class="gmail-n">activityImage</span><span class="gmail-o">/</span><span class="gmail-n">setPosition</span></pre>

So with this I translate my source away from my collimator (centered at 0,0,0), by -2.0875 in the y-direction. Here my Qt output with a source above my collimator / gamma camera setup: <br><br><div><img src="cid:ii_k38pp68q1" alt="image.png" style="margin-right: 0px;" width="398" height="242"><br></div><div>And after processing the Singles output with python, I'm getting a clear image of the thyroid: <br><div><img src="cid:ii_k38pq94r2" alt="image.png" style="margin-right: 0px;" width="249" height="206"><br></div><div>Hope this comes in handy to someone!</div><div><br></div><div>-Chris<br></div></div></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 20, 2019 at 8:50 AM Brosch, Julia <<a href="mailto:Julia.Brosch@med.uni-muenchen.de" target="_blank">Julia.Brosch@med.uni-muenchen.de</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 lang="DE">
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)">Hi Chris,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">when loading voxelized sources in GATE, they’re placed in the first quarter of the coordinate system. You can find details
 in the manual (<a href="https://opengate.readthedocs.io/en/latest/voxelized_source_and_phantom.html#voxelized-sources" target="_blank">https://opengate.readthedocs.io/en/latest/voxelized_source_and_phantom.html#voxelized-sources</a>)  under “7.3.2 Position”. There is also
 an example provided, explaining how you need to shift your voxelized source accordingly.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)" lang="EN-US">Try the command below instead
</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,78,121)" lang="EN-US">of “</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,78,121)" lang="EN-US">/gate/source/thyroid_Phantom/gps/centre
 0. 35. 0. Mm“ and adjust the shift „XX“ according to half of your image size. This command line is also in your example on page 146 of the v8.0 manual version.</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,78,121)" lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,78,121)" lang="EN-US">/gate/source/</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,78,121)" lang="EN-US">
 thyroid_Phantom</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,78,121)" lang="EN-US"> /setPosition –XX –XX –XX mm<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,78,121)" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,78,121)" lang="EN-US">I hope this helps you to place your source
 in the right position. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,78,121)" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,78,121)" lang="EN-US">Best,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,78,121)" lang="EN-US">Julia<u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:"Calibri",sans-serif">Von:</span></b><span style="font-size:11pt;font-family:"Calibri",sans-serif"> Gate-users <<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a>>
<b>Im Auftrag von </b>Christopher Watanabe<br>
<b>Gesendet:</b> Dienstag, 19. November 2019 22:53<br>
<b>An:</b> <a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a><br>
<b>Betreff:</b> [Gate-users] Voxelized Source Problem<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt">Hi all, <u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt">I'm facing problems importing a voxelized source into my simulation. My code below is very close to the code in the Gate Users' Manual V8.0, page 146.
<br>
<br>
# Inserting Voxelized Source<br>
/gate/source/addSource                       thyroid_Phantom voxel<br>
/gate/source/thyroid_Phantom/reader/insert     image<br>
/gate/source/thyroid_Phantom/imageReader/translator/insert     linear<br>
/gate/source/thyroid_Phantom/imageReader/linearTranslator/setScale      2 Bq<br>
/gate/source/thyroid_Phantom/imageReader/readFile ./data/thyroidPhantom/metaimage2.mhd<br>
/gate/source/thyroid_Phantom/imageReader/verbose 1<br>
<br>
/gate/source/thyroid_Phantom/gps/centre 0. 35. 0. mm<br>
<br>
/gate/source/voxel/gps/particle gamma<br>
/gate/source/voxel/gps/energytype Mono<br>
/gate/source/voxel/gps/monoenergy 140.5 keV<br>
/gate/source/voxel/gps/angtype iso<br>
/gate/source/voxel/gps/mintheta                 0. deg<br>
/gate/source/voxel/gps/maxtheta 90. deg<br>
/gate/source/voxel/gps/minphi                0. deg<br>
/gate/source/voxel/gps/maxphi                360. deg<br>
/gate/source/voxel/gps/confine NULL<br>
/gate/source/voxel/setForcedUnstableFlag true<br>
/gate/source/voxel/setForcedHalfLife    21636 s<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt">Where metaimage2.mhd is a binary mask of a thyroid scan. (0 background, 1 thyroid).
<u></u><u></u></p>
</div>
<p class="MsoNormal">Despite this, I'm getting very strange visualization results from the simulation:
<u></u><u></u></p>
<div>
<p class="MsoNormal"><img style="width: 5.6354in; height: 3.1875in;" id="gmail-m_-3877329288932991607gmail-m_5381499375348153362_x0000_i1025" src="cid:16e8df6e0335b16b21" alt="image.png" width="541" height="306" border="0"><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt">Strangely, the source doesn't move when I change the
<i>/gate/source/thyroid_Phantom/gps/centre</i> coordinates. I'm a bit at a loss of how to solve this problem.
<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt">Has anyone had similar experiences with this? Is it a GATE issue, or is this more likely something that would originate from a faulty .mhd file formatting?
<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt">Thank you! <u></u><u></u></p>
</div>
<p class="MsoNormal">Chris<u></u><u></u></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div>