KAHIBARO
Discord Login Register

6.6. Position and Translation

X coordinate

In GATE, every volume is placed in a three dimensional Cartesian coordinate system. The position of a volume is always defined relative to its parent volume, not necessarily relative to the global laboratory frame. The three coordinates are written as a triplet, usually in millimeters, for example [0, 10 mm, -5 mm].

The X coordinate describes how far a point or volume is translated along the horizontal left–right axis of its parent. By convention in GATE and Geant4, positive X moves a volume toward the +X side of the parent, and negative X moves it toward the −X side. If your scanner is centered at the origin, a detector with position [50 mm, 0, 0] is 50 mm to the +X side of the center, while one at [-50 mm, 0, 0] is 50 mm to the opposite side.

Because positions are always relative to the parent, a child volume at [10 mm, 0, 0] inside a module that is itself at [100 mm, 0, 0] will end up 110 mm from the global origin in X. GATE takes care of these nested translations; you only need to think locally: where is the child with respect to its container.

For symmetric geometries such as detector arrays, the X coordinate is often used to spread copies along a line or to place modules around a ring. A common pattern is to define a central reference position and then add or subtract half widths. For a box of size sx along X, if you want its left face to touch X = 0 of the parent, you place its center at [sx / 2, 0, 0]. Remember that GATE expects the position of the center of the volume, not of a face or a corner.

Important rule: The position of a volume in GATE is always the position of its center, expressed in the coordinate system of its parent volume.

When debugging translations, it is helpful to compute a few expected coordinates by hand. For example, if you have an array of crystals of width w along X and you place them at positions i w with i = 0, 1, 2, their centers will sit with no gap or overlap if they are directly adjacent. If you want a gap g between crystals, the pitch becomes w + g, and the X coordinate for the ith crystal is i (w + g).

Y coordinate

The Y coordinate sets the position along the vertical up–down axis of the parent volume. Positive Y moves a volume toward the +Y direction; negative Y moves it toward the −Y direction. For a volume at [0, 100 * mm, 0] inside the world, the center is 100 mm above the origin along Y.

In many medical physics geometries, the Y axis is often chosen as the superior–inferior axis of a patient, or the vertical direction of a scanner gantry. The precise meaning depends on how you define your world and phantoms, but the numerical behavior is always the same: Y is the second component of the position triplet.

As with X, the Y coordinate is relative to the parent. If a phantom is centered at [0, 50 mm, 0] and you create a detector at [0, 20 mm, 0] inside that phantom, the detector is effectively 70 mm above the global origin along Y. GATE automatically combines these translations when it computes where particles travel.

The Y coordinate is also essential when you build stacked structures. For instance, if you simulate a table below a patient, you might set the table center at [-50 mm] in Y so that its top surface touches Y = 0, then place the patient phantom centered at [+50 mm] so that it rests above the table. Again, because positions are for centers, you typically compute a coordinate as half the sum of thicknesses when you want surfaces to touch.

Important rule: When aligning volumes vertically, always compute Y positions using half thicknesses so that faces meet without gaps or overlaps.

Although you can place volumes anywhere in Y, it is useful for clarity and later analysis to keep a consistent reference. For example, you might choose Y = 0 as the isocenter of a treatment beam or the midplane of a PET ring. All other Y coordinates are then distances above or below that clinically meaningful plane.

Z coordinate

The Z coordinate controls translation along the third spatial axis, typically interpreted as the axis that goes into and out of the screen in 2D drawings. Positive Z moves a volume toward the +Z side of the parent; negative Z moves it in the opposite direction. In many scanner geometries, the Z axis is used as the axial direction along the length of the scanner bore.

For a simple centered setup, a volume placed at [0, 0, 200 * mm] is 200 mm along the +Z direction from the origin of its parent. If the parent is the world and is centered at the global origin, this means the volume sits 200 mm downstream of Z = 0. If you build a PET ring and then extend it along Z with multiple rings or axial modules, you will change primarily the Z coordinate while keeping X and Y fixed or governed by rotational symmetries.

As before, the Z coordinate is specified for the volume center. This is particularly important when you build layered structures along Z, such as a series of detector planes or CT slices. Suppose you have detector panels of thickness t along Z and you want two panels to touch. Place one panel at [-t / 2,] and the other at [+t / 2] along Z so that their faces meet at Z = 0. If there should be a gap g between them, then use positions [-(t + g) / 2] and [(t + g) / 2].

In many time dependent or rotating simulations, you will keep the Z coordinate of a central axis fixed while rotating objects around that axis. The Z positions of volumes then directly determine their axial coverage. For example, if your PET ring has an axial length L and you want it centered at Z = 0, you might place modules so that their Z coordinates range symmetrically from -L/2 to +L/2.

Important rule: The triplet [x, y, z] always represents a position in the parent coordinate system, with X, Y, and Z interpreted as left–right, up–down, and axial directions respectively, unless you deliberately choose a different convention for your geometry.

When verifying translations along Z, image your geometry with visualization tools and check the axial extent and alignment. If layers appear shifted or overlapping, revisit the Z coordinates and confirm that you have used center positions and consistent half thickness calculations.

Views: 12

Comments

Please login to add a comment.

Don't have an account? Register now!