Remove UnaryFunctorImageFilter
Summary
Replace UnaryFunctorImageFilter
by FunctorImageFilter
.
Rationale
This is a step of issue #1821 (closed). The class UnaryFunctorImageFilter
has been removed and all its instance/derived class have been replaced by FunctorImageFilter
.
Copyright
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
Check before merging:
- All discussions are resolved
- At least 2
votes from core developers, no vote. - The feature branch is (reasonably) up-to-date with the base branch
- Dashboard is green
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
Merge request reports
Activity
changed milestone to %7.0.0
added refactoring label
added 1 commit
- 8aeab374 - BUG: add GetModifiableFunctor to modify the functorImageFilter
- Automatically resolved by Cédric Traizet
added 2 commits
@poughov Done.
Shouldn't we run clang-format on the whole library ?
It's at risk of conflicting with existing feature branches but yes we should. I've done it for
Examples/
in !395 (merged). I've tried it on the full code and the diff is huge. Maybe module by module is safer, I don't know.Is there any guidelines for
UnaryFunctorImageFilter
replacement somewhere?From what I saw in the code it can be summarized as follow:
- replace
#include "otbUnaryFunctorImageFilter.h"
with#include "otbFunctorImageFilter.h"
- In functors that were intended to work in
otbUnaryFunctorFilter
, Replaceunsigned int GetOutputSize()
withsize_t OutputSize(const std::array<size_t,1> &)
- In functor filters: always use
filter->GetModifiableFunctor().SetSomething(...)
instead of the oldfilter->GetFunctor().SetSomething(...)
- Add
OTBFunctor
module dependency in cmake files
I miss something?
- replace
added 1 commit
- ca11121b - BUG: replace OTBCommon by OTBFunctor in doxygen doc
mentioned in commit 2ec06ed1
mentioned in merge request !437 (merged)
@remicress This MR broke the Mosaic remote module because UnaryFunctorImageFilter was used.
I created a pull request on the module with a fix.
Also, OTB does not use the last version of the module (one commit is missing), maybe we should update it ! (to master ?)
Edited by Cédric Traizetmentioned in merge request !448 (merged)