#include "HxImageRep.h"
Go to the source code of this file.
Functions | |
HxImageRep L_HXIMAGEREP | HxLessThanVal (HxImageRep im, HxValue val) |
Less than. More... |
|
Less than. The function performs less than (see Pixels) on all pixels in the input image via a binary pixel operation (see Images). Implementation specifics : The pixel functor : HxBpoLessThan. The image functor instantiator : HxInstantiatorLessThanV.
00013 { 00014 HxString fname("HxLessThanVal"); 00015 00016 if (im.isNull()) 00017 { 00018 HxGlobalError::instance()->reportError(fname, im.name(), "null image", HxGlobalError::HX_GE_INVALID); 00019 return HxImageRep(); 00020 } 00021 if (im.pixelDimensionality() != 1) 00022 { 00023 HxGlobalError::instance()->reportError(fname, "operation only valid on scalar types", HxGlobalError::HX_GE_UNEQUAL_IMAGES); 00024 return HxImageRep(); 00025 } 00026 if ((val.tag() != HxValue::SI) && (val.tag() != HxValue::SD)) 00027 { 00028 HxGlobalError::instance()->reportError(fname, "operation only valid on scalar types", HxGlobalError::HX_GE_UNEQUAL_IMAGES); 00029 return HxImageRep(); 00030 } 00031 00032 return im.binaryPixOp(val, "lessThan"); 00033 } |