otbcli_ManageNoData: saves only 1 band

I’m trying to apply a mask to a multi-spectral image in the following way:

otbcli_ManageNoData.bat -in mini.tif -out miniMask.tif uint8 -mode.buildmask.inv 1 -mode.buildmask.outv 0 
otbcli_ManageNoData.bat -in miniPCAmontwhit.tif -out miniPCAmontwhitM.tif uint8 -mode.apply.mask miniMask.tif -mode.apply.ndval 0

The mask has the correct nodata values, but the output has only 1 band (while the input has 3) and it is all 1 (even where the mask is nodata…)
Am I doing something wrong or is this a bug to be reported?

Agus

Hello,

-mode apply seems to be missing in the second line

With your commands you should have the following warnings :

WARNING: Parameter -mode.apply.mask will be ignored because -mode is buildmask.
WARNING: Parameter -mode.apply.ndval will be ignored because -mode is buildmask.

Does it works if you add -mode apply ?

Cédric

Thanks!
I confirm it works fine inserting -mode apply
I appologize for my late answer.