The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



SumArrayMasked


Unit:SDL_openarrays
Class: none
Declaration: [1] function SumArrayMasked (Mat: TDouble2DArray; MaskArray: TBool2DArray; var Sum: double): integer;
[2] function SumArrayMasked (Mat: TInt2DArray; MaskArray: TBool2DArray; var Sum: double): integer;

The function SumArrayMasked calculates the sum of all values of the cells of the matrix Mat which are not masked by the corresponding MaskArray cell and returns the sum in the variable parameter Sum. A TRUE value in a cell of MaskArray masks this cell. The function value returns the number of processed pixels.

The function returns the following error codes:

≥0 ... everything is ok
-1 ... the sizes of Mat and MaskArray do not match
-2 ... Mat has no size at all



Last Update: 2023-Feb-06