Skip to main content

Python tools for GATE, see https://github.com/OpenGATE/Gate

Project description

Build status PyPI

Tools for GATE simulations.

Install with : pip install gatetools

Clone the repository with git clone --recursive https://github.com/OpenGATE/GateTools.git (or git submodule update --init to update) then cd GateTools, then pip install -e .

Example of usage:

gt_gate_info
gt_image_convert -i input.dcm -o output.mhd
gt_image_convert -i input.mhd -o output_float.mhd -p float
gt_image_arithm -i *.mhd -o output.mhd -O sum
gt_gamma_index dose.mhd gate-DoseToWater.mhd -o gamma.mhd --dd 2 --dta 2.5 -u "%" -T 0.2

Use the flag -h to get print the help of each tool. Here is the current list of command line tools.

Tool Comment
gt_affine_transform Resample (resize, rotate) an image
gt_dicom_info Print tag values of a dicom file
gt_dicom_rt_pbs2gate Convert Dicom RT proton plan for Gate
gt_dicom_rt_struct_to_image Turn Dicom RT Struct contours into mask image
gt_dvh Create Dose Volume Histogram
gt_gamma_index Compute gamma index between images
gt_gate_info Display info about current Gate/G4 version
gt_hausdorff Compute Hausdorff distance
gt_image_arithm Pixel- or voxel-wise arithmetic operations
gt_image_convert Convert image file format (dicom, mhd, hdr, nii ... )
gt_image_crop Crop an image
gt_image_gauss Blur an image using gaussian filter
gt_image_resize Resize an image
gt_image_statistics Statistics of an image
gt_image_to_dicom_rt_struct Convert mask image to Dicom RTStruct
gt_image_uncertainty Compute statistical uncertainty
gt_merge_root Merge root files
gt_morpho_math Compute morphological operation
gt_phsp_convert Convert a phase space file from root to npy
gt_phsp_info Display information about a phase space file
gt_phsp_merge Merge two phase space files (output in npy only)
gt_phps_peaks Try to detect photopeaks (experimental)
gt_phsp_plot Plot marginal distributions form a phase space file
gt_write_dicom Convert image (mhd, nii, ...) to dicom

All tools are also available to be use within your own Python script with, for example:

import gatetools as gt
gt.image_convert(inputImage, pixeltype)

Tests: run

python -m unittest gatetools -v
python -m unittest gatetools.phsp -v

Classes and function documentation. Use the following command to open a browser for documentation (it is still not very convenient ; will be improved later).

pydoc -b

For developers, please have a look at the readme_dev.md file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gatetools-0.11.2.tar.gz (86.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gatetools-0.11.2-py3-none-any.whl (113.8 kB view details)

Uploaded Python 3

File details

Details for the file gatetools-0.11.2.tar.gz.

File metadata

  • Download URL: gatetools-0.11.2.tar.gz
  • Upload date:
  • Size: 86.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for gatetools-0.11.2.tar.gz
Algorithm Hash digest
SHA256 6eef8a779278b862823ae79d6aab210db4f7889c9127b2c2e4c3a4195f9a9928
MD5 7882bf3d0f8f9100f3efd0c77910c444
BLAKE2b-256 31aa5a253472b5bcd43e5aaee49d4d133902e8c66cdeaad09587d991b45b05ad

See more details on using hashes here.

File details

Details for the file gatetools-0.11.2-py3-none-any.whl.

File metadata

  • Download URL: gatetools-0.11.2-py3-none-any.whl
  • Upload date:
  • Size: 113.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for gatetools-0.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c9e0e50b33d4732874055d2589b4a27b845c2478ff1d137be0fdb906418e0f8d
MD5 5b97d76af8b0821c0bd4c98864b88ea8
BLAKE2b-256 4084abeb9a0aea0b9ccd95fd0bb38e3f7aea7c05cba4a3ec782401a15f9bb011

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page