<div dir="ltr"><div>We modified the C code and despite some things that we can solve later, it seems to work just to give us an idea of the data.<br></div><div><br></div><div>Marc and Kris, thank you very much for the help!!<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-28 14:07 GMT+00:00 Marc Chamberland <span dir="ltr"><<a href="mailto:MarcChamberland@cmail.carleton.ca" target="_blank">MarcChamberland@cmail.carleton.ca</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
Hi,
<div><br>
</div>
<div>Ah, my apologies. I believe GatePet2Stir and the c code only works on cylindricalPET systems in Gate, then. Those systems are made up of components rsector, module, submodule, and crystal in Gate, whereas the ecat system only has components block
 and crystal.</div>
<div><br>
</div>
<div>At this point, modifying the c code probably is your best option. </div><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
</font></span><div><span class="HOEnZb"><font color="#888888">
<div><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px">
<div style="word-wrap:break-word">
<div>Marc</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</span></div></font></span><div><div class="h5">
<br>
<div>
<blockquote type="cite">
<div>On Nov 28, 2014, at 07:49, Kris Thielemans <<a href="mailto:kris.f.thielemans@gmail.com" target="_blank">kris.f.thielemans@gmail.com</a>> wrote:</div>
<br>
<div>Hi<br>
<br>
This file gives us the same problems as GatePet2Stir. A closer look shows that this c file is looking for module and submodule info in the root file, while in our root file there is only block info. Indeed, in the Gate 7.0 ecat macro, there is no info on modules
 at all. <br>
