KAHIBARO
Discord Login Register

23.2. Image-Based Volumes

Table of Contents

CT images

In GATE, an image based volume is a geometry that comes from a medical image instead of being built from analytic shapes such as boxes or cylinders. For most medical physics applications, that image is a CT scan. The image tells GATE where each small cube of space, a voxel, is located and what value is stored there. Later chapters will explain how these values are converted to materials and densities. Here the focus is on how CT images are used as geometric input.

A CT image used for simulation is typically a 3D image composed of many 2D slices. Each slice is an array of pixels and the stack of slices forms a regular 3D grid. The CT file or files provide three essential groups of information: the number of voxels in each direction, the physical size of each voxel, and the numerical value stored at each voxel. GATE reads this information through Geant4, so internally it becomes a geometrical description of a large world of small voxels, where each voxel can later receive a material and density.

When you load a CT image in GATE, you usually read it from a standard medical image format, such as DICOM or MHD. The details of these formats are described in a later chapter, so here it is enough to know that the image must provide at least the dimensions and spacing. If the image is a stack of DICOM CT slices, GATE or helper Python code must sort them in the correct anatomical order before creating the volume. If the image is a single file such as MHD plus RAW, then the 3D order is already encoded.

Two geometric properties of the CT are especially important. First, the voxel spacing, given as $\Delta x, \Delta y, \Delta z$, tells you how big the final phantom will be in physical units. Second, the image origin and orientation determine where the voxel grid will be placed in the GATE world and which direction corresponds to left–right, anterior–posterior, and inferior–superior in the patient. If you ignore these, you may place sources or beams in the wrong anatomical location.

From these values you can estimate the size of the CT based volume and check whether it fits your world volume and your simulation purpose. If the image has $N_x, N_y, N_z$ voxels and spacings $\Delta x, \Delta y, \Delta z$, then the physical dimensions are

$$
L_x = N_x \,\Delta x, \quad
L_y = N_y \,\Delta y, \quad
L_z = N_z \,\Delta z.
$$

You must then make sure that the world box in GATE is larger than these lengths in every direction, so that the CT based volume is fully contained.

In practice, image based volumes are often used to represent patient anatomy. The CT then serves as the base on which you define organs, assign materials, and score dose. In other cases, synthetic CT like images can represent numerical phantoms, such as simple water boxes or standard anthropomorphic phantoms. In every case, the principle is the same. The 3D image defines a grid of voxels, and GATE turns that grid into a voxelized volume.

Because CT images are produced by a scanner in its own coordinate convention, you must be careful with axis directions. GATE uses a right handed coordinate system with $+Z$ as one axis of your choice. CT DICOM data uses its own description through image orientation and position tags. In GATE based workflows, conversion tools or Python scripts usually handle this mapping, but you still need to verify with visualization that the head, feet, left, and right are in the expected directions. The later chapter on coordinate systems explains these conventions in detail.

For image based volumes derived from CT, you also need to remember that the raw voxel values themselves are not yet materials. In clinical CT, these values are Hounsfield units. Mapping from Hounsfield units to tissue materials and densities is a separate step covered in the material mapping and CT to material conversion chapters. Here it is only essential to understand that the CT image structure and geometry must be loaded correctly first, so that any later mapping is applied to the right locations.

Finally, because CT images can be large, with hundreds of slices and sub millimeter resolution, a voxelized volume can contain millions of voxels. This has implications for performance and memory usage. When you set up an image based volume, you should know how many voxels your simulation will contain and whether your hardware can handle it. Coarser resolution or smaller fields of view can sometimes be used to reduce the number of voxels without losing the relevant physical information.

Voxel data

Once a CT image is loaded, GATE treats its content as voxel data. Each voxel is a small volume element that occupies a fixed region in space and holds a numerical value. The full set of voxels forms a regular 3D grid. Internally, GATE uses this grid to build a voxelized volume in which each voxel can have its own material, density, or scoring properties.

