Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxEqualVal.h File Reference

More...

#include "HxImageRep.h"

Go to the source code of this file.

Functions

HxImageRep L_HXIMAGEREP HxEqualVal (HxImageRep im, HxValue val)
 Equal. More...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxEqualVal HxImageRep    im,
HxValue    val
 

Equal.

The function performs equal (see Pixels) on all pixels in the input image via a binary pixel operation (see Images).

Implementation specifics : The pixel functor : HxBpoEqual. The image functor instantiator : HxInstantiatorEqualV.

00013 {
00014     HxString fname("HxEqualVal");
00015 
00016     if (im.isNull())
00017     {
00018         HxGlobalError::instance()->reportError(fname, im.name(), "null image", HxGlobalError::HX_GE_INVALID);
00019         return HxImageRep();
00020     }
00021 
00022     int valdim;
00023     if ((val.tag() == HxValue::SI) || (val.tag() == HxValue::SD))
00024     {
00025         valdim = 1;
00026     }
00027     else if ((val.tag() == HxValue::V2I) || (val.tag() == HxValue::V2D))
00028     {
00029         valdim = 2;
00030     }
00031     else 
00032     {
00033         valdim = 3;
00034     }
00035     if (im.signature().pixelDimensionality() != valdim)
00036     {
00037         HxGlobalError::instance()->reportError(fname, "pixel dimensionality differs from value dimensionality", 
00038                         HxGlobalError::HX_GE_UNEQUAL_DIMS);
00039         return HxImageRep();
00040     }
00041 
00042     return im.binaryPixOp(val, "equal");
00043 }


Generated on Tue Feb 3 14:18:46 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001