Summary
nilearn.image.concat_imgs appears to be overly conservative in how it compares affines to determine if they can be concatenated. Currently, we tell users to overwrite their affines manually, which is suboptimal. Instead, we could "look at the zooms, offsets and angles and set a threshold for each. The zooms had better be within eps of each other, same with the offsets. The angles we can calculate differences in degrees and go from there" (@mattcieslak's idea). If DWI files are compatible according to these thresholds, then we can create a modified version of each image with the affine from the first image, then pass them all into concat_imgs.
Stems from #225 (comment).
Summary
nilearn.image.concat_imgsappears to be overly conservative in how it compares affines to determine if they can be concatenated. Currently, we tell users to overwrite their affines manually, which is suboptimal. Instead, we could "look at the zooms, offsets and angles and set a threshold for each. The zooms had better be within eps of each other, same with the offsets. The angles we can calculate differences in degrees and go from there" (@mattcieslak's idea). If DWI files are compatible according to these thresholds, then we can create a modified version of each image with the affine from the first image, then pass them all intoconcat_imgs.Stems from #225 (comment).