BUG: Improve Convert and DynamicConvert mask handling (fix #1647)
Summary
- Improve documentation of
-maskparameter ofConvertandDynamicConvertto clarify the mask semantic:
$ ./bin/otbcli_Convert -help mask
-mask <string> Input mask (optional, off by default)
Optional binary mask to only process part of the input image. Only pixels where the mask is less than 0.5 will be processed. The mask must have the same dimensions as the input image.
$ ./bin/otbcli_DynamicConvert -help mask
-mask <string> Input mask (optional, off by default)
Optional binary mask to only process part of the input image. Pixels where the mask is zero will not be processed. The mask must have the same dimensions as the input image.
- In
DynamicConvert: read the mask as aUInt8ImageTypeinstead of aFloatImageTypeand change the condition from> 0.5to!= 0. - Add missing test for DynamicConvert
-testparameter.
Rationale
See #1647 (closed) and further discussion in !146 (closed).
Testing
Added input mask and baseline output to otb-data.
Additional notes
I did not change the Convert app to use UInt8ImageType because that app is deprecated.
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