#include "HxImageRep.h"
Go to the source code of this file.
Functions | |
HxValue L_HXIMAGEREP | HxIdentMaskSum (HxImageRep im, HxImageRep mask, HxPoint p, HxSizes size, int label) |
Compute the sum of all pixels in "im" identified by "mask". More... |
|
Compute the sum of all pixels in "im" identified by "mask". "mask" is assumed to be an identification image with pixel type short. The function considers all pixels within the area starting at point "p" with given "size" and a value equal to label. Implementation specifics :
00015 { 00016 HxBoundingBox bb(size); 00017 bb = bb.translate(p); 00018 HxTagList tags; 00019 HxAddTag(tags, "maskVal", label); 00020 HxAddTag(tags, "boundingBox", bb); 00021 im.exportOpExtra("identMaskSum", mask, tags); 00022 HxValue v = HxGetTag(tags, "result", HxValue(0)); 00023 return v; 00024 } |