CrossSect

Declaration: CrossSect(Layer, TSlot, P1X, P1Y, P2X, P2Y: integer; var CrossSect: TDoubleArray): integer;
Calculates the cross section of the layer specified by the parameter Layer and the timeslot TSlot. The line along which the cross section is calculated is defined by the reference points [P1X,P1Y] and [P2X,P2Y]. The cross section is returned in the variable parameter CrossSect. Please note that the size of the CrossSect array is automatically adjusted and changes with the slope of the line along which the cross section is calculated.

The figure at left tries to clarify the concept: the cross section of layer 19 and timeslot 1 is calculated by first drawing a (virtual) line through the reference points P1 and P2. Because the slope of the line is lower than 1.0 the resolution of the cross section equals the resolution of the x axis (the size of the array CrossSect is equal to the number of pixels in x-direction). The intensities along the red line are copied into the array CrossSect.

The function returns the following error codes:

 0 ... everything is OK
-1 ... the Layer parameter is out of range
-2 ... the TSlot parameter is out of range
-3 ... the two reference points are the same