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

Code overlaps in computing gradients of objective functions removed. #1284

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

evgueni-ovtchinnikov
Copy link
Contributor

Changes in this pull request

Got rid of code overlaps in computing gradients of objective functions.

Testing performed

Related issues

fixes #1252

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have added docstrings/doxygen in line with the guidance in the developer guide
  • I have implemented unit tests that cover any new or modified functionality
  • The code builds and runs on my machine
  • CHANGES.md has been updated with any functionality change

Contribution Notes

Please read and adhere to the contribution guidelines.

Please tick the following:

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in SIRF (the Work) under the terms and conditions of the Apache-2.0 License.

@evgueni-ovtchinnikov evgueni-ovtchinnikov self-assigned this Aug 7, 2024
Copy link
Member

@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.

some small comments for shorter (and therefore clearer) code). Otherwise, I just suggest addiing some comments on the diff between cSTIR_objectiveFunctionGradient and cSTIR_computeObjectiveFunctionGradient (not obvious from the name!)

src/xSTIR/cSTIR/cstir.cpp Outdated Show resolved Hide resolved
src/xSTIR/cSTIR/cstir.cpp Outdated Show resolved Hide resolved
public:
void compute_gradient(const STIRImageData& id, int subset, STIRImageData& gd)
Copy link
Member

Choose a reason for hiding this comment

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

add a doxygen string please.

By the way, does SIRF not use the same convention as STIR, where the output arg gd is placed first?

Copy link
Contributor Author

@evgueni-ovtchinnikov evgueni-ovtchinnikov Aug 13, 2024

Choose a reason for hiding this comment

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

doxygen: done

STIR convention: no, SIRF does not use it

@evgueni-ovtchinnikov evgueni-ovtchinnikov merged commit 1e2c5c1 into master Aug 13, 2024
0 of 3 checks passed
@evgueni-ovtchinnikov evgueni-ovtchinnikov deleted the obj-fun-grad branch August 13, 2024 12:53
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.

Recently merged PR #1246 needs some more work (not urgent).
2 participants