Geometry

Placement of objects in the world coordinate system

_images/geometry.svg

Fig. 2 World coordinate system {x, y, z} and local coordinate systems {u, v, w}.

This specification does not define a fixed coordinate system for the CT set-up. The only assumption is that a right-handed world coordinate system {x, y, z} is used, and the local coordinate systems {u, v, w} of source, detector and sample stage are to be placed in this world coordinate system. Fig. 2 illustrates the general placement that is used in the following examples.

The "geometry" section has three subsections to define the location and orientation of the principal CT scanner components: "detector", "source" and "stage". They all share a common set of JSON properties for positioning. A very similar description is used later on to place samples into the scene (see sample positioning). The placement description generally consists of the following parts:

"center":

specifies the object’s center (x, y, z) in the world coordinate system, i.e., the geometric center of its bounding box. The bounding box is defined as the smallest cuboid (or rectangle, for 2D objects) that completely encloses the object, under the condition that the cuboid’s edges are each strictly parallel to one of the coordinate axes of the object’s own Cartesian coordinate system. The "center" is the origin of the local coordinate system {u, v, w} and also the pivot point for rotational deviations if no alternative pivot point is specified.

"vector_u": and "vector_w":

specify the object’s orientation by defining the basis vectors \vec{u} and \vec{w} of the local coordinate system in terms of the world coordinate system {x, y, z}. They are not required to be unit vectors but they must be orthogonal.

\vec{w} is usually meant to be a normal vector and \vec{u} is one of the support vectors. \vec{u} and \vec{v} also serve a second meaning as row and column vector of the resulting projection (for the detector) or of a given spot intensity profile image (for the source). See the descriptions below for details.

Deviations

Deviations are small shifts (translations) or rotations that specify how much an object’s position or orientation differs from its ideal placement for the given frame. Deviations can be part of an object’s geometry definition. For example, a wobbling rotation axis of the stage could be described as a tilt of its local coordinate system:

42"deviations": [
43  {
44    "type": "translation",
45    "axis": "x",
46    "amount": {"value": 0.5, "unit": "mm"},
47    "known_to_reconstruction": false
48  },
49  {
50    "type": "rotation",
51    "axis": "w",
52    "amount": {"value": 2.3e-2, "unit": "rad"},
53    "known_to_reconstruction": true
54  }
55]

"deviations": an array that can be used to specify a sequence of small deviations from the ideal geometry, both rotational or translational. Examples would be tilts of the detector or the rotation axis, or small shifts that should or should not be considered during the reconstruction of the CT scan.

A simulation software should treat the array’s deviation components as subsequent transformations of the frame’s ideal local coordinate system.

A deviation component should provide the following properties:

  • "type": can be either "translation" or "rotation".

  • "amount": the amount by which to deviate. For a translational deviation, this is the length by which the object should shift in the given direction. For a rotational deviation, it is the angle by which the object should rotate around the given axis (and optionally, the given pivot point). A "value" and "unit" must be specified for the amount.

  • "axis": specifies the direction of the deviation. For translations, it provides the direction of the shift. For rotations, it provides the rotation axis. The axis must not be a unit vector, but its length has no special significance.

    The axis can be given as a designation (name) or as an arbitrary vector:

    • "x", "y" or "z" are the axes of the world coordinate system.

      45"axis": "x"
      
    • "u", "v" or "w" are the axes of the local coordinate system or of the stage coordinate system (in case of samples).

      51"axis": "w"
      
    • "r", "s" or "t" are the local axes of the sample coordinate system (see samples for details).

    • An arbitrary axis can be specified using the vector components from any of the three aforementioned sets (world, local or sample). For example, a vector defined in the world coordinate system would look like:

      57"axis": {
      58  "x": {"value":  2.0},
      59  "y": {"value": -3.0},
      60  "z": {"value":  5.3}
      61}
      

      whereas a vector that is fixed to the local coordinate system would look like in the following listing. If this were defined for the stage, the vector would follow the stage’s rotation throughout the CT scan.

      122"axis": {
      123  "u": {"value": 1},
      124  "v": {"value": 1},
      125  "w": {"value": 0}
      126}
      
  • "pivot": For rotations, the pivot point defines where the rotation axis is attached. If not specified, the object’s center point is assumed to be the rotation’s pivot point. Similar to the "axis", the pivot can be expressed in terms of the world coordinate system {x, y, z}, the local (or stage) coordinate system {u, v, w}, or the sample coordinate sytem {r, s, t}. It does not have to be the same coordinate system as for the "axis".

    62"pivot": {
    63  "u": {"value":  1.0, "unit": "mm"},
    64  "v": {"value": -2.0, "unit": "mm"},
    65  "w": {"value":  2.5, "unit": "mm"}
    66}
    
  • "known_to_reconstruction": Whether these deviations are known to the reconstruction software or not depends on the purpose of the scenario and can be specified by setting this property to either true or false. If not specified, the parameter’s standard value is true.

    53"known_to_reconstruction": true
    

