![]() |
ImFusion SDK 4.3
|
Modern geometrical framework for cone-beam X-ray acquisitions. More...
Collaboration diagram for Cone Beam Geometry:Modern geometrical framework for cone-beam X-ray acquisitions.
extent.x, extent.y only represent physical size of the image, not the "image" coordinate system.We refer to a single X-ray image taken with a point source as a "cone-beam" image. A set of such cone-beam images is described by a CT::ConeBeamData object. CT::ConeBeamMetadata DataComponent which contains the geometry information is attached to the CT::ConeBeamData object. This system is used to describe circular acquisition geometries as used in cone-beam CT, but can also be used to describe the geometry of sets of more-general X-ray images.
Mathematically, cone-beam images are equivalent to pinhole camera images. The intrinsic parameters between individual shots often do not vary in an acquisition. The acquisition geometry of such a set can be described using the modern geometry system with per-frame flexibility, or with the legacy CT::ConeBeamGeometry class for backward compatibility.
Before working with cone-beam geometry, it is essential to understand the coordinate system conventions used throughout the ImFusion CT module.
ImFusion SDK supports three different coordinate systems, please refer to CoordinateSystems for more details.
Coordinates of a point are often transformed back and forth between coordinate systems for particular use cases. Therefore, it is crucial to define the coordinate system of a specific context.
By default, ImFusionCT considers an X-ray image viewed from the source towards the detector plane.
Based on this perspective, the left/right sides of the image correspond to the left/right sides of the viewer, and the top/bottom refer to the upper/lower sides of the image relative to the viewer's eyes.
Similarly to ImFusion SDK Coordinate Systems, ImFusionCT also makes use of four coordinate conventions for X-ray images.
pixel: origin (0,0) is at the center of the top-left pixel of an image.
Axes x: left-right, y: top-bottom.
Ranges [0,width-1] x [0,height-1] pixels.
image: origin (0,0) is at the center of the image.
Axes x: left-right, y: top-bottom.
Ranges [-extent.x/2,extent.x/2] x [-extent.y/2,extent.y/2] mm, with extent is a vec3 storing 3D physical size of an image.
texture: origin (0, 0) is at the top-left corner.
Axes x: left-right, y: top-bottom.
Ranges [0,1] x [0,1].
OpenGL clip coordinates: origin (0, 0) is at the center of the image.
Axes x: left-right, y: bottom-top.
Ranges [-1,1]x[-1,1].
There are two separate coordinate systems considered in this context, world coordinate system and detector coordinate system.
The followings define the two 'standard' coordinate systems without any further transformations.
bottom-top, the source is on the x'z'-plane.back-front (detector-source)top-bottom, the source is on the x'z'-plane.front-back (source-detector)Matrix section.There are various acquisition geometries corresponding to different X-ray CT scanners. The geometry can be defined by explicitly providing the projection matrices, using parametric generators, or through manual per-frame setup.
The modern geometry system supports both OpenGL and OpenCV matrix conventions for import and export. Internally, matrices follow the OpenGL convention but the system provides convenient conversion functions between the two conventions.
The full OpenGL projection matrix transforms 3D points to 2D points in OpenGL clip coordinates (see Coordinate system conventions section).
The geometry system provides seamless conversion between OpenGL and OpenCV matrix formats through the CT::GeometryUtils namespace, supporting both import from and export to either convention with comprehensive utility functions for all common matrix operations.
One can use the utility functions CT::Utils::project(), CT::Utils::backproject() to compute the forward/backward projections of points using the matrices.
The modern geometry system in ImFusion CT is built around flexible, per-frame geometry representations that can handle arbitrary acquisition setups. The system uses data components to store geometry information and generators to create e.g. parametric acquisition patterns.
First, convert your SharedImageSet to Cone Beam Data and enable the modern geometry system:
For common acquisition patterns (e.g. circular trajectories), use the CT::ParametricGeometryGenerator:
For custom acquisition patterns, set geometry manually per frame:
The modern geometry system supports bidirectional conversion between OpenGL and OpenCV matrix conventions through the CT::GeometryUtils namespace. These utilities provide comprehensive matrix conversion capabilities.
For convenience, all conversion functions are also available with direct SharedImageSet access:
Convert between legacy CT::ConeBeamGeometry and modern representation:
The modern system supports various detector types through CT::DetectorPropertiesDataComponent:
ImFusionCT supports curved detector geometry through the DetectorPropertiesDataComponent. In this non-standard detector acquisition, it is assumed that the 3D points are first projected on a virtual flat-panel detector and corrected for the real detector curvature afterwards.
All geometry settings for an acquisition with a curved detector can be given directly through the matrices or parameters as for a circular geometry.
The DetectorPropertiesDataComponent::Curvature allows specifying different types of detector for a data acquisition:
FLAT: Standard flat panel detectorCYLINDRICAL: Curved cylindrical detector FANFLAT: Fan-beam flat detectorFor curved detectors, additional parameters are required:
curvedOffsets)radii)Example setup for curved detector:
The curved detector uses the matrices as for the flat-panel detector to compute forward/backward projections of a point and compensates for the detector curvature afterwards.
We use the representation with projection matrices to define a virtual detector plane. This virtual detector is tangent to the curved detector at the principal point. The point on the virtual detector represents the arclength on the curved detector, i.e. the virtual detector is "rolled" onto the curved one.
A fan-beam acquisition is the X-ray CT acquisition where the source/detector moves along an axis while the X-ray fan-flat beams are emitted. Fan-beam geometry setting can be enabled through DetectorPropertiesDataComponent:
This is commonly used in 2D CT scanners and some dental imaging systems.
The CT module provides utility functions for common geometric operations:
For backward compatibility, the legacy CT::ConeBeamGeometry is still supported but not recommended for new projects:
To migrate existing code from legacy to modern geometry:
metadata.geometry() calls with geometry generators or manual per-frame setupCT::GeometryUtils::matrixGlToImage() instead of geometry.matrix() SourceDataComponent and DetectorDataComponent for frame-specific geometryThe modern system provides equivalent functionality with greater flexibility and cleaner separation of concerns.
A common X-ray CT acquisition geometry follows a circular trajectory where the source/detector rotate around the patient. Apart from providing the matrices explicitly, the circular geometry can be directly parameterized by geometry parameters.
These parameters are defined with respect to the standard world coordinate system. In such standard setting, the 'patient' (or 'iso-center') is at the center of the arc. Without further configuration, the iso-center is at the point (0, 0, 0).
The detector-related parameters are defined with respect to the standard detector coordinate system:
The angleTilt parameter acts the same way as detShearY after applying:
The isoMatrix is the rigid transformation (rotation, translation) matrix of the iso-center (CT volume):
The orientation and position of the reconstruction volume relative to the standard world coordinate system are represented by these rotation and translation parameters.
Namespaces | |
| namespace | ImFusion |
| Namespace of the ImFusion SDK. | |
| namespace | ImFusion::CT |
| X-ray and computed tomography. | |
| namespace | ImFusion::CT::SpecificProjectionGeometries |
| Predefined geometries for specific imaging systems. | |
| namespace | ImFusion::CT::GeometryUtils |
| Utility functions for geometry processing and manipulation. | |
Classes | |
| class | ConeBeamCalibration |
| Geometric calibration algorithm for X-ray imaging systems. More... | |
| class | CopyConeBeamGeometryAlgorithm |
| Algorithm for copying cone-beam geometry between datasets. More... | |
| class | GeometryGeneratorOptimizingAlgorithm |
| Optimizing algorithm for cone-beam geometry parameter estimation. More... | |
| class | ProjectionMatrixIoAlgorithm |
| I/O algorithm for saving and loading projection matrices. More... | |
| class | FullGeometryRepresentationWrapper |
| class | SnapshotGenerator |
| Geometry generator for capturing current geometric state. More... | |
| class | RelativeGeneratorMixin< T > |
| Template mixin for relative geometry generators. More... | |
| class | MotionModelGenerator |
| Geometry generator using motion models for complex trajectories. More... | |
| class | GlobalTransformationGeneratorBase |
| Base class for global transformation generators. More... | |
| class | RelativeGlobalTransformationGenerator |
| Geometry generator for single relative transformation applied to all frames. More... | |
| class | PerFrameTransformationGeneratorBase |
| Base class for per-frame transformation generators. More... | |
| class | RelativePerFrameTransformationGenerator |
| Geometry generator for individual relative transformations per frame. More... | |
| class | DetectorPropertiesDataComponent |
| Data component for detector properties and configuration Stores detector-specific parameters and settings for cone-beam systems. More... | |
| class | GeometryAlgorithm |
| Algorithm for applying geometry settings to cone-beam data. More... | |
| class | SourceDataComponent |
| Data component for cone-beam X-ray source parameters. More... | |
| class | DetectorDataComponent |
| DataComponent to store the transformation from world to detector space for a single frame. More... | |
| class | GeometryGenerator |
| Base class for X-ray geometry generators. More... | |
| class | GeometryGeneratorParameterWrapper |
| Parameter wrapper for geometry generator optimization. More... | |
| class | ParametricGeometryGenerator |
| Parametric geometry generator for regular CBCT acquisition trajectories. More... | |
| struct | RelativeTransformationConfig |
| Configuration structure for relative transformation setup. More... | |
| struct | RelativeTransformationSetupWrapperBase |
| Base class for RelativeTransformationSetupWrapper which requires customer move and copy semantics due to signal connections it creates. More... | |
| class | RelativeTransformationSetupWrapper |
| This class handles signal connections and ensures reconnecting after copying etc. More... | |
| class | ConeBeamDisplayOptions |
| Data component for cone-beam display configuration. More... | |