<div dir="ltr"><div>Thanks for sharing ! <br></div><div><br></div><div>I do not use interfile myself, but one information could be useful: in the new 7.1 version (in the develop branch), voxelized source can now be .mhd/raw images which could simplify some issues encountered with interfile. This is a first version and particularly difficult to test, so I would be happy if someone could report (hopefully) successful or (unfortunately) unsuccessful use. </div><div><br></div><div>Note that the coordinate system with voxelized source is not consistent with all other images coordinate systems: it is not centred in the image, but in the corner. This may change in the future.</div><div><br></div><div>Sincerely, </div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 20, 2015 at 9:55 AM, J.J.M. Kouwenberg <span dir="ltr"><<a href="mailto:j.kouwenberg@erasmusmc.nl" target="_blank">j.kouwenberg@erasmusmc.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Gergely,<br>
<br>
This was done on the latest vGate, so Gate v7.0. It might still very well be that I made an error somewhere. These settings just made it work for me on both Gate 7.0 and Gate 6.2.<br>
<span class=""><br>
With kind regards,<br>
<br>
Jasper J.M. Kouwenberg<br>
Medical Physics Graduate student<br>
Nuclear Medicine<br>
<br>
E-mail <a href="mailto:j.kouwenberg@erasmusmc.nl">j.kouwenberg@erasmusmc.nl</a> | Phone <a href="tel:%2B316%202532%209809" value="+31625329809">+316 2532 9809</a><br>
<br>
________________________________________<br>
</span>From: <a href="mailto:gate-users-bounces@lists.opengatecollaboration.org">gate-users-bounces@lists.opengatecollaboration.org</a> [<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org">gate-users-bounces@lists.opengatecollaboration.org</a>] on behalf of Patay Gergely [<a href="mailto:patay.gergely@mediso.hu">patay.gergely@mediso.hu</a>]<br>
Sent: 20 March 2015 09:49<br>
To: Gate User<br>
Subject: Re: [Gate-users] Tips&Tricks regarding Voxelized Sources<br>
<div class="HOEnZb"><div class="h5"><br>
Dear Jasper,<br>
<br>
concerning the Interfile-related issues: did you use v7.0, or code from the<br>
development git branch? Since the 7.0 release there were some enhancements in<br>
the Interfile reader code (e.g. correct filenames, endianness and byte/value),<br>
and I wonder whether it is still buggy or not.<br>
<br>
best regards,<br>
Gergely<br>
<br>
--<br>
Gergely Patay<br>
physicist<br>
Mediso Medical Imaging Systems Ltd.<br>
Hungary<br>
<br>
<br>
<br>
On 2015-03-19 17:54, J.J.M. Kouwenberg wrote:<br>
> Dear all,<br>
><br>
> After many hours of frustrated keyboard smashing, I managed to find a number of solutions to undocumented difficulties regarding voxelized sources by delving through the GATE source code.<br>
> In order to save some of you a lot of time, I made a small list with tips&tricks below. I'll consider contributing to the Wiki when I get positive responses to this mail.<br>
><br>
> Voxelized sources in GATE:<br>
> - It seems that voxelized sources only work when combined with voxelized phantoms. The names of the raw data files are determined adding respectively _atn_[frame number].bin and _act_[frame number].bin to the parameter '/gate/RTVPhantom/setBaseFileName [name]'. The datafile name is the header file does not influence this!<br>
> - The Interfile format for GATE is somewhat peculiar. Instead of 'matrix size [3]' and 'scaling factor (mm/pixel) [3]' for the z-axis, it requires respectively 'number of slices' and 'slice thickness (pixels)', where the latter is still given mm.<br>
> - While the Interfile offers an 'imagedata byte order' option, it does not seem to affect the actual readout. The default is BIGENDIAN with 16 bits per value (2 bytes). One can alter this in GateSourceVoxelInterfileReader.cc. Note that the _RT_ functions are used instead of the regular functions!! To make sure your file is read correctly, check the raw data file with a binary reader (GHex e.g.) and compare it to the 'imageValue' values in GateSourceVoxelInterfileReader.cc.<br>
> - When the voxel reader returns zero voxels (number of voxels: 0), it means that none of the voxel values where converted to an activity higher than zero becquerel. It does not mean that you data file is faulty, but more likely that there is an error in the translation.<br>
> - The maximum number of subdivisions in your TimeActivity table is 400 (at least on the vGate system). Higher values give a segment break error.<br>
> - The 'SetTimeSampling' is not the same as the spacing in your TimeActivity table. The code interpolates the table using the SetTimeSampling interval and a B-Spline. This can be changed in GateVSourceVoxelReader.cc.<br>
> - The code for the voxelized source is quite talkative. Many of the outputs are coded in the two mentioned source files and are unaffected by verbosity. It is highly recommended to comment out the activity curve filling output when using large tables.<br>
> - When using STIR's generate_image to generate a source, the following Interfile settings are recommended:<br>
> "output file format type:= Interfile<br>
> interfile Output File Format Parameters:=<br>
> number format := unsigned integer<br>
> number_of_bytes_per_pixel:=2<br>
> scale_to_write_data:= 1<br>
> byte order:=BIGENDIAN<br>
> End Interfile Output File Format Parameters:="<br>
><br>
> This is all for now.<br>
><br>
> With kind regards,<br>
><br>
> Jasper J.M. Kouwenberg<br>
> Medical Physics Graduate student<br>
> Nuclear Medicine<br>
><br>
> E-mail <a href="mailto:j.kouwenberg@erasmusmc.nl">j.kouwenberg@erasmusmc.nl</a> | Phone <a href="tel:%2B316%202532%209809" value="+31625329809">+316 2532 9809</a><br>
> _______________________________________________<br>
> Gate-users mailing list<br>
> <a href="mailto:Gate-users@lists.opengatecollaboration.org">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>
_______________________________________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org">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>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org">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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">David Sarrut, Phd<br>Directeur de recherche CNRS<br>CREATIS, UMR CNRS 5220, Inserm U 1044<div>Centre de lutte contre le cancer Léon Bérard<br>28 rue Laënnec, 69373 Lyon cedex 08<br>Tel : 04 78 78 51 51 / 06 74 72 05 42<br><a href="http://www.creatis.insa-lyon.fr/~dsarrut" target="_blank">http://www.creatis.insa-lyon.fr/~dsarrut</a><br>_________________________________</div><div> "2 + 2 = 5, for extremely large values of 2"<br>_________________________________</div></div></div>
</div>