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

Sharpening options in template construction #1149

Merged
merged 4 commits into from
Mar 2, 2021
Merged

Conversation

cookpa
Copy link
Member

@cookpa cookpa commented Feb 26, 2021

This is mostly to address #956, but also adding a few other changes to improve performance.

Users may choose no sharpening, Laplacian (default), or unsharp mask.

Summary statistic: Made mean, median available in antsMultivariateTemplateConstruction.sh

Backwards compatibility is mostly preserved by leaving normalized mean (-a 1) and Laplacian sharpening (-A 1) as the defaults. I did slightly modify how sharpening is used in initial templates:

  • Don't sharpen initial templates after population averaging or initial rigid alignment. These initial templates are often very messy and arguably should be smoothed, not sharpened

  • In antsMultivariateTemplateConstruction2.sh, use median for initialization - again to help convergence and avoid outliers causing too much trouble.

Misc fixes:

  • If -z is specified, ensure that the template exists and don't silently fall back to a population average.

@cookpa cookpa marked this pull request as draft February 26, 2021 17:27
@cookpa
Copy link
Member Author

cookpa commented Feb 26, 2021

I need to test antsMultivariateTemplateConstruction.sh on another machine because I'm having trouble with it on my Mac.

@gdevenyi
Copy link
Contributor

Is it worth adding a median method to AverageImages so that the its available elsewhere and a bit cleaner?

@cookpa
Copy link
Member Author

cookpa commented Feb 26, 2021

Yeah, updating AverageImages would probably be good. I've been wanting to make an antsAverageImages using the updated CLI, but I have not had time to do that.

@cookpa cookpa marked this pull request as ready for review February 26, 2021 19:44
@cookpa
Copy link
Member Author

cookpa commented Feb 26, 2021

Anyway it looks like the sharpening options are working correctly in both templates, so I'm taking this out of draft mode.

@cookpa cookpa linked an issue Mar 1, 2021 that may be closed by this pull request
@cookpa cookpa merged commit 4e2b0c7 into master Mar 2, 2021
@cookpa cookpa deleted the sharpeningOptions branch April 20, 2022 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.

Fix sharpening artifacts in template construction
2 participants