Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make random affine matrix #1621

Merged
merged 2 commits into from
Feb 23, 2021
Merged

Conversation

rijobro
Copy link
Contributor

@rijobro rijobro commented Feb 23, 2021

create random affine matrix (will be required for inverse transform)
#1515

@wyli
Copy link
Contributor

wyli commented Feb 23, 2021

thanks, need some constraints about the invertibility?

@rijobro
Copy link
Contributor Author

rijobro commented Feb 23, 2021

No, I don't use these for inverting anything, I just use it to write nifti images for the purposes of testing. I need them to have affines along the lines of:

 0, 1,  0, 0
-1, 0,  0, 0
 0, 0, -1, 0
 0, 0,  0, 1

At any rate, this is trivially invertible.

tests/utils.py Outdated Show resolved Hide resolved
tests/utils.py Outdated Show resolved Hide resolved
@rijobro rijobro force-pushed the rand_affine_matrix branch 2 times, most recently from dab1ae5 to f40b84a Compare February 23, 2021 15:51
Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
@wyli wyli enabled auto-merge (squash) February 23, 2021 15:55
@wyli wyli merged commit a894adc into Project-MONAI:master Feb 23, 2021
@rijobro rijobro deleted the rand_affine_matrix branch February 23, 2021 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants