IntList

Declaration: IntList(NumList: TIntArray; Separator: string): string;
Concatenates the integers stored in the dynamic array NumList to create a string. The integer numbers are separated by the string specified by the parameter Separator.

Sample program: The following code lets you select a few layers, then calculates the sum of the selected layers and visualizes the resulting matrix as a special image in the 2D Imager. The caption of the image lists the used layers by means of IntList:

program LayerSum;

var
  imgmat    : TDouble2DArray;
  i         : integer;
  ll        : TIntArray;
  Weights   : TDoubleArray;

begin
SetLength(ll,0);
if SelectLayer (1,true,true,ll,'Please select the layers to be added up') > 0 then
  begin
  SetLength(Weights, length(ll));
  for i:=1 to length(ll) do
    Weights[i-1] := 1;
  WeightedSumOfLayers (ll, Weights, 1, imgmat);
  AddImgToRepository(imgmat, 1, 1, 'Sum',
        'sum of the following layers: '+IntList(ll,'; '));
  end;
end.


Last Update: 2020-Feb-08