saddle_trajectory_3d#

diffct.geometry.saddle_trajectory_3d(n_views, sid, sdd, z_amplitude=50.0, radial_amplitude=30.0, start_angle=0.0, device='cuda', dtype=torch.float32)[source]#

Generate saddle-shaped trajectory geometry for cone-beam CT.

The source height varies with cos(2 * angle) and its radius varies with sin(2 * angle).

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

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

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

  • z_amplitude (float, optional) – Amplitude of z-axis variation (default: 50.0).

  • radial_amplitude (float, optional) – Amplitude of radial variation (default: 30.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 = saddle_trajectory_3d(
...     n_views=360, sid=1000.0, sdd=1500.0, z_amplitude=80.0, radial_amplitude=50.0
... )