Note that deviations are applied on a per-frame basis. They do not propagate to the next frame, they do not accumulate. For a given frame, all deviations are assumed to be applied after the rotating sample stage has arrived at its intended angular position. This means that if the deviation’s "amount" is drifting throughout the CT scan, the deviation is calculated anew for each frame, based on its current drift value, and assumed to be applied to the object’s ideal position and orientation for the frame (without considering any previous deviations that have been applied in the frames before).

For example, a static stage tilt can be modelled by a rotation around on of the axes of the world coordinate system, or a vector that is given in terms of {x, y, z}:

"deviations": [
  {
    "comment": "static axis tilt around beam direction",
    "type": "rotation",
    "axis": "x",
    "amount": {"value": 4, "unit": "deg"},
    "known_to_reconstruction": false
  }
]

If a dynamic stage tilt (wobble) is modelled, it can be given as a rotation around one of its local axes, or any vector given in terms of the local coordinate system {u, v, w}. This way, the deviation’s axis will rotate along with the CT stage. Since each deviation is applied on a per-frame basis from the frame’s ideal geometry, the axis will precess around a cone.

118"deviations": [
119  {
120    "comment": "axis wobble",
121    "type": "rotation",
122    "axis": {
123      "u": {"value": 1},
124      "v": {"value": 1},
125      "w": {"value": 0}
126    }
127    "amount": {"value": 4, "unit": "deg"},
128    "known_to_reconstruction": false
129  }
130]

Detector

For this specification, in general, vectors \vec{u} and \vec{v} designate an item’s in-plane vectors, whereas \vec{w} usually designates a normal vector. Following this convention, \vec{u}_\textsf{D} is the detector’s row vector, pointing from left to right in the resulting projection image (as seen on a computer screen with a pixel coordinate system that has its origin in the upper left corner). \vec{v}_\textsf{D} is the detector’s column vector, pointing from top to bottom in the resulting projection image. The orientation of these two vectors directly determines the orientation of the projection image.

Note that for any object only the normal vector \vec{w} and the support vector \vec{u} are given in the JSON file. The detector normal \vec{w}_\textsf{D} does not have any special meaning and should be arranged such that the detector’s row and column vector point in the desired directions.

The size and further properties of the detector are defined later on in the detector section of the JSON file.

24"detector": {
25  "center": {
26    "x": {"value": 400, "unit": "mm"},
27    "y": {"value":   0, "unit": "mm"},
28    "z": {"value":   0, "unit": "mm"}
29  },
30
31  "vector_u": {
32    "x": {"value":  0},
33    "y": {"value": -1},
34    "z": {"value":  0}
35  },
36  "vector_w": {
37    "x": {"value":  1},
38    "y": {"value":  0},
39    "z": {"value":  0}
40  },
41
42  "deviations": [
43    {
44      "type": "translation",
45      "axis": "x",
46      "amount": {"value": 0.5, "unit": "mm"},
47      "known_to_reconstruction": false
48    },
49    {
50      "type": "rotation",
51      "axis": "w",
52      "amount": {"value": 2.3e-2, "unit": "rad"},
53      "known_to_reconstruction": true
54    },
55    {
56      "type": "rotation",
57      "axis": {
58        "x": {"value":  2.0},
59        "y": {"value": -3.0},
60        "z": {"value":  5.3}
61      },
62      "pivot": {
63        "x": {"value":  2.0, "unit": "mm"},
64        "y": {"value": -3.0, "unit": "mm"},
65        "z": {"value":  5.3, "unit": "mm"}
66      },
67      "amount": {"value": 1.3, "unit": "deg"},
68      "known_to_reconstruction": true
69    }
70  ]
71}

