Skip to content

ENH: Check rotation axis is along Y in FDK reconstruction - #998

Merged
SimonRit merged 1 commit into
RTKConsortium:mainfrom
axel-grc:RampCheck
Sep 13, 2026
Merged

SimonRit merged 1 commit into
RTKConsortium:mainfrom
axel-grc:RampCheck

Conversation

@axel-grc

Copy link
Copy Markdown
Collaborator

Fix #335

@SimonRit SimonRit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this. I'd suggest to allow some (possibly configurable) tolerance

Comment on lines +72 to +73
if (std::abs(matrices[i][1][0]) > 1e-6 || std::abs(matrices[i][1][1] - 1.) > 1e-6 ||
std::abs(matrices[i][1][2]) > 1e-6)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too strong, we want to allow some misalignment. I would suggest checking the dot product between this second column vector and (0,1,0) and to checking it's not below a certain threshold, e.g. sqrt(3)/2 (i.e., cos(pi)/6)

@axel-grc
axel-grc force-pushed the RampCheck branch 2 times, most recently from ded8ad1 to 14ac0ef Compare September 11, 2026 08:24

@SimonRit SimonRit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your efforts! Can be merged when the CI will be green.

{
// Dot product between the second column vector of the rotation matrix and (0,1,0),
// normalized to obtain the cosine of the angle with the Y axis
const double norm = std::sqrt(matrices[i][1][0] * matrices[i][1][0] + matrices[i][1][1] * matrices[i][1][1] +

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each column of a rotation matrix is a unit vector I believe so norm can be dropped I think.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each column of a rotation matrix is a unit vector I believe so norm can be dropped I think.

Right, I fixed it, thanks !

@SimonRit SimonRit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix

@SimonRit
SimonRit merged commit 39a91b7 into RTKConsortium:main Sep 13, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FDK reconstruction does not check the ramp filter direction

2 participants