Skip to content

Use tolerances for affine matrix differences to allow for floating point errors #1036

Description

@tsalo

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions