Overview
ImFusion Computed Tomography (CT) Python Bindings
Core Functionality Areas
Geometry:
Cone beam geometry representation and manipulation
Parametric geometry generators for scanner configurations
Geometry calibration and validation tools
Simulation:
Forward projection and cone beam simulation
GPU-accelerated projection operators
Synthetic data generation from volumes and meshes
Scanner-specific simulation presets
2D/3D Registration:
X-ray to volume registration algorithms
Multiple initialization strategies (manual, keypoint, point-direction)
GPU-accelerated registration optimization
Reconstruction:
Analytical reconstruction (FDK)
Iterative reconstruction (MLEM, SART, SQS, CG)
Advanced regularization techniques
Example Usage
Basic cone beam geometry setup:
>>> import imfusion.computed_tomography as ct
>>> ct.make_cone_beam_data(projections)
>>> metadata = ct.ConeBeamMetadata.get(projections)
>>> metadata.enable_modern_geometry()
>>> param_gen = ct.ParametricGeometryGenerator()
>>> param_gen.source_det_distance = 1200.0
>>> param_gen.source_pat_distance = 800.0
>>> param_gen.angle_range = 180.0
>>> metadata.add_generator(param_gen, select=True)
Forward projection simulation:
>>> projections = ct.simulate_cone_beam_projections(
... volume,
... geometry_preset=ct.GeometryPreset.FULL_SCAN,
... proj_type=ct.ProjectionType.LOG_CONVERTED_ATTENUATION,
... width=1024, height=1024, frames=360,
... add_poisson_noise=False
... )
2D/3D registration workflow:
>>> ct.register_2d_3d_xray(
... projections, volume,
... initialization_mode=ct.InitializationMode.KEYPOINTS,
... num_resolution_levels=4,
... anatomy_name="spine"
... )
Reconstruction with iterative solver:
>>> volume = ct.reconstruct_cone_beam_ct(
... projections,
... solver_mode="MLEM",
... max_iterations=50,
... subset_size=10,
... force_positivity=True
... )
For detailed documentation of specific classes and functions, use Python’s built-in help() function or access the docstrings directly.
Note: This module requires the ImFusion CT plugin to be properly installed and licensed.