<div dir="ltr"><div><div>1/ You miss line 249:<br>GateScatterOrderTrackInformation * info = dynamic_cast<GateScatterOrderTrackInformation *>(step->GetTrack()->GetUserInformation());<br>So it needs to have scatter order information to compute the images. To do that, use the ScatterOrderTrackInformationActor.<br><br>The ScatterOrderActor was outdated, I have made a small change:<a href="https://github.com/OpenGATE/Gate/commit/700a0ef1b5b5cf58776302d198f15ea9cec22017"><br>https://github.com/OpenGATE/Gate/commit/700a0ef1b5b5cf58776302d198f15ea9cec22017</a><br><br></div>I have then modified the examples/example_CT/fixedForcedDetectionCT/mac/monteCarloCT.mac to illustrate how to get the scatter per order:<br><a href="https://github.com/OpenGATE/Gate/commit/914b106477ee40d32491fd9b99b62dbcabd49d41">https://github.com/OpenGATE/Gate/commit/914b106477ee40d32491fd9b99b62dbcabd49d41</a><br></div>You still have to uncomment the <span class="gmail-blob-code-inner">/gate/actor/DetectorFluence/scatterOrderFilename to make it happen.<br><br></span><div><div>2/ No, I don't know a better solution.<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 1, 2016 at 3:25 PM, Triltsch, Nicolas <span dir="ltr"><<a href="mailto:nicolas.triltsch@tum.de" target="_blank">nicolas.triltsch@tum.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>Hey Simon,</p>
<p>----1----<br>
</p>
<p>Now I have time to pick up this topic. Honestly, I didn't really
understand your reply. I see that
GateScatterOrderTrackInformati<wbr>on.hh is a package which is included
in the GateFluenceActor.cc file. I thought by setting
mSeparateProcessFilename='<wbr>scatter' in that file, I might get the
different <b>rayleigh</b> and <b>compton scatter images</b>,
because it states in lines 182-200:<br>
</p>
<pre><code class="m_-8786532895859381689hljs m_-8786532895859381689hsp"><li class="m_-8786532895859381689L182" rel="L182"> <span class="m_-8786532895859381689hljs-comment">/* Printing compton or rayleigh or fluorescence scatter images */</span></li><li class="m_-8786532895859381689L183" rel="L183"> <span class="m_-8786532895859381689hljs-keyword">if</span> (<b>mSeparateProcessFilename</b> != <span class="m_-8786532895859381689hljs-string">""</span>)</li><li class="m_-8786532895859381689L184" rel="L184"> {</li><li class="m_-8786532895859381689L185" rel="L185"> <span class="m_-8786532895859381689hljs-comment">/* Saving separately process images (e.g. Compton, Rayleigh...) */</span></li><li class="m_-8786532895859381689L186" rel="L186"> std::map<G4String, GateImage*>::iterator it = mProcesses.<span class="m_-8786532895859381689hljs-keyword">end</span>()<span class="m_-8786532895859381689hljs-comment">;</span></li><li class="m_-8786532895859381689L187" rel="L187"> <span class="m_-8786532895859381689hljs-keyword">for</span> (unsigned <span class="m_-8786532895859381689hljs-keyword">int</span> i = <span class="m_-8786532895859381689hljs-number">0</span><span class="m_-8786532895859381689hljs-comment">; i < mProcessName.size(); i++)</span></li><li class="m_-8786532895859381689L188" rel="L188"> {</li><li class="m_-8786532895859381689L189" rel="L189"> it = mProcesses.find(mProcessName[<wbr>i])<span class="m_-8786532895859381689hljs-comment">;</span></li><li class="m_-8786532895859381689L190" rel="L190"> <span class="m_-8786532895859381689hljs-keyword">if</span> (it != mProcesses.<span class="m_-8786532895859381689hljs-keyword">end</span>())</li><li class="m_-8786532895859381689L191" rel="L191"> {</li><li class="m_-8786532895859381689L192" rel="L192"> std::stringstream filenamestream<span class="m_-8786532895859381689hljs-comment">;</span></li><li class="m_-8786532895859381689L193" rel="L193"> filenamestream << mSeparateProcessFilename << <span class="m_-8786532895859381689hljs-string">"_"</span> << mProcessName[i] << <span class="m_-8786532895859381689hljs-string">".mhd"</span><span class="m_-8786532895859381689hljs-comment">;</span></li><li class="m_-8786532895859381689L194" rel="L194"> sprintf(filename, filenamestream.<span class="m_-8786532895859381689hljs-keyword">str</span>().c_str(), rID)<span class="m_-8786532895859381689hljs-comment">;</span></li><li class="m_-8786532895859381689L195" rel="L195"> mProcesses[mProcessName[i]]-><wbr>Write((G4String) filename)<span class="m_-8786532895859381689hljs-comment">;</span></li><li class="m_-8786532895859381689L196" rel="L196"> }</li><li class="m_-8786532895859381689L197" rel="L197"> it = mProcesses.<span class="m_-8786532895859381689hljs-keyword">end</span>()<span class="m_-8786532895859381689hljs-comment">;</span></li><li class="m_-8786532895859381689L198" rel="L198"> }</li><li class="m_-8786532895859381689L199" rel="L199"> }</li><li class="m_-8786532895859381689L200" rel="L200"> }</li></code>
</pre>
<p>But that didn't seem to work out. What can I do to get the
separate scatter images? Or am I supposed to use the
GateScatterOrderTrackInformati<wbr>onActor to obtain that information.
I am stuck here, as the .cc scripting is quite difficult to
understand for me.</p>
<p>---2---</p>
<p>Is there a way to obtain the<b> flatfield</b> with the Fluence
Actor while simulating with a phantom? I need the flatfield to
normalize the images later. What I am doing right now, I remove
the phantom and start the simulation again. It works, but takes
two times the simulation time and I have to run the script twice. </p>
<p><br>
</p>
<p>Thanks again and have a good day!</p>
<p>Nico<br>
</p><div><div class="h5">
<p><br>
</p>
<br>
<div class="m_-8786532895859381689moz-cite-prefix">On 11/21/2016 07:48 AM, Simon Rit
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>Hi,<br>
</div>
I think that this is meant to be used in combination with
GateScatterOrderTrackInformati<wbr>on. Every time an interaction
occurs in the volume to which
GateScatterOrderTrackInformati<wbr>on is attached, this
information will be added to a user structure of the
particle track. When recording the fluence with the
GateFluenceActor, it will check the same structure of the
particle and record the particle in separate images. This
has been developped to measure the amount of Compton vs
Rayleigh scatter and I think it currently works for photons
only since only Compton, Rayleigh and Fluorescence are
tracked.<br>
</div>
I hope this helps,<br>
</div>
Simon<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sat, Nov 19, 2016 at 7:17 PM,
Triltsch, Nicolas <span dir="ltr"><<a href="mailto:nicolas.triltsch@tum.de" target="_blank"></a><a class="m_-8786532895859381689moz-txt-link-abbreviated" href="mailto:nicolas.triltsch@tum.de" target="_blank">nicolas.triltsch@tum.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>Hi everyone,</p>
<p>I really enjoy this support, as it was a great help so
far. A new question poped up my mind when dealing with
the so called FluenceActor. <br>
</p>
<p>As it is written in the Wiki, the option enableScatter
prints out the .mhd image for scattering. I assume that
Compton and Rayleigh scatter are combined here. But it
should be possible to get the two scatter images
separate using the command <i>/gate/actor/DetectorFluence/se<wbr>parateProcessFilename</i>.
In the Wiki it says to do the following: <br>
</p>
<p>"Set the file name for the different scatter x-rays
processes that hit the detector (printf format with
runId as a single parameter)"</p>
<p>But I don't understand that! Any help would be great?</p>
<p>Cheers,</p>
<p>Nico<br>
</p>
<p><br>
</p>
</div>
<br>
______________________________<wbr>_________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecolla<wbr>boration.org</a><br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollabora<wbr>tion.org/mailman/listinfo/<wbr>gate-users</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>