You happen to know how to get the affine transform matrix entries from the parrec header?

I know how to handle
imgdef.pixel_spacing_x_y.uniq
imgdef.slice_thickness_in_mm.uniq
imgdef.slice_gap_in_mm.uniq
imgdef.image_angulation_ap_fh_rl_in_degrees.uniq

But the offset has 9 values... I expected three.
imgdef.image_offcentre_ap_fh_rl_in_mm.uniq

If my series are periodical, the ends meet and the special case defined in this function is not correct. Does the filter function assume this and can I just delete the special case part?

Extremely useful, ridiculous that matlab cant do this normally. When your functions get single precision input more than half of the inbuilt tests fail by the way.