SortPatterns

Sorts patterns by their position in the image. For each pattern in the input Patterns data structure, SortPatterns computes the position of the response of the pattern relative to the specified image fixture coordinate system. Patterns are sorted by one of the following: X coordinate, Y coordinate, angle, angle distance, distance, or grid. The sorted patterns are returned as a new Patterns data structure.