[Gate-users] Tips&Tricks regarding Voxelized Sources

J.J.M. Kouwenberg j.kouwenberg at erasmusmc.nl
Thu Mar 19 17:54:04 CET 2015


Dear all,

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.
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.

Voxelized sources in GATE:
 - 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!
 - 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.
 - 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.
 - 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.
 - The maximum number of subdivisions in your TimeActivity table is 400 (at least on the vGate system). Higher values give a segment break error.
 - 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.
 - 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.
 - When using STIR's generate_image to generate a source, the following Interfile settings are recommended:
"output file format type:= Interfile
  interfile Output File Format Parameters:=
    number format := unsigned integer
    number_of_bytes_per_pixel:=2
    scale_to_write_data:= 1
    byte order:=BIGENDIAN
  End Interfile Output File Format Parameters:="

This is all for now.

With kind regards,

Jasper J.M. Kouwenberg
Medical Physics Graduate student
Nuclear Medicine

E-mail j.kouwenberg at erasmusmc.nl | Phone +316 2532 9809


More information about the Gate-users mailing list