This sample shows how to use Loop enumerator on pixel layer.
Profile enumerator follows the line on a grid and returns pairs of distance and elevation.
Min/Max enumerator calculates min and max elevation of the grid and marks their positions with cross.