Source

The source can be modelled either as a cone-beam geometry or a parallel beam geometry. This behaviour is set by the "type": property, which can be either "cone" or "parallel".

74"type": "cone",
75"type": "parallel"

In the case of a parallel beam, its divergence can be specified along both planar axes of the source:

75"beam_divergence": {
76  "u": {"value": 0, "unit": "deg"},
77  "v": {"value": 0, "unit": "deg"}
78}

For a cone beam geometry, this property should be set to null:

75"beam_divergence": null

Spatially extended source intensity profiles are modelled as a rectangle. For cone-beam geometries, this will be a very small rectangle on the size scale of the spot size.

For parallel beam geometries, the optical axis of the system is assumed to be the \vec{w}_\textsf{F} axis of the source, and all rays should be parallel to this axis (apart from beam divergence). This means that the source rectangle in the model should ideally be of a size such that the entire detector is covered by radiation.

If a spot intensity profile is given as an image (see source for details), \vec{u}_\textsf{F} is the image’s row vector, pointing from left to right in this image, and \vec{v}_\textsf{F} is the image’s column vector, pointing from top to bottom.

To allow the correct orientation of the intensity profile image, the vector \vec{w}_\textsf{F} does not necessarily point in the main direction of radiation, but could also point in the opposite direction (due to the restraint of a right-handed coordinate system).

Within the WIPANO CTSimU project, we agreed to the convention of placing the source at (0, 0, 0). It is not a requirement.

73"source": {
74  "type": "cone",
75  "beam_divergence": {
76    "u": {"value": 0, "unit": "deg"},
77    "v": {"value": 0, "unit": "deg"}
78  },
79
80  "center": {
81    "x": {"value": 0, "unit": "mm"},
82    "y": {"value": 0, "unit": "mm"},
83    "z": {"value": 0, "unit": "mm"}
84  },
85
86  "vector_u": {
87    "x": {"value":  0},
88    "y": {"value": -1},
89    "z": {"value":  0}
90  },
91  "vector_w": {
92    "x": {"value":  1},
93    "y": {"value":  0},
94    "z": {"value":  0}
95  },
96
97  "deviations": []
98}

Stage

The normal vector \vec{w}_\textsf{O} of the sample stage specifies the axis of rotation for the CT scan. By default, the sample stage coordinate system and all samples attached to it are meant to rotate around this axis, whereas the source and detector stay still (as for typical industrial CT scanners).

Samples that are placed in the stage coordinate system all take part in the rotation of the sample stage. Samples that are placed in the world coordinate system are fixed during the CT scan (i.e. fixed relative to source and detector, see samples for details).

100"stage": {
101  "center": {
102    "x": {"value": 275, "unit": "mm"},
103    "y": {"value":   0, "unit": "mm"},
104    "z": {"value":   0, "unit": "mm"}
105  },
106
107  "vector_u": {
108    "x": {"value":  1},
109    "y": {"value":  0},
110    "z": {"value":  0}
111  },
112  "vector_w": {
113    "x": {"value":  0},
114    "y": {"value":  0},
115    "z": {"value":  1}
116  },
117
118  "deviations": [
119    {
120      "comment": "axis wobble",
121      "type": "rotation",
122      "axis": "u",
123      "amount": {"value": 4, "unit": "deg"},
124      "known_to_reconstruction": false
125    }
126  ]
127}