[gate-users] Re: How to input a history file

Mikhail Shilov mshilov1 at jhmi.edu
Fri Aug 19 20:03:57 CEST 2005


Dear All,

I have implemented a simple history file reader in Gate by utilizing Gate's voxelized source class library. In particular I have modified GateSourceVoxelTestReader class to make it read an ASCII history file which contains 7 rows for which photon ( time, x, y, z, px, py, pz). I also made appropriate modifications in the following classes:

GateVSourceVoxelReader
GateSourceVoxellized
GateGeneralParticleSource

The way it works is something like this:

/gate/source/addSource voxel voxel
/gate/source/voxel/reader/insert test
/gate/source/voxel/testReader/readFile history.dat

/gate/source/voxel/gps/particle gamma
/gate/source/voxel/setPosition  0. 0. 0. cm
/gate/source/voxel/dump 1

The simulation time with history file is comparable to the simulation time with a volume type sources. 
Right now I'm working on making it read a binary file. 
If anyone interested I can share the code.



Mikhail A. Shilov
The Johns Hopkins University
Department of Radiology
Division of Medical Imaging Physics
Tel:  443-287-7315
Fax:  410-614-1977
mailto: mshilov1 at jhmi.edu



More information about the Gate-users mailing list