WIP: General itkFrequencyShrink / Expand #31
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.