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

Refactor AverageAffineTransformFunction #1684

Merged
merged 2 commits into from
Feb 28, 2024
Merged

Conversation

dzenanz
Copy link
Contributor

@dzenanz dzenanz commented Feb 28, 2024

Remove NoRigid variant, and add useRigid and verbose iVars to AverageAffineTransformFunction.

Removal of NoRigid variant is a code simplification.

Addition of verbosity flag allows use from libraries where debug output is not expected and undesirable.

@stnava
Copy link
Member

stnava commented Feb 28, 2024 via email

@dzenanz
Copy link
Contributor Author

dzenanz commented Feb 28, 2024

It's functionality still exists, and has been moved to the main function: e9ec28e (#1684)

@gdevenyi
Copy link
Contributor

This impacts some of the template construction scripts and those would need updating.

@cookpa
Copy link
Member

cookpa commented Feb 28, 2024

This looks like it's backwards compatible, just refactors how the "no affine" average is computed.

@dzenanz
Copy link
Contributor Author

dzenanz commented Feb 28, 2024

@cookpa you are correct. Computation of NoRigid case is now done by the main class. It is meant to be 100% backwards compatible.

@dzenanz
Copy link
Contributor Author

dzenanz commented Feb 28, 2024

@gdevenyi The executable Examples/AverageAffineTransformNoRigid.cxx is still there, and should work the same. It just uses the new, consolidated class. Or is some other change need, of which I am unaware?

@gdevenyi
Copy link
Contributor

Ok, this was unclear to me from the initial comment.

Remove NoRigid variant, and add useRigid and verbose iVars to AverageAffineTransformFunction.

Copy link
Member

@cookpa cookpa left a comment

Choose a reason for hiding this comment

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

The code simplification looks great. How about we make verbose=false by default and have the executable set verbose = true?

If I remember rightly, non-verbose back end code is useful for other ANTsX implementations.

@dzenanz
Copy link
Contributor Author

dzenanz commented Feb 28, 2024

Sure, a new commit is incoming.

Verbose is off by default in the class.
Executables turn on verbosity for backwards compatibility.
Copy link
Member

@cookpa cookpa left a comment

Choose a reason for hiding this comment

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

Thanks for this @dzenanz

@cookpa cookpa merged commit 4b13b0c into ANTsX:master Feb 28, 2024
1 check passed
@dzenanz dzenanz deleted the refactorAvgAffine branch February 28, 2024 19:34
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.

4 participants