Skip to content

Use forward projector parfile with calculate_attenuation_coefficients utility.#928

Merged
KrisThielemans merged 9 commits intoUCL:masterfrom
HTunne:calculate_attenuation_coefficients_use_parfile
Sep 24, 2021
Merged

Use forward projector parfile with calculate_attenuation_coefficients utility.#928
KrisThielemans merged 9 commits intoUCL:masterfrom
HTunne:calculate_attenuation_coefficients_use_parfile

Conversation

@HTunne
Copy link
Copy Markdown
Contributor

@HTunne HTunne commented Sep 15, 2021

Add an optional extra argument to 'calculate_attenuation_coefficients' utility to allow the use of a parameter file to describe the forward projector to use. The parameter file follows the format of the 'forward_project' utility.

This has been useful to allow caching to be disabled when working with large system matrices (particularly for block geometries).

@robbietuk
Copy link
Copy Markdown
Collaborator

@HTunne Great idea. I guess there are a lot of whitespace changes (probably due to IDE editors) that are unnessisery.

It may be worth adding a usage into the recon_test_pack. There is currently a single usage of the calculate_attenuation_coefficients utility at

calculate_attenuation_coefficients --ACF my_acfs$suffix.hs ${atten_image} ${template_sino} > my_create_acfs.log 2>&1

Shortly after this, the forward porjector parameter file forward_projector_proj_matrix_ray_tracing.par is used:
forward_project my_line_integrals$suffix.hs ${emission_image} ${template_sino} forward_projector_proj_matrix_ray_tracing.par > my_create_line_integrals.log 2>&1

Perhaps the calculate_attenuation_coefficients on L33 could use this projector? This would be a good demonstration of this PR's changes. Ideally STIR should have a proper test for calculate_attenuation_coefficients, but that is probably out of scope of this PR.

@HTunne HTunne force-pushed the calculate_attenuation_coefficients_use_parfile branch from e92892a to f30f6b0 Compare September 22, 2021 16:14
@HTunne
Copy link
Copy Markdown
Contributor Author

HTunne commented Sep 22, 2021

Hi @robbietuk, yep, had my editor set to remove trailing whitespace. Just cleaned up some of the unnecessary changes and added the suggested example usage to the recon_test_pack

Copy link
Copy Markdown
Collaborator

@KrisThielemans KrisThielemans left a comment

Choose a reason for hiding this comment

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

looks great. Thanks. Let's wait for Appveyor. I found just a tiny spelling mistake. Please commit that with [ci skip] in the commit message.

Comment thread src/utilities/calculate_attenuation_coefficients.cxx Outdated
@KrisThielemans KrisThielemans merged commit 5b2ab98 into UCL:master Sep 24, 2021
@KrisThielemans
Copy link
Copy Markdown
Collaborator

oops. I forgot to ask you to add a line in release_5.0.htm. Can you do a new PR for that. sorry!

@HTunne HTunne deleted the calculate_attenuation_coefficients_use_parfile branch September 24, 2021 11:09
@HTunne HTunne restored the calculate_attenuation_coefficients_use_parfile branch September 24, 2021 11:09
@HTunne
Copy link
Copy Markdown
Contributor Author

HTunne commented Sep 24, 2021

oops. I forgot to ask you to add a line in release_5.0.htm. Can you do a new PR for that. sorry!

Hi Kris, I'll add that now. I presume it should go under the 'New functionality' sub-heading?

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.

3 participants