Skip to content

How to passfull or inhomogeneous affine matrix to Affine? #54

Description

@jo-mueller

I have a use case where I extract an affine matrix from a different tool, which gives me an affine matrix of the following kind for a 3D dataset:

2.2408546792146753, 0.518379728429602, -0.04612377550830799, -210.8286161082715
-0.5159947829355463, 2.2395791802696188, 0.10153382765538543, -103.19297075390104
0.0677814834389687, -0.08855614788543548, 2.2977898333064966, 4.337448299935659
0.0, 0.0, 0.0, 1.0

Now, if I chain this in a TransformSequence with a Scale transform with three scale parameters, I get a ValueError: Cannot compose affine transformations of different dimensionality error, because the affine matrix is automatically padded to 5x5 under the hood. Maybe there's a way to check if the affine is passed in homogeneous or inhomogeneous format?

For now, I can just pull out the translation from the affine (right column) and split it into an affine + translation, but it would be nice to support this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions