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

HxImageMean.h File Reference

More...

#include "HxImageRep.h"

Go to the source code of this file.

Functions

HxValue L_HXIMAGEREP HxImageMean (HxImageRep im)
 Compute the mean of all pixels in "im". More...


Detailed Description


Function Documentation

HxValue L_HXIMAGEREP HxImageMean HxImageRep    im
 

Compute the mean of all pixels in "im".

Implementation specifics:

HxIdentMaskMean is called with the appropriate parameters.

00013 {
00014     HxString fname("HxImageMean");
00015 
00016     if (im.isNull())
00017     {
00018         HxGlobalError::instance()->reportError(fname, im.name(), "null image", HxGlobalError::HX_GE_INVALID);
00019         return HxValue();
00020     }
00021 
00022     HxImageSignature signature(
00023                         im.dimensionality(), 1, INT_VALUE, 8);
00024     HxSizes size = im.sizes();
00025     HxImageRep mask = HxMakeFromValue(signature, size, HxValue(1));
00026     HxBoundingBox bb(size);
00027     HxTagList tags;
00028     HxAddTag(tags, "maskVal", 1);
00029     HxAddTag(tags, "boundingBox", bb);
00030     im.exportOpExtra("identMaskMean", mask, tags);
00031     HxValue v = HxGetTag(tags, "result", HxValue(0));
00032     return v;
00033 }


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