Hello,

I am a little unclear on how the directional cosines are set to create a new Simple ITK image. I understand that they should be in row major order. Is this correct: If we take a 2D example, the unit vector along a row (across columns) would go first and the unit vector along a column (across rows) would go second? If so, I am a bit confused with the 2D brain image example in the fundamental concepts guide. There, when the image is not tilted (the one on the right), the directional cosines are (1,0,0,1), which is essentially (direction cosine along a row, directional cosine along a column), i.e., (x axis direction, y axis direction). But when the image is tilted (left image), I would think the cosines would be (0.7, 0.7, -0.7, 0.7). I.e., the direction along row is now (0.7, 0.7) and direction along column is (-0.7, 0.7). This is different from what is written on the webpage, which is (0.7, -0.7, 0.7, 0.7). Can you kindly clarify if I am missing something here?

Also, in 3D, just to confirm, the row major order of cosines would be the following, correct?

(directional cosine along increasing slice direction, directional cosine along row direction (across columns), directional cosine along column direction (across rows))

Thank you!