Repository navigation
Support full Euler angles (alpha, theta, psi) in parallel Siddon projector - #792
Open
hashimoto-koh wants to merge 1 commit into
Open
hashimoto-koh wants to merge 1 commit into
hashimoto-koh wants to merge 1 commit into
Conversation
…ector Previously, parallel Siddon projection only considered 2D rotation around the Z-axis using geo.alpha, completely ignoring theta and psi. This prevented parallel-beam laminography and tilted-axis geometries from being simulated with the Siddon projector. This commit: - Applies eulerZYZ rotation to ray endpoints and detector planes. - Completes Z-axis Siddon stepping and ray bounds. - Enforces plane traversal invariants (a > am) and determines initial voxel indices from direction and boundary planes, avoiding voxel misidentification on grazing and cardinal rays. - Retains original division operators to preserve bitwise consistency with upstream baseline for untilted parallel projections. - Returns early for rays not intersecting the volume AABB. - Adds comprehensive regression tests in Python/tests/test_parallel_siddon_euler.py.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
For
geo.mode == "parallel"withprojection_type == "Siddon", the projector previously only applied 2D rotation around the Z-axis usinggeo.alpha, completely ignoringgeo.thetaandgeo.psi.This prevented parallel-beam laminography and tilted-axis geometries from being simulated with the Siddon projector.
This PR introduces the 3D ZYZ Euler rotation (
eulerZYZ) intoCommon/CUDA/Siddon_projection_parallel.cu, ensuring that all three view-dependent angles(alpha, theta, psi)are correctly applied to the parallel rays and detector plane according to TIGRE's geometry convention.In addition, it completes the 3D Siddon kernel by:
azm,azM,kmin,kmax,az,azu).theta=0, psi=0) by retaining original division operators.am >= aM), which is required for correct ray tracking in tilted geometries.Verification
thetaandpsiindependently alters projections of an asymmetric 3D volume as expected.theta=0, psi=0matches upstream master baseline with zero error (max absolute error = 0.0).theta=pi/2) and cardinal entry views (72 views probe) that marcher integration matches actual GPU endpoint Ray-AABB intersection lengths within ~5.4e-5. (Note: as with existing float32 projectors, grazing rays extremely close to voxel boundaries are subject to single-precision coordinate construction rounding).Python/tests/test_parallel_siddon_euler.pycontaining 7 comprehensive regression test cases (all passing).