BandMathX and bands()

Description

The use of operator bands produces a segfault in bandmathX application. This is a bit too harsh, maybe we can find a way to warn the user instead of crashing.

Steps to reproduce

Run BandMathX application (gui and maybe cli) try to use the operator bands on your image and set a non existing band. (For instance im1 has 3 bands try to do bands(im1,{1,2,4}) )

Configuration information

OTB 6.7 binaries packages on linux 16.04

Edited by Antoine Regimbeau