Skip to main content

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 input.dcm -o output.mhd
gt_image_convert input.mhd -o output_float.mhd -p float
gt_image_arithm *.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
gt_digi_mac_converter Convert old digitizer macros to the new commands (Gate9.3)

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.

Release files for gatetools 0.12.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gatetools 0.12.8
File Size Uploaded
gatetools-0.12.8.tar.gz 120.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gatetools 0.12.8
File Interpreter ABI Platform
gatetools-0.12.8-py3-none-any.whl Python 3 none any Details

Total release size: 285.0 kB

Release files / gatetools-0.12.8.tar.gz

Download URL gatetools-0.12.8.tar.gz
Size 120.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5c761642f2789fe79ec9aa83cd7b2c5f094dd485dba2823357f8476c72da9439
BLAKE2b-256 checksum
How to use checksums
41548d748090907a51413c6e3a5cce9cc42b0af87b5120a246670dc3b92af03a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / gatetools-0.12.8-py3-none-any.whl

Download URL gatetools-0.12.8-py3-none-any.whl
Size 164.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
614297fe52ebc7fee44f4dfa3fb38489ae0d2b33f5a02cc4cce412078e500a7c
BLAKE2b-256 checksum
How to use checksums
8134fd51fd691fe21987c06a4d3e881c1b6ed258f3670f6ffa9182dc03324d43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.12.8 This release

2 release files

0.12.7

2 release files

0.12.6

2 release files

0.12.5

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.11.3

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.14

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

1 release file

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

3 release files

0.8.4

2 release files

0.8.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page