Skip to content

WIP: General itkFrequencyShrink / Expand#31

Closed
phcerdan wants to merge 1 commit intomainfrom
FrequencyShrink_GeneralCase
Closed

WIP: General itkFrequencyShrink / Expand#31
phcerdan wants to merge 1 commit intomainfrom
FrequencyShrink_GeneralCase

Conversation

@phcerdan
Copy link
Copy Markdown
Collaborator

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.

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.
@phcerdan phcerdan force-pushed the master branch 2 times, most recently from 2fe2ec4 to dfc6646 Compare April 30, 2017 06:22
@hjmjohnson
Copy link
Copy Markdown
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?

@phcerdan
Copy link
Copy Markdown
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.
Let me fork it in my username, and we can close PR and delete branch.

@phcerdan
Copy link
Copy Markdown
Collaborator Author

Done!

@phcerdan
Copy link
Copy Markdown
Collaborator Author

Won't fix, a copy of this branch exists in my fork: https://github.com/phcerdan/ITKIsotropicWavelets/tree/FrequencyShrink_GeneralCase

@phcerdan phcerdan closed this May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants