Skip to content

Simulation and analysis code to accompany the paper (still to come...)

License

Notifications You must be signed in to change notification settings

teaghan/PET_MonteCarlo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PET Monte Carlo

Simulation and analysis code to accompany the paper (still to come...)

This repository includes scripts to perform Monte Carlo simulations of the Siemens Biograph 40 mCT PET/CT system using the GEANT4 application for tomographic emission (GATE).

Dependencies

  • GATE
    • this includes install ROOT and GEANT4
  • SciPy: pip install scipy
  • scikit-image: pip install scikit-image

Running the GATE simulations

  1. Before running a simulation, you may have to adjust the module loads for a few of the scripts (run/mc_job.sh and run/combine_root.sh) so that they properly load the correct modules on your system. If you have GATE and so forth already loaded then you can just remove these lines from the top of the scripts.
  2. For each simulation, you will need to create a configuration file in the config directory. For example, take a look at this config file for a line source simulation. You will notice that there is a parameter set as num_jobs=100. This means that the simulation is going to be split into 100 separate jobs.
  3. Using this configuration, you can generate the voxelized phantom using the commmand python phantom/generate_phantom.py line_1 which will create a directory tree for this patient in the patient directory.
  4. Next, you can create scripts for each job using the command python setup_batch_jobs.py line_1 which will save the scripts within the newly created patients/line_1/scripts/ directory.
  5. If you are running the scripts on one of the Compute Canada servers, you can run the command python start_simulations.py line_1 to start these simulations, otherwise, you will have to run these separate jobs using your own method.

All of these steps can be accomplished by running the (run/run_simu.sh script using the command ./run_simu.sh line_1 inside the run directory.

Analysis code

The code required to bin the root output into sinograms and reconstruct the images could not be made publicly available, so there is a slight jump from the GATE simulation outputs to the sinograms and images. Therefore, we have provided the necessary data files for download.

Data download

The data can be downloaded here or possibly by just clicking this link.

Once downloaded, unzip the file and place each of the subdirectories within the patient directory. For instance, after doing this you should have a directory tree PET_MonteCarlo/patients/nema_simu.

Analysis notebooks

Checkout the following notebooks to see how we compared the measured data to our simulations:

About

Simulation and analysis code to accompany the paper (still to come...)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published