Skip to content
Snippets Groups Projects

Remove UnaryFunctorImageFilter

Merged Cédric Traizet requested to merge replace_unary_functor_image_filter into develop
All threads resolved!

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 :thumbsup: votes from core developers, no :thumbsdown: 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
Edited by Cédric Traizet

Merge request reports

Merge request pipeline #515 passed

Merge request pipeline passed for ca11121b

Approval is optional
Loading

Merge details

  • 0 commits and 1 merge commit will be added to .
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Very nice. Can you run git diff develop... -U0 --no-color | clang-format-diff -p1 -i?

  • Cédric Traizet resolved all discussions

    resolved all discussions

  • Cédric Traizet added 2 commits

    added 2 commits

    Compare with previous version

  • @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, Replace unsigned int GetOutputSize() with size_t OutputSize(const std::array<size_t,1> &)
    • In functor filters: always use filter->GetModifiableFunctor().SetSomething(...) instead of the old filter->GetFunctor().SetSomething(...)
    • Add OTBFunctor module dependency in cmake files

    I miss something?

  • Good point Rémi. This will need to be in the migration guide for release 7.0.0.

  • added 1 commit

    • ca11121b - BUG: replace OTBCommon by OTBFunctor in doxygen doc

    Compare with previous version

  • Cédric Traizet mentioned in commit 2ec06ed1

    mentioned in commit 2ec06ed1

  • Cédric Traizet mentioned in merge request !437 (merged)

    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 Traizet
  • Cédric Traizet mentioned in merge request !448 (merged)

    mentioned in merge request !448 (merged)

  • close?

  • Close what? This MR is merged, and the associated issue is not done, as it is the whole functor refactoring story.

  • Sorry I got confused in my email notifications, nevermind.

  • Please register or sign in to reply
    Loading