Skip to content

FIX: StreamingMosaicFilter childs can have a different number of components per pixel at output

Rémi Cresson requested to merge mosaic_fix_nb_channels into develop

Summary

StreamingMosaicFilterBase throws some warning and discard no-data pixels provided by the user, when the number of component per pixel (NCPP) is not the same in input images and output images. This patch removes this behavior, enabling user to chose a no-data pixel with different NCPP in the output image.

Rationale

Mosaic filters derive from StreamingMosaicFilterBase. Most of the mosaic logic remains in this class, and the deriving filters basically just implement how the functor is applied to pixels. Before this patch, StreamingMosaicFilterBase assumed that the NCPP of the output mosaic image, is the same as the input images NCPP. While this is mostly true in the actual existing StreamingMosaicFilterXXX filters, one could imagine some filters that need to change the output number of components per pixels (for instance, that one computes the argmax function of the averaged input channels mosaic).

Implementation Details

Just remove the warning and not reset the no-data output pixel when its NCCP is different than input.

Classes and files

Only StreamingMosaicFilterBase.hxx is modified.

Applications

No change in applications, because the no-data pixel is the same in input and output anyway.

Copyright

The copyright owner is IRSTEA (Rémi Cresson) 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
  • Optionally, run git diff develop... -U0 --no-color | clang-format-diff.py -p1 -i on latest changes and commit

Merge request reports

Loading