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....



DichotomizeArray


Unit:SDL_openarrays
Class: none
Declaration: [1] function DichotomizeArray (InMat: TDouble2DArray; Threshold: double; var OutMat: TBool2DArray): integer;
[2] function DichotomizeArray (InMat: TDouble2DArray; Thresh1, Thresh2: double; var OutMat: TBool2DArray): integer;
[3] function DichotomizeArray (InMat: TInt2DArray; Threshold: integer; var OutMat: TBool2DArray): integer;
[4] function DichotomizeArray (InMat: TInt2DArray; Thresh1, Thresh2: integer; var OutMat: TBool2DArray): integer;

The function DichotomizeArray compares the values of the matrix InMat to the threshold Threshold and fills the array OutMat with the result of the comparison. TRUE values will be stored in OutMat for all matrix cells whose values exceed the threshold (versions [1] and [3]). Versions [2] and [4] allow to define an interval instead of a threshold. All values which fall into the interval specified by the parameters Thresh1 and Thresh2 result in TRUE values in the OutMat array.

The size of the array OutMat will be automatically adjusted to fit the size of the matrix.

The function returns the following error codes:

 0 ... everything is OK
-1 ... InMat is empty



Last Update: 2018-Aug-01