<br>
I think I can modify the C code accordingly but if anyone can provide pointers, or tell us why this happened, this would be great.<br>
<br>
Kris<br>
<br>
<br>
<blockquote type="cite">-----Original Message-----<br>
From: Marc Chamberland [<a href="mailto:MarcChamberland@cmail.carleton.ca" target="_blank">mailto:MarcChamberland@cmail.carleton.ca</a>]<br>
Sent: 27 November 2014 12:42<br>
To: Kris Thielemans<br>
Cc: Ana Margarida Mota; Gate Users<br>
Subject: Re: [Gate-users] Sinogram from Root file<br>
<br>
Hi Kris, hi Ana,<br>
<br>
I’ve never used the DigiGate option, but it might work. However, it only<br>
works if you have saved the Hits (and not just the coincidences or the singles)<br>
in your Root output. You would then just use the -d (or --d? I'll check and<br>
correct the Gate wiki, if needed) option, with the same macro you used<br>
before (but adding the sinogram output).<br>
<br>
Again, I'm not sure if that would work, but it's worth a try.<br>
<br>
Another possibility is to use Ross Schmidtlein and Sadek Nehmeh's code for<br>
generating projection data from Root output:<br>
<a href="http://www.opengatecollaboration.org/sites/opengatecollaboration.org/file" target="_blank">http://www.opengatecollaboration.org/sites/opengatecollaboration.org/file</a><br>
s/Bin_GATE_v1.0.c<br>
<br>
That's the code I've used before (and my personal preferred way of going<br>
from Gate to STIR). You just need to put in the correct values for your<br>
scanner.<br>
<br>
Cheers,<br>
Marc<br>
<br>
<br>
<br>
__________________________<br>
<br>
Marc Chamberland, MSc<br>
PhD candidate<br>
Department of Physics<br>
Carleton University<br>
Ottawa (ON)<br>
<br>
<blockquote type="cite">On Nov 26, 2014, at 17:37, Kris Thielemans <<a href="mailto:kris.f.thielemans@gmail.com" target="_blank">kris.f.thielemans@gmail.com</a>><br>
</blockquote>
wrote:<br>
<blockquote type="cite"><br>
Hi Marc<br>
<br>
Ana is currently visiting UCL, so we do know about STIR utilities :-)<br>
<br>
We tried gatepet2stir, but it didn't seem to like the GATE 7.0 output (it<br>
</blockquote>
complained about some Root fields not being recognised) and gave no<br>
output. Ana will have the error messages so hopefully she'll find the time to<br>
send those to this list, but she's quite pressed in time right now.<br>
<blockquote type="cite"><br>
So, instead, what we tried is to use the ecat sinogram output via<br>
<br>
/gate/output/sinogram/enable<br>
/gate/output/sinogram/setFileName MySinogramFileName<br>
<br>
That outputs the 3D sinogram as raw floats. There's then a STIR utility (that<br>
</blockquote>
needed fixing for the data-type) to create the corresponding Interfile header.<br>
So Ana is currently running simulations with both Root and ecat sinogram<br>
output. That seems to work ok.<br>
<blockquote type="cite"><br>
However, now we're wondering if we can use an existing Root file, read<br>
</blockquote>
that into GATE, and use the above macro to get the corresponding sinogram<br>
output. Is that possible?  For instance, I see at<br>
<blockquote type="cite"><br>
<br>
</blockquote>
<a href="http://wiki.opengatecollaboration.org/index.php/Users_Guide_V7.0:How_to" target="_blank">http://wiki.opengatecollaboration.org/index.php/Users_Guide_V7.0:How_to</a><br>
_run_Gate#How_to_launch_DigiGate<br>
<blockquote type="cite"><br>
that DigiGate can read an existing root file by using "Gate -d  <<br>
</blockquote>
somemacro.mac" (or is it "Gate --d"?). Would that work here as well? What<br>
would the appropriate contents of that macro then be (the same as the<br>
original one with the sinogram output enabled?). I can't seem to find any<br>
documentation on the -d option, but then I don't know Gate really.<br>
<blockquote type="cite"><br>
Thanks<br>
<br>
Kris Thielemans<br>
Senior Lecturer at University College London,<br>
Institute of Nuclear Medicine, UCL Hospital<br>
<br>
<br>
<br>
<br>
From: <a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a> [mailto:<a href="mailto:gate-" target="_blank">gate-</a><br>
</blockquote>
<a href="mailto:users-bounces@lists.opengatecollaboration.org" target="_blank">users-bounces@lists.opengatecollaboration.org</a>] On Behalf Of Marc<br>
Chamberland<br>
<blockquote type="cite">Sent: 26 November 2014 18:25<br>
To: Ana Margarida Mota<br>
Cc: Gate Users<br>
Subject: Re: [Gate-users] Sinogram from Root file<br>
<br>
Hi Ana,<br>
<br>
Sorta. A couple of people have written tools over the years to convert the<br>
</blockquote>
Root output to projection data readable by STIR (for image reconstruction)<br>
and STIR provides a utility to extract sinograms from the projection data.<br>
<blockquote type="cite"><br>
This program generates projection data readable by STIR:<br>
</blockquote>
<a href="http://sourceforge.net/projects/gatepet2stir/" target="_blank">http://sourceforge.net/projects/gatepet2stir/</a><br>
<blockquote type="cite">You can get STIR from here: <a href="http://stir.sourceforge.net" target="_blank">http://stir.sourceforge.net</a><br>
<br>
The utility extract_segments from STIR allows you to extract the sinograms<br>
</blockquote>
(in Interfile format, so you’ll to use Amide or a similar to program to display<br>
them).<br>
<blockquote type="cite"><br>
Cheers,<br>
Marc<br>
<br>
<br>
<br>
__________________________<br>
<br>
Marc Chamberland, MSc<br>
PhD candidate<br>
Department of Physics<br>
Carleton University<br>
Ottawa (ON)<br>
<br>
On Nov 26, 2014, at 12:35, Ana Margarida Mota <<a href="mailto:ninimota87@gmail.com" target="_blank">ninimota87@gmail.com</a>><br>
</blockquote>
wrote:<br>
<blockquote type="cite"><br>
Dear Gate users,<br>
<br>
I would like to know if there is any way to have a sinogram from the root<br>
</blockquote>
file??<br>
<blockquote type="cite"><br>
I know we can have directly the sinogram as output, but that's not the<br>
</blockquote>
question.<br>
<blockquote type="cite">My simulation is still running and I it would be good to analyze the<br>
</blockquote>
sinogram from data obtained so far.<br>
<blockquote type="cite"><br>
Thanks in advance!!<br>
<br>
Regards,<br>
Ana Margarida<br>
_______________________________________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a><br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
<br>
<br>
</blockquote>
</blockquote>
<br>
<br>
</div>
</blockquote>
</div>
<br>
</div></div></div>
</div>

</blockquote></div><br></div>