spiral_trajectory_3d#

diffct.geometry.spiral_trajectory_3d(n_views, sid, sdd, z_range=100.0, n_turns=2.0, start_angle=0.0, device='cuda', dtype=torch.float32)[source]#

Generate spiral (helical) trajectory geometry for cone-beam CT.

Creates a helical trajectory where the source moves in a spiral pattern around the z-axis, commonly used in helical CT scanners.

Parameters:
  • n_views (int) – Number of projection views.

  • sid (float) – Source-to-Isocenter Distance (SID), in physical units.

  • sdd (float) – Source-to-Detector Distance (SDD), in physical units.

  • z_range (float, optional) – Total z-axis range covered during the spiral (default: 100.0).

  • n_turns (float, optional) – Number of complete rotations (default: 2.0).

  • start_angle (float, optional) – Starting angle in radians (default: 0.0).

  • device (str or torch.device, optional) – Device for tensors (default: ‘cuda’).

  • dtype (torch.dtype, optional) – Data type for tensors (default: torch.float32).

Returns:

  • src_pos (torch.Tensor) – Source positions, shape (n_views, 3).

  • det_center (torch.Tensor) – Detector center positions, shape (n_views, 3).

  • det_u_vec (torch.Tensor) – Detector u-direction unit vectors, shape (n_views, 3).

  • det_v_vec (torch.Tensor) – Detector v-direction unit vectors, shape (n_views, 3).

Examples

>>> src_pos, det_center, det_u_vec, det_v_vec = spiral_trajectory_3d(
...     n_views=360, sid=1000.0, sdd=1500.0, z_range=200.0, n_turns=3.0
... )