IMEXPR: odd behavior with single character image names
Frank Valdes wrote on Aug 25, 1998
Q: Any idea why this doesn't work? I have been using imexpr successfully... imexpr "(a == -10) ? -10 : b" output=vgs.imh a=v.imh b=vgstemp.imh ERROR: bad image parameter reference vgstemp.imh A: This is a quirk of this task. The variable names in the expression are a-z. The values of these variables can be images or image header parameters. For image header parameters the syntax is operand.param. So in your case: imexpr "(a == -10) ? -10 : b" output=vgs.imh a=v.imh b=vgstemp.imh ERROR: bad image parameter reference vgstemp.imh where you have a=v.imh, I believe the task is saying use the header parameter "imh" from operand image "v". The error message is also wrong. So your workaround is to either rename your image to be other than a single lower-case letter or not use the full image name with the extension. For the latter solution use: imexpr "(a == -10) ? -10 : b" output=vgs.imh a=v b=vgstemp.imh
Last post on Aug 25, 1998