Menu

Module providing common Brain MRI Augmentation Methods for PyTorch.

Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the gallery for the big picture.

brainrise.transform.compose(T, R, Z, S=None)[source]ΒΆ

Compose translations, rotations, zooms, [shears] to affine

Parameters

T : array (N,)

translations, where N is usually 3 (3D case)

R : array (N, N)

rotation matrix where N is usually 3 (3D case)

Z : array (N,)

zooms, where N is usually 3 (3D case)

S : array (P,), default None

shear vector, such that shears fill upper triangle above diagonal to form shear matrix. P is the (N-2)th Triangular number, which happens to be 3 for a 4x4 affine (3D case)

Returns

A : array (N+1, N+1)

affine transformation matrix where N usually == 3 (3D case)

Follow us

© 2023, brainrise developers