-
-
Couldn't load subscription status.
- Fork 707
STYLE: Remove unused "itkFrequencyImageRegion*IteratorWithIndex.h" files #4828
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
STYLE: Remove unused "itkFrequencyImageRegion*IteratorWithIndex.h" files #4828
Conversation
Both `FrequencyImageRegionIteratorWithIndex` and
`FrequencyImageRegionConstIteratorWithIndex` appear unused and untested.
Attempts to use them would trigger compile errors.
An attempt to use `FrequencyImageRegionIteratorWithIndex` triggered:
error C3210: 'ImageRegionIteratorWithIndex<itk::Image<int,2> >': a member using-declaration can only be applied to a base class member
An attempt to use `FrequencyImageRegionConstIteratorWithIndex` triggered:
error C2679: binary '=': no operator found which takes a right-hand operand of type 'const itk::Point<T,3>' (or there is no acceptable conversion)
This commit removes their header files. It also removes the suggestion to use
`FrequencyImageRegionIteratorWithIndex` from the documentation of
UnaryFrequencyDomainFilter.
|
@phcerdan Sorry Pablo 🤷 but if those iterators don't compile and don't have any test, I think it's better not to have them in the main branch! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are used in the IsotropicWavelets module. We should move the tests from there here.
These filters are useful, prefer a fix rather than removal.
|
@phcerdan Thanks for your very quick response, Pablo!
Sorry, but how can they possibly be used when they cannot compile at all? Even the very first revision of those two iterators (six years ago, e16d0bc) would have those compile errors, as far as I can see. The other six iterator types from Modules/Filtering/ImageFrequency compile fine, it's just these two. So I suspect that these two are not really necessary. 🤷 |
|
Thanks @N-Dekker, I am out of office and away from keyboard to give a detailed answer about the history of the filters. But if you don't want to work on a fix, let me do it when I am back. Thanks |
OK, thanks Pablo. Rather than just a quick-fix of those compile errors, I hope you can add a test that will show the usefulness of those two iterators.
|
Test it via recently added gtest (see InsightSoftwareConsortium#4827) Closes InsightSoftwareConsortium#4828
Both
FrequencyImageRegionIteratorWithIndexandFrequencyImageRegionConstIteratorWithIndexappear unused and untested. Attempts to use them would trigger compile errors.An attempt to use
FrequencyImageRegionIteratorWithIndextriggered:An attempt to use
FrequencyImageRegionConstIteratorWithIndextriggered:This commit removes their header files. It also removes the suggestion to use
FrequencyImageRegionIteratorWithIndexfrom the documentation of UnaryFrequencyDomainFilter.