Skip to content

Transforms data from GATE (list mode of events) to SAFIR format

Notifications You must be signed in to change notification settings

JPETTomography/listmode-to-safir

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Converting list mode of events to STIR (interfile) sinograms

This implementation concerns data, simulated in GATE for the cylindrical scanner in the framework of Jagiellonian Positron Emission Tomography (J-PET) project.

Prerequisites

Easy installation:

$ source install.sh

To load necessary paths to variables, do before every use:

$ source setup.sh

The file setup.sh will be created after running easy installation.

Easy use:

Copy all data files to working_dir/INPUT_DATA and

$ cd working_dir
$ ./one_click_reconstruction.sh

Step-by-step build (use if easy install fails)::

$ cd /directory-with-repository-files/src/
$ mkdir -p build
$ cd build
$ cmake ../
$ make

run this outside this shell (inside build directory)

$ export PATH=$PWD:$PATH

Usage examples:

The executables are (partially tested):

  • GenerateCrystalMapJPET
  • ConvertToMUPET
  • GenerateBlurredMUPET
$ GenerateCrystalMapJPET -p parameters_file.par -o crystal_map_file.txt
$ ConvertToMUPET -i input_file -p parameters_file.par -o output_file.clm.safir
$ GenerateBlurredMUPET -i input_file [-p parameters_file.par]

Please, refer to SAFIR example for further instructions.

For the latter executable GenerateBlurredMUPET, it is optional to set geometry file with -p key. If not given, the script would try to generate .par file by parsing the very name of the input (for example, "D85_1lay_L020_4mm_10_00_07"). But even if the name could not be parsed, the program would search for the default parameters file "JPETGeometry.par" as the last possible option.

Consequently, GenerateBlurredMUPET would add new files, corresponding to three photomultipliers that reflect different smearing of the data, in both listmode and SAFIR formats.

Note! At the moment, the "smeared" listmode data comprise only pairs of Cartesian coordinates with times of hits, cutting out the rest (energy, type of coincidence etc).

Note! Smearing hit positions along axial (Z) direction would probably leave some events outside the scanner. By default, such events are thrown away, reducing their total number. Alternatively, hit positions could be coerced to the edges of the scanner (setting coerceEdges to true in JPETHit::calibrate() and JPETEvent::calibrate() functions).

About

Transforms data from GATE (list mode of events) to SAFIR format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 48.3%
  • C++ 43.9%
  • Shell 6.4%
  • CMake 1.4%