Hello, try the ternary operator :
?:if then else operatorC++ style syntax 'ndvi(im1b4,im1b1) < 0.3 ? 255 : 0 Cheers, Jonathan * 2015-09-13 11:51 GMT+02:00 Ofer Zilberstein <[email protected]>: > > Hi, > > In the previews versions (BandMath) I used this conditional expression > (mask image according to NDVI) (in python) > > exp = 'if (ndvi(im1b4,im1b1) < 0.3, 255,0)' > > now I get error exception. > > i tried BandMathX as well > > any idea ? > > Ofer > > > > > -- > -- > Check the OTB FAQ at > http://www.orfeo-toolbox.org/FAQ.html > > You received this message because you are subscribed to the Google > Groups "otb-users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/otb-users?hl=en > --- > You received this message because you are subscribed to the Google Groups > "otb-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- Check the OTB FAQ at http://www.orfeo-toolbox.org/FAQ.html You received this message because you are subscribed to the Google Groups "otb-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/otb-users?hl=en --- You received this message because you are subscribed to the Google Groups "otb-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
