...
To convert from column-major order (frequently found in reference files on the internet) to row-major (the order used by Imatest), the first step is to open the downloaded file in Excel. Reference files often include extra data. Here is an example from the Image Engineering TE262 Universal Test Target file, used for evaluating scanners. The color pattern in the large UTT chart is shown on the right. (There are two of these in some printed charts.)
...
Now comes the tricky part. Add data to the fourth column indicating how you’d like to sort the data to convert to column to row-major. Line 1 doesn’t change, so add 1. Line 2 will go into Row 2, Column 1, which is line 4 in row-major. Line 3 will go into Row 3, column 1, which is line 7 in row-major. Continue in increments of 3 for the 9 rows. THen Then line 10 will go into Row1, Column 2, etc. The first 14 rows (of 27) will be
...
Because of the simple repetition in column 4 (mostly increments of 3 columns), it’s a lot easier than copying and pasting lines. More generally, for an m row x n column image, column 4 should contain {1, k+1, 2k+1, …, (m-1)n+1, 2, k+2, 2k+2, (m-1)n+2, …, n, k+n, 2k+n, …, (m-1)n+n = mn}.
Now Select the full 27 lines and 4 columns, right-click, and press Sort > Custom sort. This opens the Sort window. Choose Sort by Column D, then press OK. This sorts the data so that column D is in sequence, 1, 2, …, 27.
...