Closed
Conversation
WIP: Shrink is almost there, but the fix of nyquist band is still WIP. Fixing involves averaging of largest frequencies --largest taking into account the shrink factor-- in the input image, and placing in the nyquist band of the shrinked image. There are only nyquist bands in the dimension when the outputSize is even. A nyquist band exist in 2D, in 3D is a nyquist slice, in 1D is a point. When there are more even dimension, lower dimensions structures appear. In 3D, two even dimensions create 2 nyquist slices, and 1 nyquist band in the intersection. This band requires extra averaging. The same thing in 2D with 2 even dimensions, there is one point in the intersection that requires extra averaging. NOTE: Doing it general for NDimensions is verbose, dealing with positive and negative quadrants.
2fe2ec4 to
dfc6646
Compare
Member
|
@phcerdan Is this PR worth keeping open? Could a set of exceptions be put in place for cases when the results would not be trustworthy? |
Collaborator
Author
|
@hjmjohnson this PR had a lot of effort 8 years ago, but didn't cross the line. I don't think it's worth it. Users can make hermitian size images, and then all is fine. The topic is interesting though, that's why it has the wontfix label but still open. Up to you really, I don't think it has chances to be fixed or merged. |
Collaborator
Author
|
Done! |
Collaborator
Author
|
Won't fix, a copy of this branch exists in my fork: https://github.com/phcerdan/ITKIsotropicWavelets/tree/FrequencyShrink_GeneralCase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP: General itkFrequencyShrink not requiring hermitian input.
Shrink is almost there, but the fix of nyquist band is still WIP.
Fixing involves averaging of largest frequencies --largest taking into
account the shrink factor-- in the input image, and placing in the
nyquist band of the shrinked image.
There are only nyquist bands in the dimension when the outputSize is even.
A nyquist band exist in 2D, in 3D is a nyquist slice, in 1D is a point.
When there are more even dimensions, lower dimensions structures appear.
In 3D, two even dimensions create 2 nyquist slices, and 1 nyquist band
in the intersection. This band requires extra averaging.
The same thing in 2D with 2 even dimensions, there is one point in the
intersection that requires extra averaging.
NOTE: Doing it general for NDimensions is verbose, dealing with positive
and negative quadrants.