Voxel data are defined by three components: the grid size, the voxel size, and the voxel indices. The grid size is the number of voxels $N_x, N_y, N_z$ along the three axes. The voxel size is the physical spacing $\Delta x, \Delta y, \Delta z$. The indices $i, j, k$ identify each voxel, and GATE maps them to spatial coordinates using a relation of the form

$$
x_i = x_{\text{origin}} + \left(i + \tfrac{1}{2}\right)\Delta x,
$$

and similarly for $y_j$ and $z_k$, with $i$ running from $0$ to $N_x - 1$. This relation tells you that each voxel is represented by its center position, and that the full volume extends from the minimum to the maximum edge defined by these indices and spacings.

In many medical applications, the voxel values are Hounsfield units or some other quantity related to tissue properties. At the raw voxel data level, however, GATE simply sees numerical values in a 3D array. Later, a material mapping step will translate these values into discrete materials, such as lung, soft tissue, or bone, with associated densities. That mapping does not change the geometry of the voxel grid. It only changes which material each geometric voxel receives.

You can think of voxel data as a large table, where each entry corresponds to one small cube in space. A simplified view is shown below.

Index triple $(i,j,k)$Spatial coordinates $(x,y,z)$Stored valueLater use in GATE
$(10, 20, 5)$$(x_{10}, y_{20}, z_{5})$CT value (e.g. HU)Map to a material, e.g. soft tissue
$(30, 40, 12)$$(x_{30}, y_{40}, z_{12})$CT valueMap to bone or lung, etc.

In an image based volume, you do not define each voxel manually. Instead, GATE reads all voxel data from the file and automatically builds the corresponding grid. Your control as the user is over which image file is used, how voxel values will be interpreted, where the overall voxel grid is placed in the world, and how actors will score quantities inside the grid.

Voxel data are also the basis for voxelized scoring. When you attach a dose actor or an energy deposition actor to a voxelized volume, GATE uses the same grid to accumulate quantities. In that case, each voxel becomes not only a piece of material but also a scoring cell. The actor keeps running sums, such as total deposited energy, inside each cell. After the simulation, it writes out a new 3D image where each voxel value is the scored quantity instead of the original CT value.

In this way, voxel data serve both as input geometry and as the structure that holds simulation results. It is therefore essential that the grid is correctly defined. If the voxel size is wrong, the physical size of the patient or phantom will be wrong, and all distances and path lengths in the simulation will be incorrect. If the grid origin is misplaced, beams and sources may miss the region you think they are hitting.

Because GATE is unit aware, voxel dimensions and positions must be expressed with explicit units. For example, if your CT spacing is given in millimeters, you must convert it to GATE units such as 1 * mm when defining or checking related parameters. Incorrect units lead directly to an incorrect voxel geometry. The chapter on units in GATE explains the details of these conventions.

When working with large voxel data sets, performance considerations become important. Each voxel adds to the complexity of geometry navigation for particles. Numerous very small voxels can slow down particle tracking. If you plan to use image based volumes at very fine resolution, it can help to limit the simulated region to the part you actually need. Cropping of the image before importing it into GATE, or using smaller regions of interest, reduces the number of voxels and can make simulations more practical.

For debugging and verification, you should always visualize voxelized geometry after creating an image based volume. Simple checks include confirming the outer shape and size, verifying that the volume is correctly centered or positioned, and confirming that the orientation matches the expected anatomical directions. Visualization can also help confirm that the voxel data are not inverted, shifted, or rotated relative to your sources and detectors.

Finally, voxel data in GATE are not restricted to patient CT images. Any 3D numerical phantom can be used, as long as it is provided in a supported image format and the grid information is correctly defined. You might use a simple water box image, an anthropomorphic phantom, or even functional images that later control source activity distribution. In each case, the underlying concept is the same, a regular grid of voxels that GATE turns into a structured volume.

Always ensure that voxel grid dimensions, voxel spacing, and image origin are correctly interpreted before running a full simulation. Any error in these parameters will propagate to all geometry, material assignment, and dose or activity results obtained inside the image based volume.

Views: 9

Comments

Please login to add a comment.

Don't have an account? Register now!