Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix egs_cbct, egs_fac compilation and egs_cbct example #940

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

rtownson
Copy link
Collaborator

Fix a compiler error that occurred with newer compiler settings due to ambiguous declaration of isinf and isnan, by adding std::.

Also change the z-rotation parameter in the example input file to be 0 so that it calculates the first projection instead of a later projection. This avoids a common user error when trying to produce the blank scan for the first time, as reported here: https://www.reddit.com/r/EGSnrc/comments/z36841/query_fatal_error_message_egs_cbct_blank_scan/

@rtownson rtownson requested a review from a team November 24, 2022 16:29
@rtownson rtownson self-assigned this Nov 24, 2022
@rtownson rtownson requested review from ftessier, mainegra and blakewalters and removed request for a team November 24, 2022 16:29
@mainegra
Copy link
Contributor

@rtownson thanks for looking into this! My only comment is that in the case of the non-zero rotation, if both, the blank scan and the actual scan use the same rotation, then there should be no issue as the projection would be place at the same location of their corresponding scan files!

@mainegra
Copy link
Contributor

Setting the rotation to 0 will simply show a different phantom scan. So, it really doesn't matter.

@mainegra
Copy link
Contributor

mainegra commented Dec 15, 2022

@rtownson thanks for looking into this! My only comment is that in the case of the non-zero rotation, if both, the blank scan and the actual scan use the same rotation, then there should be no issue as the projection would be place at the same location of their corresponding scan files!

Actually, hold that thought! Something is not right! If I were to implement this now, I would just produce a blank scan whose size has to be Nx*Ny*size(float) since this is the same for any projection. Clearly, the blank scan produced with a non-zero angle makes no sense! So, your recommendation to set it to zero is the correct one! Ideally egs_cbct should not care about projections placement for a blank scan!

Copy link
Contributor

@mainegra mainegra left a comment

Choose a reason for hiding this comment

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

Perhaps add to the message reporting blank scan size mismatch a hint to set rotation to zero?

@rtownson rtownson requested a review from a team as a code owner December 22, 2022 16:14
@ftessier
Copy link
Member

ftessier commented Feb 16, 2023

I will merge this into master now (including std:: additions in egs_fac), otherwise the v2023 pre-release does not compile egs_cbct nor egs_fac!

@rtownson rtownson changed the title Fix egs_cbct compilation and example Fix egs_cbct, egs_fac compilation and egs_cbct example Feb 16, 2023
@rtownson
Copy link
Collaborator Author

Added the egs_fac fixes, now ready to merge.

Fix a compiler error that occurred with newer compiler settings due to
ambiguous declaration of isinf and isnan. Also change the z-rotation
parameter in the example input file to be 0 so that it calculates the
first projection instead of a later projection. This avoids a common
user error when trying to produce the blank scan for the first time.
@ftessier
Copy link
Member

Squashed the 3 commits.

@ftessier ftessier merged commit 7d36c2f into develop Feb 16, 2023
@ftessier ftessier deleted the fix-egs-cbct-isinf branch February 16, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants