15.4. Dose Images
Table of Contents
Voxelized dose maps
In GATE, a dose image is stored as a three dimensional grid of voxels. Each voxel contains the absorbed dose value for a small volume of material. Dose actors, introduced earlier in this chapter, are the tools that create these voxelized dose maps during a simulation.
Conceptually, a dose image is defined by three ingredients: the voxel grid, the physical region covered by the grid, and the numerical quantity stored in each voxel. The voxel grid is described by the number of voxels in each direction, for example $N_x$, $N_y$, $N_z$, and the corresponding voxel sizes $\Delta x$, $\Delta y$, $\Delta z$. The physical region is given by the bounding box of the grid, or equivalently by a voxel origin and spacing that tie voxel indices to positions in space. The stored quantity is usually the absorbed dose in gray, but actors can also record the statistical uncertainty per voxel and auxiliary information such as number of hits.
When you configure a dose actor, you must choose where it will score dose and how fine the voxel grid should be. The volume attached to the actor defines the scoring region. This can be a simple water box, a more complex phantom, or a patient geometry based on CT images. The grid resolution must be fine enough to resolve clinically relevant dose features, such as build up regions or sharp gradients near field edges, but not so fine that the simulation becomes impractically slow or memory demanding.
There is a direct trade off between voxel size, noise, and required number of histories. Smaller voxels contain less mass, so for the same number of energy deposition events the statistical fluctuations in dose are larger. To achieve a given relative uncertainty in each voxel, you must simulate more primary particles when you use finer grids. This is especially important in regions of low dose. Coarser grids smooth out local fluctuations, which can be useful for overview maps but may mask small scale structures.
Dose actors typically accumulate dose by summing the energy deposited in each voxel and dividing by the voxel mass. If $\Delta E_i$ is the total energy deposited in voxel $i$, and $m_i$ is the mass of that voxel, the absorbed dose $D_i$ recorded in the dose image is
$$
D_i = \frac{\Delta E_i}{m_i}.
$$
Important rule: voxel dose is always energy deposited divided by voxel mass, $D_i = \Delta E_i / m_i$. If you change voxel size or material density, voxel mass changes, so comparing dose images requires consistent geometry and material definitions.
During the simulation, the dose actor keeps track of these per voxel sums and typically also of the squared sums needed to estimate variances and relative uncertainties. At the end of the run, the actor normalizes the accumulated quantities and writes them to output files. The resulting voxelized dose map is then ready for visualization or quantitative analysis.
Voxel dose maps are most intuitive if you keep a clear mapping between indices and coordinates. In post processing, you will often convert between voxel index $(i,j,k)$ and position $(x,y,z)$ using the image origin and spacing that the dose actor stores. This is crucial when you overlay dose on anatomical images, extract line profiles along clinically interesting directions, or compare dose distributions from different simulations.
Output formats
Dose actors in GATE can export voxelized dose maps in several file formats that are designed to be easy to read by medical imaging and analysis software. The choice of format affects how you will visualize and process the results, but does not change the underlying physical content.
The most common dose image formats in GATE are summarized in the following table.
| Format | Typical extension | Type | Typical use |
|---|---|---|---|
| MHD + RAW | .mhd + .raw | MetaImage | Simple voxel images, easy to inspect and convert |
| NIfTI | .nii or .nii.gz | NIfTI-1 | Neuroimaging tools, 3D analysis in Python and MATLAB |
| ROOT | .root | ROOT TTree or TH3 | High energy physics style analysis in ROOT |
| Text / NumPy | .csv, .npy, .npz | Text or binary arrays | Direct use in Python or custom tools |
MetaImage (MHD) is often the default for voxelized dose because it separates human readable metadata from binary voxel data. The .mhd file is a text header that stores the image dimensions, voxel spacing, origin, data type, and information about units. The corresponding .raw file contains the voxel values in binary form. This format can be opened by many visualization tools such as ITK Snap, 3D Slicer, and ParaView, and can be read easily by Python libraries that understand ITK style images.
NIfTI is another common format that stores both header and voxel data in a single file. It is widely used in neuroimaging, and many analysis pipelines and viewers can handle it. If your workflow involves Python, MATLAB, or specialized image processing packages, NIfTI can be very convenient.
ROOT output is more flexible and is mainly used when you want to keep dose data together with other simulation data in a single file. You may store dose values either as three dimensional histograms or as separate branches in a tree that you reconstruct as an image later. This format fits well with ROOT based analysis scripts, for example when you already process hits, singles, or phase space data in ROOT.
Text based and NumPy compatible outputs are useful for direct programmatic analysis. A CSV file is human readable and easy to inspect manually, but can be large. NumPy binary arrays provide compact storage and very fast loading in Python. They are well suited to pipelines where you will perform custom dose metrics, dose volume histograms, or optimization tasks.
Regardless of the chosen format, dose actors always store the image geometry together with the dose data. The header or metadata contains key fields such as the number of voxels in each dimension, voxel spacing, image origin, and orientation. You should always check these fields when you load the dose image in external software to ensure that the dose overlays correctly on the underlying phantom or patient images.
Important rules for dose output:
- Always verify that the output units are gray. If you rescale or convert units, track factors carefully.
- Always confirm that the image origin, spacing, and orientation match the geometry used in the simulation before you interpret dose values or overlay them on CT images.
In practice, it is often helpful to write the same dose data in at least two formats. For example, use MHD for visualization and quality checks, and NumPy or ROOT for quantitative analysis. Because GATE dose actors can be configured to produce several outputs in one run, you can support both interactive inspection and automated processing without repeating the simulation.
Views: 11
KAHIBARO