#include "HxImageRep.h"
Go to the source code of this file.
Functions | |
| HxImageRep L_HXIMAGEREP | HxComplement (HxImageRep im) |
| One's complement. More... | |
|
|
One's complement. The function computes the one's complement (see Pixels) of all pixels in the input image via a unary pixel operation (see Images). Implementation specifics : The pixel functor : HxUpoComplement. The image functor instantiator : HxInstantiatorComplement.
00013 {
00014 HxString fname("HxComplement");
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.signature().pixelType() != INT_VALUE)
00022 {
00023 HxGlobalError::instance()->reportError(fname, "this function is only valid on integer values", HxGlobalError::HX_GE_INVALID);
00024 return HxImageRep();
00025 }
00026
00027 return im.unaryPixOp("complement");
00028 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001